Autor: Sebastian Schweizer Data: A: exim-users Assumpte: [exim] Pass information from data acl to spamassassin
Hello,
I've configured exim to verify dkim signatures and check for dmarc
alignment. (The latter one is done via a ${run...} call of a perl script
using Mail::DMARC).
After that, an add_header command is used to insert an
Authentication-Results: header to the message. This works really nice :)
After insertion of this header exim calls spamassassin. I tried to do
something with "dmarc=fail" from the Authentication-Results header in
spamassassin, but indeed it is not part of the message due to exims
limitation, see doc chapter 42.24: > Added header lines are accumulated during the MAIL, RCPT, and predata
> ACLs. They are added to the message before processing the DATA and
> MIME ACLs. [...] Further header lines may be accumulated during the
> DATA and MIME ACLs, after which they are added to the message, again
> with duplicates suppressed. [...] Header lines are not visible in
> string expansions of message headers until they are added to the
> message. It follows that header lines defined in the MAIL, RCPT, and
> predata ACLs are not visible until the DATA ACL and MIME ACLs are
> run. Similarly, header lines that are added by the DATA or MIME ACLs
> are not visible in those ACLs. Because of this restriction, you
> cannot use header lines as a way of passing data between (for
> example) the MAIL and RCPT ACLs. If you want to do this, you can use
> ACL variables, as described in section 42.19.
Is there any way to pass a string from the data acl to spamassassin?
Adding headers does not work, see above. And I cannot add the header in
an earlier acl, because evaluation of dmarc is not possible without dkim
and message header information.
Ideas that come into mind are of course the acl_m* variables - but how
can I access them from spamassassin? Or can I do something with
environment variables?
With a solution to this problem one could also tweak the dkim module in
spamassassin to reuse the information in Authentication-Results (like
the spf module does with Received-SPF header) to minimize dns queries.
If nothing works there is still this ugly "workaround" to let exim
modify the data in $spam_score, $spam_bar and $spam_report before
putting it into the X-Spam-* headers - but this is really ugly when you
want to generate the new spam bar.