Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

we have one smtp server and we want incoming mail should store by smtp and forward two other smtp server is their any solution

we dont want email forwarding

Ex mail@mail.com to amail@mail.com

we want

Ex: mail@mail.com to mail@mail.com smtp server should deliver one copy to user and forward to other smtp server

Thankz in advance

share|improve this question
    
What is server environment? Os, SMTP software? –  Guntis Apr 15 '13 at 11:03
    
postfix mail server we have... –  Kaustubh G. Padwad Apr 15 '13 at 11:04

2 Answers 2

Server A ip = 192.168.1.1, server B ip = 192.168.2.1
One solution is to use transport_maps
On server A
/etc/postfix/transport file contains: * smtp:[serverB.example.com]
main.cf: transport_maps = hash:/etc/postfix/transport

And on server B in main.cf mynetworks = 127.0.0.0/8, 192.168.1.1 , 192.168.2.1, ... (contains server A ip address)

share|improve this answer
    
The copy of mail should deliver to user on server A and same mail should be forword to other smtp Example We have postfix server with bunch of users what we want the mail should be deliverd to their postfix and same mail forworded to other smtp server like excange and all Thankz for quick reply –  Kaustubh G. Padwad Apr 15 '13 at 11:23
    
for what purposes you need to forward to another smtp? Maybe you could try to store mail in database and then replicate database to other servers. And look here –  Guntis Apr 15 '13 at 12:07
    
Hii, currently we have one postfix server which handel all the mails of our organization now we are adding new microsoft exchange server so what we want when mail arrives by smtp at that moment smtp should delevier the mail to user as well as send that mail to other smtp that is microsoft and further he proceed...... –  Kaustubh G. Padwad Apr 16 '13 at 5:54
    
Did you look in my provided link? You cannot export all accounts from postfix and import into exchange ? And then just relay mail from postfix to exchange... –  Guntis Apr 16 '13 at 6:38

With postfix, use recipient_bcc_maps. Eg

mail@mail.com mail@bcc.mail.com

In your transport maps, define where @bcc.mail.com should be delivered to. E.g.

bcc.mail.com smtp:[192.168.0.4]

If you want to get rid of the "bcc" in the domain name, you could probably just define the corresponding alias on 192.168.0.4.

share|improve this answer
    
Hii, currently we have one postfix server which handel all the mails of our organization now we are adding new microsoft exchange server so what we want when mail arrives by smtp at that moment smtp should delevier the mail to user as well as send that mail to other smtp that is microsoft and further he proceed...... –  Kaustubh G. Padwad Apr 16 '13 at 5:55
    
Are you sure you are delivering to the clients via smtp? Seems a bit oldfashined to me. Nowadays, clients usually get their mail via imap. Anyway, as far as I know, exchange also has an imap interface, so you could just deliver all mail to exchange, and users could choose whether they want to connect via imap or exchange protocol. There is no real "deliver identical mail to two destinations" mechanism in postfix. –  Isaac Apr 16 '13 at 9:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.