[Resolved]: Spam High Rules, Fwd. To Multiple Email Addresses

Discuss our MailScanner install script and MailScanner itself
Post Reply
Firewalls4Life
Junior Member
Posts: 73
Joined: 21 Nov 2011, 18:43

[Resolved]: Spam High Rules, Fwd. To Multiple Email Addresses

Post by Firewalls4Life »

I have checked the documentation in the User Guide PDF as well as the Command Index, but there is no clarification as to if multiple email addresses can be used in the actions rule.
Does anyone have any information as to if this is supported, and how so?


Here is what I'm attempting, but I'm not sure that it is working or officially supported.

In the file at:

Code: Select all

/usr/mailscanner/etc/rules/spamhigh.action.rules

I have a rule written as such:

Code: Select all

To:     *@MyDomainName.com  store   deliver attachment      forward submit.spam@spam.spamcop.net        forward is-spam@labs.sophos.com

Is this the correct way to do it? Does anyone else have any examples of a rule that sends "spam high" to two different email addresses?
Last edited by Firewalls4Life on 10 Dec 2018, 17:08, edited 1 time in total.
Firewalls4Life
Junior Member
Posts: 73
Joined: 21 Nov 2011, 18:43

Re: Spam High Rules, Fwd. To Multiple Email Addresses

Post by Firewalls4Life »

I found the solution:

Code: Select all

To:     *@MyDomainName.com     store   deliver attachment      forward submit.spam@spam.spamcop.net is-spam@labs.sophos.com

Note how there is no additional command between the two addresses, since the second address is being commanded already by the "attachment forward" command. You simply place a space between the 1st and 2nd address where you want the attachment forwarded.
Firewalls4Life
Junior Member
Posts: 73
Joined: 21 Nov 2011, 18:43

Re: [Resolved]: Spam High Rules, Fwd. To Multiple Email Addresses

Post by Firewalls4Life »

I should note that I found that changes made directly to this file were not retained. To make changes to a specific domain's rules, you must open MSFE and go to Modify User Settings: [domain name] > Other Settings > Additional email address to list for forwarding spam. This field is where you can put the additional command sets that will be compiled into the actions file.

To remove the individualized domain name settings, removing them in the UI is not sufficient. You must also remove the .mailscanner* files in the users home directory. If the user's home directory were /home/user_5/, you would need to remove any hidden ".mailscanner"* files contained in that directory. Once this is done, then MailScanner will apply the global settings at the next rebuild. You can manually rebuild it faster by clicking


If you want to create action commands that are applied to ALL domains, then go to

MSFE > Front End Configuration > "Default action for high scoring spam...", enter the command you want applied to ALL domain names by default. This will apply by default, but individualized per-domain settings will take precedence.

Enter your commands such as:

Code: Select all

deliver attachment forward submit.spam@spam.spamcop.net is-spam@labs.sophos.com abuse@spfbl.net
The above would deliver the spam to the original recipient, then convert it to an attachment, and forward the attachment to the 3 email addresses seen above.
Post Reply