SpamAssassin rules to block null envelope sender which has an List-Unsubscribe header


Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"


Top Level » Email » Spam

SpamAssassin rules to block null envelope sender which has an List-Unsubscribe headerLast Modified: Aug 8, 2019, 5:06 pm
If you're getting spam from a <> sender (null envelope), and it also has a List-Unsubscribe header, SpamAssassin can be used to create a rule to block it.  Edit your ~/.spamassassin/user_prefs file, and add the following to the bottom:

header  RETURNPATH_EMPTY        ALL =~ /.*?^Return-Path:s*<>.*/ism
score   RETURNPATH_EMPTY        0.0
header  LIST_UNSUBSCRIBE        List-Unsubscribe =~ /b.{3}b/i
score   LIST_UNSUBSCRIBE        0.0
meta    RETURNPATHSPAM          (RETURNPATH_EMPTY && LIST_UNSUBSCRIBE)
score   RETURNPATHSPAM          10.0

© 2018 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST