Public bug reported:
/etc/exim4/conf.d/acl/30_exim4-config_check_rcpt installed by
exim4-config.
Line 289: --identity ${quote:$sender_address}} \
This puts "" around the email address and the IP address and then Exim
itself puts '' around each parameter so the email_address becomes
'"[email protected]"'. This causes spfquery to fail.
You can verify this with:
$ '/usr/bin/spfquery.mail-spf-perl' '--ip' '"1.1.1.1"' '--identity'
'"[email protected]"'
Corrected:
$ '/usr/bin/spfquery.mail-spf-perl' '--ip' '1.1.1.1' '--identity'
'[email protected]'
For best effect, use a valid email address.
Fix (remove the ${quote: functions):
condition = ${run{/usr/bin/spfquery.mail-spf-perl \
--ip $sender_host_address \
--scope mfrom \
--identity $sender_address} \
{no}{${if eq {$runrc}{1}{yes}{no}}}}
If you use a static exim4.conf, this ACL will surface the issue:
warn condition = ${run{/usr/bin/spfquery.mail-spf-perl --ip
$sender_host_address --identity $sender_address}{yes}{yes}}
logwrite = Output of spfquery: $value rc: $runrc
Test with:
$ exim4 -d -bhc 1.1.1.1
helo me
mail from:[email protected]
rcpt to:[email protected]
(scroll back up until you find the result of the command expansion and
the logwrite)
Docs:
https://www.exim.org/exim-html-current/doc/html/spec_html/ch-string_expansions.html
(search for ${run)
ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: exim4-config 4.97-4ubuntu4.7
ProcVersionSignature: Ubuntu 6.8.0-138.138-generic 6.8.12
Uname: Linux 6.8.0-138-generic x86_64
ApportVersion: 2.28.3-0ubuntu0.1
Architecture: amd64
CasperMD5CheckResult: unknown
Date: Wed Aug 26 17:03:23 2026
PackageArchitecture: all
SourcePackage: exim4
UpgradeStatus: Upgraded to noble on 2025-04-14 (499 days ago)
** Affects: exim4 (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug noble
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2165160
Title:
SPF handling in Exim4 incorrectly quotes the email address
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/exim4/+bug/2165160/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs