MBF Knowledge Base

How do I block all incoming e-mail from a domain name or e-mail address in SpamAssassin?

At times, you may want to block all incoming e-mail from a domain name or e-mail address. With the option ‘blacklist_from‘ in SpamAssassin this is a very simple and useful task.

Locate your SpamAssassin configuration file and open it with your text editor:

# find /etc -name local.cf

Simply add the following line to block all incoming e-mail from @example.com:

blacklist_from *@example.com

Save your configuration file and restart SpamAssassin:

# /etc/init.d/spamassassin restart