Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 2 servers (A,B) with email server working. I am trying to replicate all emails sent to server A to server B using transport map. My transport table is

CREATE TABLE `transport` (
    `domain` varchar(128) NOT NULL DEFAULT '',
    `transport` varchar(128) NOT NULL DEFAULT '',
    UNIQUE KEY `domain` (`domain`) 

When I add row to that table to transport emails to server B it works

| domain      | transport      |
| | smtp:[] |

but when I try to add another server it stops working

| domain      | transport                      |
| | smtp:[], smtp:[] |

My question is, how to get it working? How can I get mails on two different servers replicated?

share|improve this question
If you put a core routing table for postfix in a database like this, what happens when the database is down ? – adaptr May 16 '12 at 6:36
Hi, I am very basic and according to few howto it should be done this way […, do you know different solution for my problem? – debianek May 16 '12 at 8:26
I would strongly advise you not to follow random tutorials you find on the internet; most of them are plain wrong, or bad for general scenarios. Always use the official postfix documentation at – adaptr May 16 '12 at 12:32

Transport maps don't support multiple nexthops. You can try using auto_bcc (or one of the BCC maps) to deliver mail to additional addresses.

For example, to deliver all mail destined for to server B, create a domain for the "backup" mail (e.g. and configure server B to accept mail for this domain. Then use a regular expression recipient_bcc_maps table which adds the counterpart user on as a BCC.

recipient_bcc_maps = regexp:/etc/postfix/recipient_bcc_maps


/^(.*)@example\.com$/   ${1}
share|improve this answer
Hi, thanks for your answer, what I would like to is to have all emails for domain sent to server B and having copy on server A. – debianek May 15 '12 at 22:20
Updated answer with possible solution. – mgorven May 15 '12 at 22:32
If, like me, you're lazy and only want to use one backup domain, add the domain part in the standard manner of ${1}=${2}@backup.example.tld. – adaptr May 16 '12 at 12:46

Your Answer


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.