Mail::...MEEval(3pm)
β¨ NAME β¨
Mail::SpamAssassin::Plugin::MIMEEval β it runs a whole bunch of vibe checks π against your MIME structure and the body of the mail, bestie. Like, it's a Perl plugin from the User Contributed Perl Documentation crew, and it's lowkey iconic.
πΈ SYNOPSIS πΈ
loadplugin Mail::SpamAssassin::Plugin::MIMEEval
body NAME_OF_RULE eval:check_for_mime
body NAME_OF_RULE eval:check_for_mime_html
body NAME_OF_RULE eval:check_for_mime_html_only
body NAME_OF_RULE eval:check_mime_multipart_ratio
body NAME_OF_RULE eval:check_msg_parse_flags
body NAME_OF_RULE eval:check_for_ascii_text_illegal
body NAME_OF_RULE eval:check_abundant_unicode_ratio
body NAME_OF_RULE eval:check_for_faraway_charset
body NAME_OF_RULE eval:check_for_uppercase
body NAME_OF_RULE eval:check_ma_non_text
body NAME_OF_RULE eval:check_base64_length
body NAME_OF_RULE eval:check_qp_ratio
π DESCRIPTION π
So basically: it does a bunch of tests against the MIME structure and the body. That's the whole gig. Periodt.
π has_check_for_ascii_text_illegal
Adds a capability check for if can() for check_for_ascii_text_illegal, iykyk.
π check_for_ascii_text_illegal
Okay so here's the tea π΅: if a MIME part claims to be text/plain or text/plain;charset=us-ascii and the Content-Transfer-Encoding is 7bit β whether it said that out loud or just let it default β then we should enforce that the actual text is literally only TAB, NL, SPACE through TILDE. That means all the 7bit characters, excluding NO-WS-CTL (per RFC-2822).
All mainstream MTA's get this right. Like, all of them. No notes. π
π has_check_abundant_unicode_ratio
Adds a capability check for if can() for check_abundant_unicode_ratio, bestie.
π check_abundant_unicode_ratio
A MIME part claiming to be text/plain that's got Unicode characters in it has to be encoded as quoted-printable or base64, or it has to use UTF data coding (typically with 8bit encoding). It's giving rules are rules. π¨
And here's the catch: any message in 7bit or 8bit encoding that contains (HTML) Unicode entities will not render them as Unicode β it'll render them literally. Not it being decorative at all. π
So yeah, a few of those sequences might pop up on a mailing list where developers are out here discussing such characters, totally innocent. But a message with a high density of them? That's likely spam, fr fr.
π check_for_mime
Check for various MIME properties. Cute, versatile, main character energy.
Use it in rules like this:
rawbody MIME_BASE64 eval:check_for_mime('mime_base64_count')
describe MIME_BASE64 Includes a base64 attachment
And here's the full roster of what it's checking for π«Ά:
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
Checks for messages that contain only text/html body parts. That's it, that's the whole thing π
π has_check_qp_ratio
Adds a capability check for if can() for check_qp_ratio. Yes queen, consistency. β¨
π check_qp_ratio
Takes a min ratio to use in eval, to see if there's any spamminess to the ratio of quoted printable to total bytes in an email. Obsessed with the math honestly. π
okay bestie, you're fully caught up π go forth and MIME-eval, no cap π§
That was the whole page, love u! π This lil number comes from perl v5.40.1, dated 2026-07-23, and it lives under the name Mail::...MEEval(3pm) β slay, bye! πβ¨
π¦ where this page comes from
- ubuntu stonking: spamassassin 4.0.2+svn1935691-1build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms