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::DKIMafter 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 $pathand reads the whole reply. Optional:sock(Unix socket path orhost:port, default$ClamdSock),path(default$CWD/Work),timeout(default 30),name(defaultclamd).clamd opens
$pathon its own filesystem, so this only works when clamd runs on the same host as MIMEDefang; usemd_async_check_clamdscanfor a remote clamd. Interpret the result withmd_async_interpret_clamav()from Mail::MIMEDefang::Async::Results, or withMail::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 toclamd.conf, default$Features{'Path:CLAMDCONF'}),path(default$CWD/Work),timeout(default 60),name(defaultclamdscan).Dies if clamdscan is not installed. The result is a hashref with
stdout,stderrandexit_code;md_async_interpret_clamav()understands it. -
md_async_check_spamc(%args)
Build a spamd socket check that sends the message (
./INPUTMSG, with the synthesizedReturn-Path,Receivedand optionalApparently-Toheaders) using the SPAMCCHECKcommand. Optional:host(default127.0.0.1),port(default 783),user(default current user),timeout(default 30),name(defaultspamc).Dies if
./INPUTMSGcannot be read. Interpret the result withmd_async_interpret_spamassassin(). -
md_async_check_rspamd(%args)
Build an Rspamd socket check that POSTs
./INPUTMSGto$uri/checkv2over HTTP/1.0. Optional:uri(defaulthttp://127.0.0.1:11333),timeout(default 30),name(defaultrspamd).Dies if
./INPUTMSGcannot be read. The result is the raw HTTP response; the JSON body follows the first blank line.