I just put this into service. I'm white-listing mailing lists. Most go to their own folder via procmail filtering, and unrecognized ones go to the folder Lists/Unknown until I write a procmail rule. But this rule should catch lazy abusers. After a bit more experience I'll crank up the punishment score for those.

header   __KP_LIST_ID_DOMAIN_IN_BRACKETS List-id =~ /<([\w-]+)?(\.[\w-]+)+>/

describe KP_LIST_ID_DOMAIN_IN_BRACKETS List-id has domain in angle brackets
meta     KP_LIST_ID_DOMAIN_IN_BRACKETS __KP_LIST_ID_DOMAIN_IN_BRACKETS
score    KP_LIST_ID_DOMAIN_IN_BRACKETS -15.0

describe KP_LIST_ID_IMPROPER_FORMAT List-id has improper format
meta KP_LIST_ID_IMPROPER_FORMAT __HAS_LIST_ID && !__KP_LIST_ID_DOMAIN_IN_BRACKETS
score    KP_LIST_ID_IMPROPER_FORMAT 0.1

Reply via email to