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.
Only send spam notifications to specific domain
- shawniverson
- Posts: 3780
- Joined: 13 Jan 2014 23:30
- Location: Indianapolis, Indiana USA
- Contact:
Re: Only send spam notifications to specific domain
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.
Set Spam Actions in /etc/MailScanner/MailScanner.conf:
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
Code: Select all
Spam Actions = %rules-dir%/spamactions.rules