Re: DMARC without libspf2

Niklas Schell via Exim-users <[email protected]>
Newsgroups gmane.mail.exim.user
Message-ID <136-68837780-1-73f2a580@196402037>
Hello,

> If spfquery.pl is called from ${run..}, there is no need to dive into
> perl driver module. Passing some variable(s) to SPF or DMARC modules
> should be sufficient.

I'm currently running exim version 4.97 on Ubuntu 24.04. (No built-in SPF and DMARC support - without compiling from source.)
Since SPF and DMARC are not available here, I'm trying to implement them with external scripts.

--- for SPF I've set:

(acl_smtp_rcpt):

  warn
    set acl_m_spf_result = ${run{/usr/bin/spfquery.mail-spf-perl --ip ${quote:$sender_host_address} --scope mfrom --identity ${quote:$sender_address}}}
    set acl_m_spf_rc = $runrc
    # testing:
    logwrite    = SPF Result: $acl_m_spf_result rc: $acl_m_spf_rc sender_host_address: ${quote:$sender_host_address} sender_address: ${quote:$sender_address}

  ...
---

The result in the exim log is:

SPF Result:  rc: 255 sender_host_address: "2a00:a::2" sender_address: "[email protected]"

Calling the perl script manually in bash returns an rc code of 1 (as expected):

/usr/bin/spfquery.mail-spf-perl --ip "2a00:a::2" --scope mfrom --identity "[email protected]"; echo $?

Am I missing something here? Why does exim get a result code of 255 instead of 1?

> BTW, DMARC can also be implemented externally.

As for DMARC I'm unable to find any examples for an external implementation.
Could someone send me a working snippet for SPF, (DKIM) and DMARC or any helpful resources as the exim documentation only contains examples for the build-in functions.


-- 
Thanks in advance,
Niklas Schell


-- 
## subscription configuration (requires account):
##   https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
##   [email protected]
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.