Skip to main content


ec_dkim_domains — Return a list of valid signing domains




ec_dkim_domains returns a stringlist of the domain portion of the identities which had valid DKIM signatures for the current message. Note that since DKIM allows for third party signatures, one should check that there is a valid signature relating to the 'responsible domain' of the message, which is provided by the ec_dkim_responsible_domain extension.


This feature requires the DKIM module. See “dkim – DomainKeys Identified Mail Signatures” for more information.

$responsible = ec_dkim_responsible_domain;
$domains = ec_dkim_domains;
if ec_test :is $domains $responsible {
  ec_log "Valid DKIM signature found";
else {
  ec_log "No valid DKIM signature found";
Was this page helpful?