I'm attempting to create two distinct configurations for sending outbound emails in Postfix, utilizing two binding IPs (primary=11.11.11.11 and secondary=22.22.22.22) for smtpd. However, I'm encountering issues with my current setup. Here's what I've tried so far:
- Added the following line to main.cf:
sender_dependent_default_transport_maps = hash:/etc/postfix/sender_transport smtp_bind_address = 11.11.11.11
- Created and postmapped
/etc/postfix/sender_transport
with the content:
@example.com smtp2
- Added a line to
master.cf
for the second smtp as:
smtp2 inet n - y - - smtpd
-o smtp_bind_address=22.22.22.22
After restarting Postfix, I received this error:
Mar 23 09:02:23 test1 postfix/master[93837]: fatal: 127.0.0.1:smtp2: Servname not supported for ai_socktype
When I added the smtp2 service to /etc/services
and tried sending from example.com, I encountered these messages:
warning: connect to transport private/smtp2: No such file or directory
Mar 23 09:02:53 test1 postfix/error[93181]: B8B8E3F1B4: [email protected], relay=none, delay=564, delays=564/0.02/0/0.01, dsn=4.3.0, status=deferred (mail transport unavailable)
I suspect there might be a conceptual misunderstanding in my approach, but I'm not sure what it is.