I have discovered an issue but I don't know how long it was there already and how it happened but I'm pretty sure it worked in the past.
I have 2 internet lines with 2 static External IP addresses. Therefor I have also 2 (virtual) IP addresses for EFA4 and the router is configured to route the first IP from EFA to the first internet line and the second IP to the second internet line. All works good so far.
In order for postfix to receive and send on 2 internet lines I had to configure a few things in master.cf:
Code: Select all
#
# Postfix master process configuration file. For details on the format
# of the file, see the master(5) manual page (command: "man 5 master" or
# on-line: http://www.postfix.org/master.5.html).
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (no) (never) (100)
# ==========================================================================
# Internal
127.0.0.1:smtp inet n - n - - smtpd
-o syslog_name=postfix-local
-o smtp_helo_name=localhost
-o smtp_bind_address=127.0.0.1
-o myhostname=localhost
# Incoming 1
10.1.1.xx1:smtp inet n - n - - smtpd
-o syslog_name=postfix-mail1
-o smtp_helo_name=mail.XXXX.com
-o smtp_bind_address=10.1.1.xx1
-o myhostname=mail.XXXX.com
# Incoming 2
10.1.1.xx2:smtp inet n - n - - smtpd
-o syslog_name=postfix-mail2
-o smtp_helo_name=mail2.XXXX.com
-o smtp_bind_address=10.1.1.xx2
-o myhostname=mail2.XXXX.com
# Outgoing 1
relay1 unix - - n - - smtp
-o smtp_bind_address=10.1.1.xx1
-o smtp_helo_name=mail.XXXX.com
-o syslog_name=relay1
# Outgoing 2
relay2 unix - - n - - smtp
-o smtp_bind_address=10.1.1.xx2
-o smtp_helo_name=mail2.XXXX.com
-o syslog_name=relay2
# The following are system defaults
qmqp unix n - n - - qmqpd
pickup unix n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr unix n - n 300 1 oqmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
showq unix n - n - - showq
error unix - - n - - error
retry unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
postlog unix-dgram n - n - 1 postlogd
(This randomly uses one of the 2 lines for sending emails)
Code: Select all
sender_dependent_default_transport_maps = randmap:{relay1,relay2}
The big problem is now that when relay1 sends an email, the HELO which is transmitted to the remote email server is the IP address of the external static IP instead of the DNS name mail.XXXX.com (DNS and rDNS are registered and configured properly... nslookup does resolve directions)
I used the service helocheck@abuseat.org (just send an email and in the returning diagnostic information it states the HELO that was received)
In my case it was the following:
mail.abuseat.org
Remote Server returned '<mail.abuseat.org #5.0.0 smtp; 550 *** The HELO for IP address xxx.xxx.120.13 was '[xxx.xxx.120.13]' (valid but not recommended syntax) ***>'
If i send via the second line using relay2 I get the following return:
mail.abuseat.org
Remote Server returned '<mail.abuseat.org #5.0.0 smtp; 550 *** The HELO for IP address xxx.xxx.207.27 was 'mail2.XXXX.com' (valid syntax) ***>'
It seems as there is a DNS resolution made by the postfix server for the relay1 because the external IP is nowhere configured.
Does anyone have a suggestion what went wrong and how to solve this mystery.
Thank you
Mario