You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
%-variables defined in main MS config are not expanded in conf.d config files by MailWatch functions.
MailScanner allows to use %-variables defined in main MailScanner.conf file to be used in conf.d-config files. But MailWatch requires %-variables to be defined within the same file where they are used.
Steps to reproduce
Make sure some %-variables are defined in MailScanner.conf
some of those %variables in conf.d config files
Run MailWatch cron job of use web interface
Expected result
No errors
Actual result
Both apache access-log and cron system logging are full of messages like this:
PHP Notice: Undefined index: %org-name% in /opt/mailwatch/mailscanner/functions.php on line 1894
PHP Notice: Undefined index: %org-name% in /opt/mailwatch/mailscanner/functions.php on line 1894
PHP Notice: Undefined index: %etc-dir% in /opt/mailwatch/mailscanner/functions.php on line 1894
PHP Notice: Undefined index: %etc-dir% in /opt/mailwatch/mailscanner/functions.php on line 1894
PHP Notice: Undefined index: %rules-dir% in /opt/mailwatch/mailscanner/functions.php on line 1894
Installation
Version and method
MailWatch Version: stable 1.2.18
Install type: GitHub checkout
Updated from an older MailWatch or fresh install: Fresh install
Server configuration
Operation System: openSuse Leap 15.3
PHP version: 7.4
Database: MariaDB 10.5.13
Mail Server: Postfix
Used web server: Apache version 2.4.43
Client configuration
Operation System: openSuse Tumbleweed
Browser: Firefox 95.0.2
The text was updated successfully, but these errors were encountered:
This is expected behavior the way MailWatch currently is written, but I agree it would be proper to parse the main and conf.d counterparts in their entirety and populate those values, even if they aren't in the same file.
Issue summary
%-variables defined in main MS config are not expanded in conf.d config files by MailWatch functions.
MailScanner allows to use %-variables defined in main MailScanner.conf file to be used in conf.d-config files. But MailWatch requires %-variables to be defined within the same file where they are used.
Steps to reproduce
Expected result
No errors
Actual result
Both apache access-log and cron system logging are full of messages like this:
Installation
Version and method
Server configuration
Client configuration
The text was updated successfully, but these errors were encountered: