You can specify like that with the help of /etc/postfix/transport file You can add the line transport_maps = hash:/etc/postfix/transport in main.cf Do the steps below Create a transport - transport1 and Mail sent to user "user@gmail.com" should go through transport1 and all other mail sent should go through default.
First stop dual instances of postfix if any. Open /etc/postfix/main.cf and set inet to all.
Add the following to master.cf
transport1 unix - - n - 1 smtp -o smtp_bind_address= (add a space at 1st) -o syslog_name=postfix-localroute1 (add a space at 1st)
Add/create the following to /etc/postfix/transport
somecompany.com transport1:
Run postmap after defining the transport file.
postmap /etc/postfix/transport
I have defined a transport above. It means all mail to @somecompany.com will go through you specifed in transport and that ip will not b displayed as it is in maillog. Instead it will be shown as postfix-localroute1
Add the following to main.cf
transport_maps = hash:/etc/postfix/transport
Run:
postmap /etc/postfix/transport
Reload postfix:
postfix reload