Dear Maintainer,
A typo in upstream source code (PF_INET6 expected but PF_INET written)
causes IPv6 address parsing failure in OpenSMTPD Portable 7.6.0p0.
When /etc/smtpd.conf is configured with a src table with an IPv6
address, OpenSMTPD will fail to parse that source address, generate a
TempFail saying "No valid route to destination", which causes delivery
failure to IPv6-only MX and increase latency to dual-stack MX due to
the requeuing and retries.
See https://github.com/OpenSMTPD/OpenSMTPD/pull/1275 for details.
Steps to reproduce:
1. Set up an IPv6-only MX for receiving emails.
2. Configure an OpenSMTPD relay action with a src table where an IPv6
addressess is specified on another host, e.g.,
table addrs { "[2001:db8::1]", "203.0.113.1" }
action outbound relay src <addrs>
3. Send an email to the IPv6-only MX from the OpenSMTPD MTA.
4. Check OpenSMTPD's log with journalctl. You will find some errors
like this:
Dec 10 09:00:00 mailer smtpd[12345]: warn: Failed to get source
address for [relay:example.com,smtp,sourcetable=addrs]
Dec 10 09:00:00 mailer smtpd[12345]: 0000000000000000 mta delivery
evpid=aa12926d7ede2a40 from=<u1@example.net> to=<u2@example.com>
rcpt=<-> source="-" relay="example.com" delay=0s result="TempFail"
stat="No valid route to destination"
This bug has been fixed in upstream v7.8.0, but no minor upstream
version with the fix is released. Thus, I suggest we backport this fix
as a Debian patch to 7.6.0 so that the current stable Debian trixie
could benefit from it.