I think I have found a fix for this issue.

My hunch is there is something buggy about the run{} command when
invoking programs directly. I wrapped the contents of run with an
explicit shell invocation, e.g.

    condition = ${run{/usr/bin/spfquery.mail-spf-perl \                         
    
                   --ip ${quote:$sender_host_address} \                         
 
                   --scope mfrom \                                              
 
                   --identity ${quote:$sender_address}} \                       
 
                   {no}{${if eq {$runrc}{1}{yes}{no}}}}                         
 

now becomes

    condition = ${run{/bin/bash -c "/usr/bin/spfquery.mail-spf-perl \
                   --ip ${quote:$sender_host_address} \
                   --scope mfrom \
                   --identity ${quote:$sender_address}"} \
                   {no}{${if eq {$runrc}{1}{yes}{no}}}}

Dominic, are you still using mantic or are you on noble by now? I'd be
glad to prepare a package for you to test if you are comfortable with
that. Alternatively you can test the changes I mentioned here. This code
is found in /etc/exim4/exim4.conf.template but of course be careful if
you are modifying this file on a live system.

I've tested this code change with a valid E2E case with SPF, and I also
tested a local lxc system with no SPF to ensure SPF validation failures
occur correctly.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2056372

Title:
  Enabling SPF checks with CHECK_RCPT_SPF doesn't work

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/exim4/+bug/2056372/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to