Mail::...tispam(3)
π Mail::MIMEDefang::Antispam π
okay bestie, welcome to Mail::MIMEDefang::Antispam(3) β the antispam corner of the MIMEDefang docs, and honestly? it's giving tiny but powerful. π¦
β¨ NAME β¨
Mail::MIMEDefang::Antispam β the antispam-related methods for your email filters, no cap. π
πΈ DESCRIPTION πΈ
so basically, Mail::MIMEDefang::Antispam is a little collection of methods you can call from mimedefang-filter to run your email messages through antispam software and see what's up. that's the whole vibe. π
π METHODS π
spam_assassin_is_spam π₯
scans a message with SpamAssassin and returns True if the email got flagged as spam. simple. iconic. one job, does it. β¨
spam_assassin_check π
scans a message with SpamAssassin and hands you back an array of four elements, in this exact order:
- the weight of the message (
'hits') - the number of hits required before SA considers a message spam
- a comma separated list of symbolic test names that were triggered
- a
'report'string, detailing the tests that failed and their weights
spam_assassin_status π«Ά
scans a message with SpamAssassin and returns a Mail::SpamAssassin:PerMsgStatus object.
heads up bestie β you, the caller, are responsible for calling the finish method. that's on you, not on this sub. don't leave it hanging. π
spam_assassin_init β
initializes Apache SpamAssassin and returns a Mail::SpamAssassin object. that's it, that's the sub. π
spam_assassin_mail π§
calls SpamAssassin and returns a Mail::SpamAssassin::Message object. cute little message object for you. π
md_spamc_init π
initializes Apache SpamAssassin and returns a Mail::SpamAssassin::Client object.
real talk:md_spamc_initandmd_spamc_checkshould be used only with Apache SpamAssassin starting from version 4.0.1. don't come for me, that's just the rule. π
the sub returns a Mail::SpamAssassin::Client object.
optional parameters, in case you wanna get fancy:
- the SpamAssassin host
- the SpamAssassin port
- the username to pass to the SpamAssassin server
- the maximum size of the email message
md_spamc_check π
scans the message using the SpamAssassin Perl client and returns an array of four elements:
- the weight of the message (
'score') - the number of hits required before Apache SpamAssassin considers a message spam
- a
'report'string, detailing the tests that failed and their weights - a flag explaining if the email is a spam message or not (
true/false)
required parameter: a Mail::SpamAssassin::Client object initialized by calling the md_spamc_init sub. gotta have it, no shortcuts. π
rspamd_check π
scans the message using Rspamd and returns an array of six elements:
- the weight of the message (
'hits') - the number of hits required before Rspamd considers a message spam
- a comma separated list of symbolic test names that were triggered
- a
'report'string, detailing the tests that failed and their weights β or a Json report if the JSON and LWP modules are present - an action that should be applied to the email
- a flag explaining if the email is a spam message or not (
true/false)
you can also pass an optional rspamd url to the method, and its default value is:
http://127.0.0.1:11333
and that's the whole page, bestie!! go forth and filter those spams, you absolute main character. π
this was version 3.7.1, dated 2026-07-20, straight out of the Mail::MIMEDefang::Antispam documentation β mwah, bye!! πβ¨π¦
π¦ where this page comes from
- fedora 43: mimedefang 3.7.1-1.fc43 Β· GPL-2.0-only AND GPL-2.0-or-later
- fedora 44: mimedefang 3.7.1-1.fc44 Β· GPL-2.0-only AND GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms