An DMARC implementation written in HSL
Follow the instructions in our manual to add our package repository and then run the below command.
apt-get install halon-extras-dmarc
yum install halon-extras-dmarc
These functions needs to be imported from the extras://dmarc
module path.
Params
- fp
File
- the mail file - senderip
string
- the sender's IP - senderhelo
string
- the sender's HELO - senderdomain
string
- the sender's domain
Example (EOD)
import { dmarc } from "extras://dmarc";
$result = dmarc($arguments["mail"], $connection["remoteip"], $connection["helo"]["host"], $transaction["senderaddress"]["domain"]);
Returns
The dmarc functions returns an array of values, it will always contain a result
property. Depending on where the DMARC validation fail, other fields may also be populated. result
property may contain the following results (with recommended actions).
permerror
(reject)temperror
(defer)policy_absent
(accept)reject
(reject)quarantine
(quarantine/reject)none
(accept)pass
(accept)
Other properties are (not always available)
reason
(string) textual reason why the result was givenfrom
(string) the message from header usedpdomain
(string) the policy domain used (may be other than from)spf
(array) spf_query() result objectdkim
(array) array of MailMessage.verifyDKIM resultsdmarc
(array) DMARC recordpct-selected
(boolean) if the policy action was choose based on pctspf_align
("pass", "fail", "unaligned")dkim_align
("pass", "fail", "unaligned")policy
(string) the tag-p policy used