Hi,

I'm working on a mail server deployment that will only have one server
for MX and SASL submission purposes.  Generally I like to have separate
Postfix instances to handle a specific task.  In this case I'm running
in to problems when the submission instance uses the same IP address as
the MX instance.  (Due to a limited IP address pool there is currently
only one routable IP address assigned to this server.)

Using the submission instance to send a message to a recipient address
for which the server is also the MX host triggers Postfix' loop
detection.  Mail for foreign addresses is relayed correctly.  I realize
this can be done easily enough without using multiple instances.  Is
there a way to work around this so that an MX instance and submission
instance can share single IP address?  I've gotten used to the queue,
logging, and configuration separation provided by multiple instances and
would rather like to use that approach here if I can.

Configuration and debugging information follow.  In this example, the
server is the MX host for both domains 'example.com' and 'example.org'.



m...@mail[~]$ nc 127.0.0.1 587
220 smtp.example.com ESMTP Postfix
EHLO test
250-smtp.example.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
AUTH PLAIN blahblahblah
235 2.7.0 Authentication successful
MAIL FROM:<m...@example.com>
250 2.1.0 Ok
RCPT TO:<m...@example.org>
250 2.1.5 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
test
.
250 2.0.0 Ok: queued as 098981BF0969
quit
221 2.0.0 Bye




Corresponding log entries for above transaction:

Jul 31 18:27:48 mail postfix-submission/smtpd[13440]: connect from
localhost.localdomain[127.0.0.1]
Jul 31 18:27:56 mail postfix-submission/smtpd[13440]: 098981BF0969:
client=localhost.localdomain[127.0.0.1], sasl_method=PLAIN,
sasl_username=m...@example.com
Jul 31 18:27:59 mail postfix-submission/cleanup[13442]: 098981BF0969:
message-id=<20100801012756.098981bf0...@smtp.example.com>
Jul 31 18:27:59 mail postfix-submission/qmgr[13433]: 098981BF0969:
from=<m...@example.com>, size=348, nrcpt=1 (queue active)
Jul 31 18:27:59 mail postfix-submission/smtp[13443]: 098981BF0969:
to=<m...@example.org>, relay=none, delay=4.7, delays=4.6/0.09/0/0,
dsn=5.4.6, status=bounced (mail for example.org loops back to myself)
Jul 31 18:27:59 mail postfix-submission/cleanup[13442]: AB7021BF096B:
message-id=<20100801012759.ab7021bf0...@smtp.example.com>
Jul 31 18:27:59 mail postfix-submission/qmgr[13433]: AB7021BF096B:
from=<>, size=2151, nrcpt=1 (queue active)
Jul 31 18:27:59 mail postfix-submission/bounce[13445]: 098981BF0969:
sender non-delivery notification: AB7021BF096B
Jul 31 18:27:59 mail postfix-submission/qmgr[13433]: 098981BF0969: removed
Jul 31 18:27:59 mail postfix-submission/smtp[13443]: AB7021BF096B:
to=<m...@example.com>, relay=none, delay=0.15, delays=0.15/0/0/0,
dsn=5.4.6, status=bounced (mail for example.com loops back to myself)
Jul 31 18:27:59 mail postfix-submission/qmgr[13433]: AB7021BF096B: removed
Jul 31 18:28:02 mail postfix-submission/smtpd[13440]: disconnect from
localhost.localdomain[127.0.0.1]



postconf -c /etc/postfix-submission -n:

alias_database =
alias_maps =
config_directory = /etc/postfix-submission
data_directory = /var/lib/postfix-submission
default_database_type = cdb
local_recipient_maps =
local_transport = error:5.1.1 Mailbox unavailable
multi_instance_enable = yes
multi_instance_name = postfix-submission
mydestination =
mydomain = example.com
myhostname = smtp.example.com
myorigin = $mydomain
parent_domain_matches_subdomains =
queue_directory = /var/spool/postfix-submission
smtpd_client_restrictions = permit_sasl_authenticated   reject
smtpd_helo_required = yes
smtpd_recipient_restrictions = reject_non_fqdn_recipient
permit_sasl_authenticated   reject
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = /var/run/dovecot/auth-client
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = reject_non_fqdn_sender
reject_unknown_sender_domain
strict_rfc821_envelopes = yes
unknown_address_reject_code = 554
unknown_client_reject_code = 554
unknown_hostname_reject_code = 554

mail_version = 2.8-20100707

In master.cf for the postfix-submission instance, the "smtp   inet ...
smtpd" entry is commented out, and "submission   inet ... smtpd" is enabled.


Thanks,

Mike

Reply via email to