Article 4TR08 Postfix server - Setup multiple relay hosts based on request IPaddress

Postfix server - Setup multiple relay hosts based on request IPaddress

by
karthik-techie
from LinuxQuestions.org on (#4TR08)
I am using postfix SMTP server. As per my requirement, Now I want to setup 2 SASL accounts to send mails through 2 relay hosts. Those are

1) user1@example.com - relayhost - sendgrid

2) user2@example.com - relayhost - local smtp server

Now, I am integrating

user1 account in website-1 user2 account in website-2 when the request came from website-1, mails should go from sendgrid and request came from website2 mails should go from local SMTP server(installed in server). I have done this setup with "transport" configuration(/etc/postfix/transport file). In transport configuration, we are giving domain names. Now, I want give IP address instead of domain names.

How we can route mapping by IP address?

It means, when request came from IP address 'X', mails should go from sendgrid and request came from IP address 'Y' mails should go from local SMTP server(installed in server). Please provide your suggestions to achieve this requirement. Thanks in advance.latest?d=yIl2AUoC8zA latest?i=Dg9pMWbNnjw:FOAjZ1ZOqjM:F7zBnMy latest?i=Dg9pMWbNnjw:FOAjZ1ZOqjM:V_sGLiP latest?d=qj6IDK7rITs latest?i=Dg9pMWbNnjw:FOAjZ1ZOqjM:gIN9vFwDg9pMWbNnjw
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments