Documentation

NAME

Mail::MIMEDefang::Async::Checks - Pre-built check descriptors for Mail::MIMEDefang::Async

DESCRIPTION

Each function returns a check-hashref suitable for passing to md_async_run_checks(). Mix and match to build the checks your filter needs.

METHODS

  • md_async_check_dnsbl(%args)

    Build a DNSBL A-record lookup check. Required args: ip, zone. Optional: name, timeout.

  • md_async_check_spf_record(%args)

    Build an SPF TXT-record lookup check. Required: domain.

  • md_async_check_mx_exists(%args)

    Build an MX-record existence check. Domains with no MX are often forged. Required: domain.

  • md_async_check_rdns(%args)

    Build a reverse-DNS (PTR) lookup check. Required: ip.

  • md_async_check_dkim_record(%args)

    Build an async lookup for a DKIM public-key TXT record at $selector._domainkey.$domain. Required: selector, domain.

    The result is the raw TXT record string. Signature evaluation still happens synchronously via Mail::DKIM after the key is fetched.

  • md_async_check_dmarc_record(%args)

    Build an async lookup for the DMARC TXT record at _dmarc.$domain. Required: domain.

    Use md_async_interpret_dmarc() from Mail::MIMEDefang::Async::Results to parse the result.

  • md_async_check_clamd(%args)

    Build a clamd socket check that sends nSCAN $path and reads the whole reply. Optional: sock (Unix socket path or host:port, default $ClamdSock), path (default $CWD/Work), timeout (default 30), name (default clamd).

    clamd opens $path on its own filesystem, so this only works when clamd runs on the same host as MIMEDefang; use md_async_check_clamdscan for a remote clamd. Interpret the result with md_async_interpret_clamav() from Mail::MIMEDefang::Async::Results, or with Mail::MIMEDefang::Antivirus::ClamAV::clamd_interpret_reply() to get the standard virus-scanner triplet.

  • md_async_check_clamdscan(%args)

    Build a process check that runs clamdscan --stream, which streams the files to clamd (INSTREAM) and so works with a local or a remote clamd. Optional: conf (path to clamd.conf, default $Features{'Path:CLAMDCONF'}), path (default $CWD/Work), timeout (default 60), name (default clamdscan).

    Dies if clamdscan is not installed. The result is a hashref with stdout, stderr and exit_code; md_async_interpret_clamav() understands it.

  • md_async_check_spamc(%args)

    Build a spamd socket check that sends the message (./INPUTMSG, with the synthesized Return-Path, Received and optional Apparently-To headers) using the SPAMC CHECK command. Optional: host (default 127.0.0.1), port (default 783), user (default current user), timeout (default 30), name (default spamc).

    Dies if ./INPUTMSG cannot be read. Interpret the result with md_async_interpret_spamassassin().

  • md_async_check_rspamd(%args)

    Build an Rspamd socket check that POSTs ./INPUTMSG to $uri/checkv2 over HTTP/1.0. Optional: uri (default http://127.0.0.1:11333), timeout (default 30), name (default rspamd).

    Dies if ./INPUTMSG cannot be read. The result is the raw HTTP response; the JSON body follows the first blank line.

SEE ALSO

Mail::MIMEDefang::Async, Mail::MIMEDefang::Async::Results