Re: DMARC without libspf2

Evgeniy Berdnikov via Exim-users <[email protected]>
Newsgroups gmane.mail.exim.user
Message-ID <[email protected]>
Fri, Jul 25, 2025 at 02:25:22PM +0200, Niklas Schell via Exim-users wrote:
> --- 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]"

 Status 255 means that spfquery was called with invalid parameter string.
 Explanation text is written by spfquery to stderr, but stderr is not
 catched by ${run{..}}. To get this output, wrap spfquery call with
 shell redirection of fd=2:

   ${run{/bin/sh -c '2>/tmp/spfquery.log /usr/bin/spfquery ...'}}

 Or use strace:
 
   ${run{/usr/bin/strace -s200 -o /tmp/spfquery.trace /usr/bin/spfquery ...'}}

 Probably you have some special symbols (such as "invisible space") in
 exim's config, and these symbols are passed to {$run{..}}.
-- 
 Eugene Berdnikov

-- 
## 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.