Deliverability: the EHLO name's private addresses are checked against SPF #408

Closed
opened 2026-11-16 19:21:00 +00:00 by jcoffey-dev · 1 comment
Owner

Reported in inbuxa/inbuxa-admin#224: on a container install, Deliverability fails SPF for 172.31.253.10 and fd69:6e62:7578::2, the server container's own addresses on the installer's network.

With no source addresses configured, addresses() in crates/services/src/inbuxa_deliverability.rs checks what the EHLO name resolves to. The installer sets the container's hostname: to the mail host, so Docker's /etc/hosts in the container maps that name to the container's addresses, and the lookup returns those instead of the public ones. Every container install gets the false failures (6 for one domain in the report), and blocklist lookups for these addresses are wasted too.

Fix: leave out addresses that can't be what a receiver sees (private, unique-local, loopback, link-local, CGNAT), and look the name up in DNS only, not /etc/hosts. When nothing public is left, say the node's sending address couldn't be worked out (and how to set it) rather than failing SPF. The reporter also suggests passing SPF on an mx mechanism that covers the server, which the SPF check already does when the right address is used.

Reported in inbuxa/inbuxa-admin#224: on a container install, Deliverability fails SPF for 172.31.253.10 and fd69:6e62:7578::2, the server container's own addresses on the installer's network. With no source addresses configured, `addresses()` in `crates/services/src/inbuxa_deliverability.rs` checks what the EHLO name resolves to. The installer sets the container's `hostname:` to the mail host, so Docker's /etc/hosts in the container maps that name to the container's addresses, and the lookup returns those instead of the public ones. Every container install gets the false failures (6 for one domain in the report), and blocklist lookups for these addresses are wasted too. Fix: leave out addresses that can't be what a receiver sees (private, unique-local, loopback, link-local, CGNAT), and look the name up in DNS only, not /etc/hosts. When nothing public is left, say the node's sending address couldn't be worked out (and how to set it) rather than failing SPF. The reporter also suggests passing SPF on an `mx` mechanism that covers the server, which the SPF check already does when the right address is used.
jcoffey-dev added this to the 27.1 milestone 2026-11-16 19:21:00 +00:00
jcoffey-dev added the bug
priority
p2
labels 2026-11-16 19:21:00 +00:00
jcoffey-dev self-assigned this 2026-11-16 19:21:00 +00:00
Author
Owner

Fixed in #409, released in 27.1-rc.25. The check leaves out addresses no receiver can see (private, CGNAT, loopback, link-local, unique-local), and when those are all the server's name gave, it asks DNS itself instead of /etc/hosts. Mail delivery still reads /etc/hosts as before. Thanks to faisal (inbuxa/inbuxa-admin#224).

Fixed in #409, released in 27.1-rc.25. The check leaves out addresses no receiver can see (private, CGNAT, loopback, link-local, unique-local), and when those are all the server's name gave, it asks DNS itself instead of /etc/hosts. Mail delivery still reads /etc/hosts as before. Thanks to faisal (inbuxa/inbuxa-admin#224).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: inbuxa/inbuxa-server#408