LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Post fix smtproutes (https://www.linuxquestions.org/questions/linux-server-73/post-fix-smtproutes-935802/)

senthilvael 03-22-2012 12:09 AM

Post fix smtproutes
 
We are having a webserver (mydomain.com) with apache and postfix. The mails originating from this server sometimes reaches to the spam folder of recipients. To avoid this, we have purchased a relay server. I configured it in the postfix. Now the mails originating from the websever is sent out via relay server. we can send 30K mails via the relay server per month. While analyzing this, half of the emails sent are to user@mydoamin.com. So I am thinking of routing the emails sent to mydomain.com to my mail server and rest of the emails are sent out via relay server. I know that we can do this via /etc/postfix/transport file.

my main.cf is having this entry for general routing

relayhost = [smtp.relayserver.com]:587

It does not having entry for transport file.
Can you please help me to include the transport file to main.cf and configure it to forward email to mydomain to my mail server. Even a good link is enough for me configure. THanks in advance.

hydraMax 04-03-2012 10:00 PM

According to The Book of Postfix a transport map entry is like:

Code:

example.com smtp:[mail.office.example.com]
You process the map file with:

Code:

postmap hash:/etc/postfix/transport
and the main.cf paramter that specifies the transport map is:

Code:

transport_maps = hash:/etc/postfix/transport
However, In the book this is in the context of configuring /the gateway/, not the originating mail server (after setting the relay_domains parameter) so I'm not sure exactly this works in your situation, without looking into it some more. Perhaps studying the TRANSPORT(5) man page will shed some more light on it:

http://www.postfix.org/transport.5.html


All times are GMT -5. The time now is 08:31 AM.