Page 1 of 1

Only send spam notifications to specific domain

Posted: 04 Dec 2024 13:55
by ENFRXB
We recently had an issue with user sending a mass email that was marked as spam. This caused all the recipients to receive the "Spam not delivered" message.

Is there a way to set a rule to send the spam notifications only to a specific recipient domain? We only want for our users to receive these notifications.

Re: Only send spam notifications to specific domain

Posted: 05 Dec 2024 13:13
by shawniverson
Yes, you can. What you need is a ruleset.

Create a new file in /etc/MailScanner/rules such as spamactions.rules

Define your rules in the file, using tabs to separate fields. Be sure to look at your Spam Actions setting in MailScanner.conf to see what parameters you are using in case you need to put them in the ruleset. For example, you might have custom(spam) instead of notify, depending on your configuration.

Code: Select all

To:          example.org     store notify
FromOrTo:    default         store
Set Spam Actions in /etc/MailScanner/MailScanner.conf:

Code: Select all

Spam Actions = %rules-dir%/spamactions.rules