Skip to content

%-variables defined in main MS config are not expanded in conf.d config files #1245

@RobinR1

Description

@RobinR1

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

  1. Make sure some %-variables are defined in MailScanner.conf
  2. some of those %variables in conf.d config files
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions