> Hello. > > I would also recommend having unique hostnames as well, so that postfix > can keep track. It's perfectly fine to have the same IP. > > IE: mail.mydomain.com, mail2.mydomain.com etc This working great, two different hostnames solves the problem solution of one instance seems to be much better
> Also, it might not be necessary to have two instances, you can probably > do it with one, as SMTPD is for incoming and SMTP is for outbound in > master.cf > > You can specify customer ports in master.cf as well, for example, I have: > > My default inbound which has amavis filtering, and I have a second > listener on 127.0.0.2 for internal relay mail. > > smtp inet n - n - 25 smtpd > -o content_filter=smtp-amavis:[127.0.0.1]:10024 > > 127.0.0.2:25 inet n - n - 25 smtpd > -o smtp_bind_address=$smtp_bind_override In this part I don't have any changes to better for test I disable auth master.cf #smtp inet n - n - - smtpd 1.2.3.4:smtp inet n - n - - smtpd -o myhostname=xxx.domain.cc 1.2.3.4:587 inet n - - - - smtpd -o smtpd_client_restrictions=permit when I added the virtual domain to such tests (gmail.com, facebook.com) e-mails reach out locally rather than according to MX records