bind postfix to the right network interface when sending outbound mail so that SPF checks on the receiving end will pass

fixes #3 (again)
This commit is contained in:
Joshua Tauberer 2016-02-01 12:36:52 -05:00
parent 4db8efa0df
commit 77937df955
2 changed files with 4 additions and 0 deletions

View File

@ -5,6 +5,7 @@ In Development
-------------- --------------
* Roundcube updated to version 1.1.4. * Roundcube updated to version 1.1.4.
* On multi-homed machines, Postfix now binds to the right network interface when sending outbound mail so that SPF checks on the receiving end will pass.
v0.16 (January 30, 2016) v0.16 (January 30, 2016)
------------------------ ------------------------

View File

@ -57,11 +57,14 @@ apt_install postfix postfix-pcre postgrey ca-certificates
# Set some basic settings... # Set some basic settings...
# #
# * Have postfix listen on all network interfaces. # * Have postfix listen on all network interfaces.
# * Make outgoing connections on a particular interface (if multihomed) so that SPF passes on the receiving side.
# * Set our name (the Debian default seems to be "localhost" but make it our hostname). # * Set our name (the Debian default seems to be "localhost" but make it our hostname).
# * Set the name of the local machine to localhost, which means xxx@localhost is delivered locally, although we don't use it. # * Set the name of the local machine to localhost, which means xxx@localhost is delivered locally, although we don't use it.
# * Set the SMTP banner (which must have the hostname first, then anything). # * Set the SMTP banner (which must have the hostname first, then anything).
tools/editconf.py /etc/postfix/main.cf \ tools/editconf.py /etc/postfix/main.cf \
inet_interfaces=all \ inet_interfaces=all \
smtp_bind_address=$PRIVATE_IP \
smtp_bind_address6=$PRIVATE_IPV6 \
myhostname=$PRIMARY_HOSTNAME\ myhostname=$PRIMARY_HOSTNAME\
smtpd_banner="\$myhostname ESMTP Hi, I'm a Mail-in-a-Box (Ubuntu/Postfix; see https://mailinabox.email/)" \ smtpd_banner="\$myhostname ESMTP Hi, I'm a Mail-in-a-Box (Ubuntu/Postfix; see https://mailinabox.email/)" \
mydestination=localhost mydestination=localhost