I need help on how to correctly setup postfix for multi-instance. For few months now I have been trying to configure 2 separate domains, example: domain1.com and domain2.com. The resources I found on the internet, or Postfix website (confusing), does not help to correctly configure the multi-instances. Everything use to work fine for both domains without multi-instance configuration. Recently, I have been suspended from using Brevo relay service. I had no issues using them on single instance configuration.
To start, here is the general setup:
- I use VPS. I have 2 public IPs from hostwinds.com.
- On Hostwinds server, I have haproxy setup to translate public IPs, ports: 25, 587, etc to private IPs and ports: 2525, 10587, etc.
- The Hostwinds server connects to my postfix server via wireguard.
- On my local postfix server, there is a postscreen configured to use translated ports; 2525, 10587. Example: <IP_1:2525>, <IP_1:10587> , and <IP_2:2525>, <IP_2:10587>.
- On local postfix server there's an Amavis, OpenDKIM, OpenDMARC, SPF configured.
- Each instance has separate main.cf and master.cf files to handle the separate instances, such as: 192.168.100.2:2525 (inet/postscreen), and 192.168.110.2:2525 (inet/postscreen).
For domain1.com I use postfix main instance, and for domain2 I use postfix-domain2.com instance. In postfix/main.cf and postfix-domain2.com, I tried to use inet_interfaces = 192.168.100.2, and 192.168.110.2, however the emails are not being routed properly, so I have to use inet_interfaces = 127.0.0.1 for both instances.
Here is the problem. When an incoming email arrives on domain1.com, it is relayed via main instance of postfix, and being delivered to dovecot. Sometimes, an incoming email arrives on main instance "postfix", then routes to postfix-domain2, and then goes back to postfix for domain1.com. It is inconsistent.
For an outgoing emails, where the problem is:
- When sending email from primary instance "postfix" for domain1.com, the emails first routes through postfix, then postfix-domain2.com. It doesn't use domain1.com route.
- When sending email from secondary instance postfix-domain2.com, the route goes through postfix-domain2.com, but it stays in queue, not being sent.
I tried to configure transport maps to force outbound traffic to each domains path, but it doesn't work. Emails are queued and never sent.
Sorry for long post, but I really need some help to successfully configure everything for both instances. It there any working example how to configure the server with config scenario I described?
Thank you ahead for any advise.
Logs attached.
2026-06-09T08:08:38.225778-07:00 warka postfix/10587/smtpd[20743]: connect from unknown[MY_ISP_IP] 2026-06-09T08:08:39.330095-07:00 warka postfix/10587/smtpd[20743]: Anonymous TLS connection established from unknown[MY_ISP_IP]: TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 2026-06-09T08:08:40.287309-07:00 warka postfix/10587/smtpd[20743]: 461F67444E: client=unknown[MY_ISP_IP], sasl_method=PLAIN, [email protected] 2026-06-09T08:08:40.833717-07:00 warka postfix/cleanup[20749]: 461F67444E: [email protected] 2026-06-09T08:08:40.835555-07:00 warka opendkim[1785]: 461F67444E: DKIM-Signature field added (s=s1, d=domain1.com) 2026-06-09T08:08:40.881650-07:00 warka postfix/qmgr[20737]: 461F67444E: [email protected], size=382, nrcpt=1 (queue active) 2026-06-09T08:08:41.642174-07:00 warka postfix/10025/smtpd[20320]: connect from localhost[127.0.0.1] 2026-06-09T08:08:41.642422-07:00 warka opendmarc[1775]: ignoring connection from localhost 2026-06-09T08:08:41.643537-07:00 warka postfix/10025/smtpd[20320]: 9D189520063: client=localhost[127.0.0.1] 2026-06-09T08:08:41.644158-07:00 warka postfix-domain2.com/cleanup[20322]: 9D189520063: [email protected] 2026-06-09T08:08:41.686802-07:00 warka opendkim[1785]: 9D189520063: DKIM-Signature field added (s=s1, d=domain1.com) 2026-06-09T08:08:41.730072-07:00 warka postfix-domain2.com/qmgr[18590]: 9D189520063: [email protected], size=1358, nrcpt=1 (queue active) 2026-06-09T08:08:41.730139-07:00 warka postfix/10025/smtpd[20320]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5 2026-06-09T08:08:41.732679-07:00 warka amavis[1577]: (01577-11) Passed CLEAN {RelayedOpenRelay}, [MY_ISP_IP]:24065 [MY_ISP_IP] [email protected] -> [email protected], Queue-ID: 461F67444E, Message-ID: [email protected], mail_id: 9LXvl_xg2nHR, Hits: -0.201, size: 887, queued_as: 9D189520063, dkim_sd=s1:domain1.com, 845 ms 2026-06-09T08:08:41.733283-07:00 warka postfix/amavis/smtp[20750]: 461F67444E: [email protected], relay=127.0.0.1[127.0.0.1]:10024, delay=1.7, delays=0.87/0.01/0/0.85, tls=none, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 9D189520063) 2026-06-09T08:08:41.733338-07:00 warka postfix/qmgr[20737]: 461F67444E: removed 2026-06-09T08:08:45.369984-07:00 warka postfix-domain2.com/smtp[20323]: 9D189520063: [email protected], relay=hotmail-com.olc.protection.outlook.com[52.101.68.2]:25, delay=3.7, delays=0.09/0/1.2/2.4, tls=may, dsn=2.6.0, status=sent (250 2.6.0 [email protected] [InternalId=70338679412730, Hostname=PH0PR02MB9305.namprd02.prod.outlook.com] 11540 bytes in 0.231, 48.779 KB/sec Queued mail for delivery -> 250 2.1.5) 2026-06-09T08:08:45.370221-07:00 warka postfix-domain2.com/qmgr[18590]: 9D189520063: removed