Notice: Undefined index: in hourly cron-jobs

Report bugs and workarounds
Post Reply
duesen
Posts: 12
Joined: 30 Mar 2016 15:35
Location: Austria

Notice: Undefined index: in hourly cron-jobs

Post by duesen » 05 Apr 2016 15:02

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

duesen
Posts: 12
Joined: 30 Mar 2016 15:35
Location: Austria

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

Post by duesen » 13 Apr 2016 18:35

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

ajmind
Posts: 20
Joined: 28 Mar 2017 15:26

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

Post by ajmind » 12 Oct 2017 08:32

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?

Post Reply