Two smtproutes for one domain in qmail

emailemail-server

We currently have a qmail set up as an email gateway for incoming mail, and from there it is routed to a different internal mail server based on smtproutes.

Is there a way that we can have one domain forwarded from the qmail 'gateway' to multiple internal servers? For example, when someone will send an email to user@example.com, it gets routed to our qmail server, and from there a copy is sent to both mailserver1.example.com and mailserver2.example.com – both of which have the same list of users and both of which think that they are the mailserver for example.com

Thank you.

Best Answer

One way to handle this would be to route the message on the head server to a .qmail file and then in the .qmail file forward the message to user@mailserver1.example.com and user@mailserver2.example.com. I think if you use the 'forward' program you could create a generic catch all that forwards all messages to the two servers.

/var/qmail/aliases/.qmail-default might look like this:

|forward "$LOCAL@mailserver1.example.com" "$LOCAL@mailserver2.example.com"
Related Topic