mirror of
https://github.com/chatmail/relay.git
synced 2026-05-10 16:04:37 +00:00
feat(postfix): prefer IPv4 in SMTP client
This commit is contained in:
@@ -88,6 +88,22 @@ inet_protocols = ipv4
|
|||||||
inet_protocols = all
|
inet_protocols = all
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
# Postfix does not try IPv4 and IPv6 connections
|
||||||
|
# concurrently as of version 3.7.11.
|
||||||
|
#
|
||||||
|
# When relay has both A (IPv4) and AAAA (IPv6) records,
|
||||||
|
# but broken IPv6 connectivity,
|
||||||
|
# every second message is delayed by the connection timeout
|
||||||
|
# <https://www.postfix.org/postconf.5.html#smtp_connect_timeout>
|
||||||
|
# which defaults to 30 seconds. Reducing timeouts is not a solution
|
||||||
|
# as this will result in a failure to connect to slow servers.
|
||||||
|
#
|
||||||
|
# As a workaround we always prefer IPv4 when it is available.
|
||||||
|
#
|
||||||
|
# The setting is documented at
|
||||||
|
# <https://www.postfix.org/postconf.5.html#smtp_address_preference>
|
||||||
|
smtp_address_preference=ipv4
|
||||||
|
|
||||||
virtual_transport = lmtp:unix:private/dovecot-lmtp
|
virtual_transport = lmtp:unix:private/dovecot-lmtp
|
||||||
virtual_mailbox_domains = {{ config.mail_domain }}
|
virtual_mailbox_domains = {{ config.mail_domain }}
|
||||||
lmtp_header_checks = regexp:/etc/postfix/lmtp_header_cleanup
|
lmtp_header_checks = regexp:/etc/postfix/lmtp_header_cleanup
|
||||||
|
|||||||
Reference in New Issue
Block a user