NAME¶
Mail::SpamAssassin::Plugin::MIMEEval - perform MIME sanity tests of messages
SYNOPSIS¶
loadplugin Mail::SpamAssassin::Plugin::MIMEEval
body MULTIPART_ALT_NON_TEXT eval:check_ma_non_text()
body MIME_HTML_ONLY eval:check_for_mime_html_only()
describe MIME_HTML_ONLY Message only has text/html MIME parts
DESCRIPTION¶
Utility functions for examining various MIME encoded message components.
- has_check_for_ascii_text_illegal
- Adds capability check for "if can()" for
check_for_ascii_text_illegal
- check_for_ascii_text_illegal
- If a MIME part claims to be text/plain or text/plain;charset=us-ascii and
the Content-Transfer-Encoding is 7bit (either explicitly or by default),
then we should enforce the actual text being only TAB, NL, SPACE through
TILDE, i.e. all 7bit characters excluding NO-WS-CTL (per RFC-2822).
All mainstream MTA's get this right.
- has_check_abundant_unicode_ratio
- Adds capability check for "if can()" for
check_abundant_unicode_ratio
- check_abundant_unicode_ratio
- A MIME part claiming to be text/plain and containing Unicode characters
must be encoded as quoted-printable or base64, or use UTF data coding
(typically with 8bit encoding). Any message in 7bit or 8bit encoding
containing (HTML) Unicode entities will not render them as Unicode, but
literally.
Thus a few such sequences might occur on a mailing list of developers
discussing such characters, but a message with a high density of such
characters is likely spam.
- check_for_mime
- Check for various MIME properties.
Use in rules such as:
rawbody MIME_BASE64_BLANKS eval:check_for_mime('mime_base64_blanks')
describe MIME_BASE64_BLANKS Extra blank lines in base64 encoding
mime_base64_count
mime_base64_encoded_text
mime_body_html_count
mime_body_text_count
mime_faraway_charset
mime_missing_boundary
mime_multipart_alternative
mime_multipart_ratio
mime_qp_count
mime_qp_long_line
mime_qp_ratio
mime_ascii_text_illegal
mime_text_unicode_ratio
- check_for_mime_html_only
- Check for messages containing only text/html body parts
- has_check_qp_ratio
- Adds capability check for "if can()" for
check_qp_ratio
- check_qp_ratio
- Takes a min ratio to use in eval to see if there is an spamminess to the
ratio of quoted printable to total bytes in an email.