Changing default spam action via cli

Discuss the ConfigServer MailScanner Front-End script
Post Reply
elliotpea
Junior Member
Posts: 4
Joined: 10 Jun 2015, 19:44

Changing default spam action via cli

Post by elliotpea »

Hi,

We need to roll out a change to update the high spam score action to 'delete' on many servers. This was achieved by:

sed -i 's/deliver$/delete/g' /usr/mailscanner/etc/rules/spamhigh.action.rules

However, although the file has updated and the defaults for all accounts are now delete in the correct file, the cPanel or WHM UI has not updated to show this change (although i'm assuming MailScanner is reading this file directly and it's working ok).

Could you point me in the direction of any command, file, or cache file which may be causing the UI to still show the old value?

Thanks,

Elliot
elliotpea
Junior Member
Posts: 4
Joined: 10 Jun 2015, 19:44

Re: Changing default spam action via cli

Post by elliotpea »

Any advice on this? It's kind of urgent now.

Thanks,
Sarah
Moderator
Posts: 934
Joined: 09 Dec 2006, 22:49

Re: Changing default spam action via cli

Post by Sarah »

The mailscanner front-end does not get the settings from that file. The data goes the other way, from the MSFE to the spamhigh.action.rules file.

User settings for this are stored in /home/username/.mailscanner
Server wide settings are stored in /usr/mscpanel/msconfig.txt

The MSFE back-end script that runs nightly may overwrite the spamhigh.action.rules file with the settings from these files.

Neither of those files is designed to be edited manually and we cannot confirm whether editing them directly would accomplish what you are looking for.
elliotpea
Junior Member
Posts: 4
Joined: 10 Jun 2015, 19:44

Re: Changing default spam action via cli

Post by elliotpea »

Hi Sarah,

Thanks for reply, that's perfect. /usr/mscpanel/msconfig.txt is what i needed! I'll get this amended.

Have a good weekend.


Elliot
Sarah
Moderator
Posts: 934
Joined: 09 Dec 2006, 22:49

Re: Changing default spam action via cli

Post by Sarah »

Just remember that msconfig.txt is not designed to be edited directly and modifying them manually may not work to do what you want.
Post Reply