Page 1 of 1

Notice: Undefined index: in hourly cron-jobs

Posted: 05 Apr 2016 15:02
by duesen
I am getting this Messages every time the hourly cron-job is executed:

Code: Select all

/etc/cron.hourly/mailwatch_relay.sh:
Notice: Undefined index: %rules-dir% in /var/www/html/mailscanner/functions.php on line 1475
Notice: Undefined index: %rules-dir% in /var/www/html/mailscanner/functions.php on line 1475
Notice: Undefined index: %org-name% in /var/www/html/mailscanner/functions.php on line 1475
Notice: Undefined index: %rules-dir% in /var/www/html/mailscanner/functions.php on line 1475
Notice: Undefined index: %rules-dir% in /var/www/html/mailscanner/functions.php on line 1475
Notice: Undefined index: %rules-dir% in /var/www/html/mailscanner/functions.php on line 1475
Notice: Undefined index: %org-name% in /var/www/html/mailscanner/functions.php on line 1475
Notice: Undefined index: %rules-dir% in /var/www/html/mailscanner/functions.php on line 1475
The only thing I can remember was adding a .conf file in /etc/MailScanner/conf.d to keep our changes apart from the main config file.
In den newly created conf-file NO %param%-values were changed as the README says to keep the order of parsing in mind.

Restarting the MailScanner service drops no entries about a missing or a wrong configured value!

Has someone any idea how to fix this or can give a hint where to look for ... ?

-
duesen

Re: Notice: Undefined index: in hourly cron-jobs

Posted: 13 Apr 2016 18:35
by duesen
I think I fixed it by myself.
Looking up what is happening in functions.php the script seems to get problems updating the array with "%param%"-parameters when a custom config file in /etc/MailScanner/conf.d is used.

SOLUTION:
I copied the settings of "%org-name%" and "%rules-dir%" to the custom config file.
Now the problem seems to be solved.
-
duesen

Re: Notice: Undefined index: in hourly cron-jobs

Posted: 12 Oct 2017 08:32
by ajmind
I have this problem too:

Code: Select all

Oct  8 04:01:01 hostname php: PHP Notice:  Undefined index: %report-dir% in /var/www/html/mailscanner/functions.php on line 1812
Oct  8 04:01:01 hostname php: PHP Notice:  Undefined index: %org-name% in /var/www/html/mailscanner/functions.php on line 1812
O
I have only one custom config file and only with these a.m. two variables included, so what I miss here?