Skip to content

Send mail only from the addresses that have reverse DNS - #38

Merged
byjpr merged 1 commit into
claude/admiring-planck-25cvzffrom
claude/fix-14-bind-address
Oct 9, 2026
Merged

byjpr merged 1 commit into
claude/admiring-planck-25cvzffrom
claude/fix-14-bind-address

Conversation

@byjpr

@byjpr byjpr commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Closes #14

Changes

  • just install adds the provider-assigned addresses (the Terraform ipv4/ipv6 outputs, i.e. the ones reverse DNS was set for) to machine.json as publicIPv4/publicIPv6.
  • Postfix binds outgoing SMTP to exactly those addresses (smtp_bind_address, smtp_bind_address6). Mail can no longer leave from a SLAAC or secondary address without a PTR record, which Gmail rejects (550-5.7.25).
  • DHCP providers (UpCloud): the assigned IPv6 address is also configured statically (/128) next to DHCP/RA, so the bind address always exists.
  • Before machine.json exists, or for keys it doesn't contain, nothing is bound. Behaviour is unchanged until the next install records the addresses.

Testing

  • OVH example (static): Address=192.0.2.10/24, Address=2001:db8::10/128, with smtp_bind_address = 192.0.2.10 and smtp_bind_address6 = 2001:db8::10 in main.cf.
  • UpCloud example (DHCP): Address=2001:db8::10/128 plus DHCP, with the same bind addresses.
  • All 5 provider example systems build. nixfmt, shellcheck and tofu validate pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01G22o7QQ17GRtkCqpJNFr9B


Generated by Claude Code

just install records the provider-assigned addresses (Terraform outputs,
for which reverse DNS was set) in machine.json. Postfix binds outgoing
SMTP to them (smtp_bind_address/smtp_bind_address6), and on DHCP providers
(UpCloud) the assigned IPv6 address is also configured statically, so
mail never leaves from a SLAAC or other address without a PTR record,
which Gmail and others reject.

Closes #14

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01G22o7QQ17GRtkCqpJNFr9B
@byjpr
byjpr merged commit 9282def into claude/admiring-planck-25cvzf Oct 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Medium] Outgoing mail may leave from an address without reverse DNS (UpCloud IPv6)

2 participants