MAIL::MIMEDEFANG::ASYNC::RESULTS(3)

πŸ“¦
version 3.7.1 Β· 3 versions
, in fedora 43, fedora 44

✨ NAME ✨

Mail::MIMEDefang::Async::Results β€” bestie, this is the module that Interprets async check output for MIMEDefang. That's the whole job. She reads, she translates, she tells you what to do. πŸ’…


🌸 DESCRIPTION 🌸

okay so picture this: md_async_run_checks() has just dumped a whole pile of raw, unhinged output on your doorstep. Mail::MIMEDefang::Async::Results is the friend who picks it up, reads it, and turns it into actionable filter decisions β€” that's reject, tempfail, score, and pass. Raw chaos in, clean vibes out. No cap. πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

use Mail::MIMEDefang::Async::Results;

my $dnsbl = md_async_interpret_dnsbl(
    records => $result->{results}{zen},
    zone    => 'zen.spamhaus.org',
    error   => $result->{errors}{zen},
);

my $score = md_async_score_results(
    interpreted => { zen => $dnsbl },
    reject_at   => 5.0,
);

if ($score->{action} eq 'REJECT') {
    return action_bounce("550 5.7.1 " . $score->{reasons}[0]);
}

πŸ’– METHODS πŸ’–

  • md_async_interpret_dnsbl(%args) β€” reads a DNSBL result and tells you what's up. Args: records (an arrayref, or undef, we don't judge), zone, and error. Hands you back a hashref with the keys listed, code, reason, and sometimes error if there was one. πŸ‘‘
  • md_async_interpret_spamassassin(%args) β€” parses a raw SPAMC protocol response, because that thing is not self-explanatory. Args: raw, error, threshold (defaults to 5.0). Returns is_spam, score, threshold, symbols, and reason. Slay.
  • md_async_interpret_clamav(%args) β€” takes a clamd PING or INSTREAM response and translates it. Args: raw, error. Returns available, virus, name, reason. 🦠
  • md_async_interpret_rdns(%args) β€” interprets a PTR record result. Args: records, error, ip. Returns has_rdns, ptr, dynamic, reason. reverse DNS detective work fr fr πŸ”
  • md_async_interpret_spf_txt(%args) β€” checks whether a TXT record lookup actually came back with an SPF record. Args: records, error, domain. Returns has_spf, record, reason. πŸ“§
  • md_async_interpret_dmarc($raw) β€” parses a raw DMARC TXT policy string (the kind you get back from md_async_dmarc_verify() or from the records of md_async_check_dmarc_record()).

Returns a hashref with these keys: has_dmarc, policy, subdomain_policy, pct, rua, ruf, adkim, aspf, reason. that's a lot of keys bestie, but she holds them all πŸ’œ

  • md_async_score_results(%args) β€” the main character moment: tallies up all your individual interpreted check results into one weighted spam score. Args: interpreted (a hashref of name β†’ interp result), weights (optional override, if you're feeling spicy), reject_at (default 8.0), and tempfail_at (default 12.0).

Returns { score, action, reasons }, where action is one of 'PASS', 'REJECT', or 'TEMPFAIL'. periodt. πŸ’…


🌈 SEE ALSO 🌈

  • Mail::MIMEDefang::Async
  • Mail::MIMEDefang::Async::Checks

go read those too, iykyk 🫢


version 3.7.1, dated 2026-07-20 β€” that's a wrap bestie, thanks for reading, mwah πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from