| header __L_CTE_7BIT Content-Transfer-Encoding =~ /^7bit$/ |
| header __L_CTE_8BIT Content-Transfer-Encoding =~ /^8bit$/ |
| |
| # can't use BODY_8BITS here, unfortunately, because it requires 8 consecutive |
| # high-bit characters. |
| rawbody __L_BODY_8BITS /[\x80-\xff]/ |
| |
| # if the message claims to be text/plain, and there's no CTE (defaulting to |
| # '7bit') or the CTE is explicitly '7bit', then there should be no 8-bit |
| # characters in the message body. |
| meta CTE_8BIT_MISMATCH (__CT_TEXT_PLAIN && (!__CTE || __L_CTE_7BIT) && __L_BODY_8BITS) |
| describe CTE_8BIT_MISMATCH Header says 7bits but body disagrees |
| score CTE_8BIT_MISMATCH 1 |
| tflags CTE_8BIT_MISMATCH publish |