Page 1 of 1

MailScanner rules update not triggered automatically

Posted: 25 Aug 2016, 18:44
by bobbytables
Hi,

after upgrading MSFE and MailScanner to the latest version (MailScanner 5.0.2, MSFE 6.02 and ConfigServer MailScanner Script 3.07) I noticed that rules update isn't triggered automatically (e.g. after creating new cPanel account or after creating new addon domain).

I have verified that /usr/mscpanel/msbe.pl script is executed every 10 minutes via cron job and I even tried running the script manually, but with no effect. New domains aren't added to rule files in /usr/mailscanner/etc/rules/.

New domains are added only if I click "Mailscanner rules update" button in WHM plugin or if I execute /usr/mscpanel/msbe.pl -a

I can reproduce this problem on all servers running mentioned versions of MailScanner and MSFE. cPanel version is 11.58.0.24, but I was able to reproduce the same problem on server with older cPanel 11.52.

UPDATE: Actually, I just noticed that I'm able to reproduce the same problem on older servers. An example would be the server with cPanel 11.52.6.4, MailScanner 4.84.5, ConfigServer MailScanner Script 2.94 and MSFE 4.60.

It appears that rules configuration files in /usr/mailscanner/etc/rules/ are updated once per day, when crond executes /usr/mscpanel/mscpanel.pl script. I can verify that by inspecting timestamps of rules files, which correspond to cron job execution time.

Re: MailScanner rules update not triggered automatically

Posted: 26 Aug 2016, 11:06
by Sarah
It sounds like it is working as it should on your server.

It is only when running mscpanel.pl that new domains will be added or old domains removed. When msbe.pl runs every 10 minutes it just updates the mailscanner and msfe settings for existing users but will not add new domains or remove old ones.

To clarify, the cron job that runs overnight (mscpanel.pl) is the one that will add new domains /accounts that have been added to the server. If you want to force MailScanner to add new domains outside of the overnight cron job, you need to do it manually as you have discovered.

Regards,
Sarah

Re: MailScanner rules update not triggered automatically

Posted: 26 Aug 2016, 14:09
by bobbytables
Thank you Sarah for clarification.