-
-
Notifications
You must be signed in to change notification settings - Fork 2k
fix: Postfix: disable_dns_lookups => smtp_dns_support_level
#4568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
polarathene
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to pay much attention to this review comment. It's only to provide some extra context for traceability.
Originally part of a larger PR with request to extract to separate one:
#4536 (review)
| -o smtp_data_done_timeout=1200 | ||
| -o smtp_send_xforward_command=yes | ||
| -o disable_dns_lookups=yes | ||
| -o smtp_dns_support_level=disabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to reference the Postfix docs on smtp_dns_support_level=disabled:
Disable DNS lookups. No MX lookups are performed and hostname to address lookups are unconditionally "native".
This setting is not appropriate for hosts that deliver mail to the public Internet. Some obsolete how-to documents recommend disabling DNS lookups in some configurations withcontent_filters.
This is no longer required and strongly discouraged.
and the prior (now deprecated) disable_dns_lookups=yes:
Disable DNS lookups in the Postfix SMTP and LMTP clients.
- When disabled, hosts are looked up with the
getaddrinfo()system library routine which normally also looks in/etc/hosts.- As of Postfix 2.11, this parameter is deprecated; use
smtp_dns_support_levelinstead.
This setting would be for outbound SMTP traffic, so for when Amavis is sending back to Postfix, where DNS would be redundant 👍
Within our project, I did add some commentary about this for an SMTP_ONLY=1 feature test, but the test itself seemed borked, so we don't bother with testing it in the current state:
docker-mailserver/test/tests/parallel/set3/mta/smtponly.bats
Lines 28 to 30 in f343f7d
| # TODO: needs complete rework when proper DNS container is running for tests | |
| @test "sending mail should work" { | |
| skip 'TODO: This test is absolutely broken and needs reworking!' |
In that case, it seems it was to avoid external DNS record lookups, and was about a different/related Postfix DNS setting.
see https://www.postfix.org/postconf.5.html#disable_dns_lookups
Description
Replaces the deprected option
disable_dns_lookupswithsmtp_dns_support_level. This option was deprecated since Postfix 2.11.Type of change
Checklist
docs/)CHANGELOG.md