how to specify a partial domain in blacklist with SpamAssassin

is there a way to specify a partial domain in the spamassassin blacklist? I get spam from something like [email protected] but I also get junk from [email protected]. if I specify @.xyz will that take care of both addresses or must I specify @.*xyz and @.xyz?

much thanks

john


Solution 1:

The SpamAssassin whitelist and blacklist options can include globs, not regular expressions. The valid metacharacters are ? and * to match 0-1 or 0-many characters respectively. This is the same as a shell glob.

To blacklist mail from foo.com and *.foo.com the following should work:

blacklist_from *@foo.com
blacklist_from *.foo.com

Don't be tempted to blacklist *foo.com, lest you inadvertently block [email protected].