I’m getting a fair amount of Spam where the To, From, and Subject lines have 
been unnecessarily encoded using QP even though they’re all ASCII.

This is a violation of RFC-2822 and Postel’s Law, and a characteristic of Spam 
more often than Ham (where legitimate MUA’s attempt to use the least complex 
encoding suitable in the interests of interoperability).

header __L_SUBJECT_QP_ENCODED   Subject:raw =~ /^ ?=\?(utf|UTF)-8\?Q\?/
header __L_SUBJECT_ASCII_ONLY   Subject =~ /^[[:print:]]*$/a

header __L_FROM_QP_ENCODED      From:raw =~ /^ ?=\?(utf|UTF)-8\?Q\?/
header __L_FROM_ASCII_ONLY      From =~ /^[[:print:]]*$/a

header __L_TO_QP_ENCODED        To:raw =~ /^ ?=\?(utf|UTF)-8\?Q\?/
header __L_TO_ASCII_ONLY        To =~ /^[[:print:]]*$/a

meta L_UNNECESSARY_QUOTING      (__L_SUBJECT_QP_ENCODED && 
__L_SUBJECT_ASCII_ONLY || __L_FROM_QP_ENCODED && __L_FROM_ASCII_ONLY || 
__L_TO_QP_ENCODED && __L_TO_ASCII_ONLY)
describe L_UNNECESSARY_QUOTING  Header lines have unnecessary Quoted-Printable 
encoding
score L_UNNECESSARY_QUOTING     20.0


Anyone want to sandbox this and see how it performs on a larger sample size?

We’ve been using it but it gets FP’s with GreenArrow Studio and Mailchimp, so 
we’ve had to whitelist those campaign mailers… they’ve been made aware of the 
issue.

Thanks

Reply via email to