5

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

much thanks

john

Coltrane58
  • 151
  • 1
  • 2

1 Answers1

9

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 someone@totally-legit-foo.com.

Conor McDermottroe
  • 938
  • 1
  • 7
  • 17