Re: DMARC with amavis+spamassassin

Damian <[email protected]> Tue, 23 Dec 2025 10:52:26 +0100
Newsgroups gmane.mail.virus.amavis.user
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------00qmeNMjw2MtCR3bzNmAnm0E
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

> $enable_dkim_verification = 1
>
> DMARC plugin is also apparently enabled as well as SPF and DKIM 
> plugins and I see hits for SPF and DKIM rules in the X-Spam-Status 
> header of incoming emails.
There are no DMARC and SPF plugins in Amavis. SpamAssassin has its own 
SPF, DKIM and DMARC plugins, and their results are exposed as spam rule 
hits. Those rule hits are available in Amavis but not treated in a 
relevant way.
> If I want to add DMARC validation. Can that only be done by adding an 
> external checker like openDMARC?

Technically no, practically mostly yes.

Amavis doesn't implement SPF or DMARC validation, so one cannot just 
configure things. However, Amavis exposes a form of software interface 
[1], and it is possible to use this interface to implement own 
validation routines. It should even be possible to do things based on 
SpamAssassins DMARC_* rule hits if this is good enough for you.

[1] https://gitlab.com/amavis/amavis/-/blob/master/conf/amavisd-custom.conf

--------------00qmeNMjw2MtCR3bzNmAnm0E
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DUTF=
-8">
  </head>
  <body>
    <blockquote type=3D"cite"
      cite=3D"mid:[email protected]">$e=
nable_dkim_verification
      =3D 1
      <br>
      <br>
      DMARC plugin is also apparently enabled as well as SPF and DKIM
      plugins and I see hits for SPF and DKIM rules in the X-Spam-Status
      header of incoming emails.=C2=A0<br>
    </blockquote>
    There are no DMARC and SPF plugins in Amavis. SpamAssassin has its
    own SPF, DKIM and DMARC plugins, and their results are exposed as
    spam rule hits. Those rule hits are available in Amavis but not
    treated in a relevant way.
    <blockquote type=3D"cite"
      cite=3D"mid:[email protected]">If
      I want to add DMARC validation. Can that only be done by adding an
      external checker like openDMARC?<br>
    </blockquote>
    <p>Technically no, practically mostly yes.</p>
    <p>Amavis doesn't implement SPF or DMARC validation, so one cannot
      just configure things. However, Amavis exposes a form of software
      interface [1], and it is possible to use this interface to
      implement own validation routines. It should even be possible to
      do things based on SpamAssassins DMARC_* rule hits if this is good
      enough for you.</p>
    <p>[1]
      <a class=3D"moz-txt-link-freetext" href=3D"https://gitlab.com/amavi=
s/amavis/-/blob/master/conf/amavisd-custom.conf">https://gitlab.com/amavi=
s/amavis/-/blob/master/conf/amavisd-custom.conf</a></p>
  </body>
</html>

--------------00qmeNMjw2MtCR3bzNmAnm0E--