Postfix - autoforwarding of all messages to another server

Hi,
I'm trying to set up a "hot standby" server for a Postfix system that doesn't send e-mail (only receives). I would like to forward all messages coming to the main server to another machine running postfix (it will be at sitting at a different datacenter). Ideally, I would like for the headers to remain the same as on the original server. Can I do this? If so, how?

Thank you! :D

J.
 
Not sure what you mean here.

Do you just want to backup all incoming mail on another server? Then check the always_bcc option in main.cf. Keep in mind that at the backup server mail is bounced when no (local) user is found. You should redirect (alias) all mail to one or more accounts on the backup server.

If you want a backup mail server that catches all mail when the main server is down. Google: configure postfix as backup MX
O and don't forget to set the right dns entries. An excellent example can be found here.
 
Try this parameter
/usr/local/etc/postfix/main.cf
# The relayhost parameter specifies the default host to send mail to
# when no entry is matched in the optional transport(5) table. When
# no relayhost is given, mail is routed directly to the destination.

relayhost = blahblahblah
 
hansaplast said:
Not sure what you mean here.

Do you just want to backup all incoming mail on another server? Then check the always_bcc option in main.cf. Keep in mind that at the backup server mail is bounced when no (local) user is found. You should redirect (alias) all mail to one or more accounts on the backup server.

If you want a backup mail server that catches all mail when the main server is down. Google: configure postfix as backup MX
O and don't forget to set the right dns entries. An excellent example can be found here.

Yes, I'm trying to keep the mail on both servers in sync. I think the always_bcc setting will do the trick. The problem with using the second server as a backup is that the mail will only get delivered to the host that's currently up.

Thank you!
 
Alt said:
Try this parameter
/usr/local/etc/postfix/main.cf

That will make it deliver only to the realy host - no? I need the messages to be delivered to both servers.
 
hansaplast said:
Not sure what you mean here.

Do you just want to backup all incoming mail on another server? Then check the always_bcc option in main.cf. Keep in mind that at the backup server mail is bounced when no (local) user is found. You should redirect (alias) all mail to one or more accounts on the backup server.

If you want a backup mail server that catches all mail when the main server is down. Google: configure postfix as backup MX
O and don't forget to set the right dns entries. An excellent example can be found here.

I'm having trouble figuring out how to use the always_bcc setting (can't find any info on it). Do I just put the backup domain there? ...or does it require an e-mail address with the username as a variable? $user1@seconddomain.com, for example?

Thanks! :D

J.
 
Back
Top