HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=4)
-   -   Sendmail Mail Routing (http://www.howtoforge.com/forums/showthread.php?t=11120)

namit 5th March 2007 14:11

Sendmail Mail Routing
 
So i have sendmail running kind of and want to do the following.

I was looking around for mail routing tutorials/howtos but all i was getting was bits and bobs so if anyone can clear this up for me I would be really happy or point me in the right direction.

I have 2 servers and i want all the mail to come into 1st server then want it to forward a copy onto server 2 so that i can setup pop3 on server1 and imap on server2.

revise:
Server1 = pop3, receives all email
Server2 = imap, receives a copy threw mail routing

I know this is not the common practise but am mainly doing it to learn how mail routing works.

Thanks

alxgomz 6th March 2007 11:39

lo

I'm not very familiar with sendmail (not at all in fact: I use postfix) but I know you can reroute mail to another machine using the percent hack (%) so I think on the first server you have a .forward file that reroute the mail to something like user%domain.tld@<IP of the second server> (maybe hostname instead of IP works).
I have it working on postfix and communigate pro mail servers but I know this is considered to be a mess (and it really is) but may help. If I were you I would use a shared storage device with 2 mail servers connected on it.

I Hope it will help

falko 6th March 2007 17:31

Maybe you can do it with Postfix transports. Take a look at
Code:

man 5 transport

namit 6th March 2007 19:35

alxgomz thanks for that

can you give me an example of what your config file looks like?

alxgomz 6th March 2007 20:55

Well I'm sorry but I can't acces the conf files anymore...
But It was something like (It's for Postfix not Sendmail OK?!):
##########################
In /etc/postfix/main.cf
##########################
...
allow_percent_hack = yes
...
##########################

and in each home directory of your users (on the "master server") you have to put a .forward file wich look like this (let's say the user is toto, the domain titi.fr and the ip of your second server is 1.2.3.4):

##########################
in $HOME/.forward
##########################
toto%titi.fr@1.2.3.4
...
##########################

If I remember well this work (should work with sendmail using a similar syntax if only sendmail accept % notation)!
Check your mail.log ;)


All times are GMT +2. The time now is 09:11.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.