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 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.

share|improve this question
add comment

migrated from stackoverflow.com Jan 29 '10 at 1:20

This question came from our site for professional and enthusiast programmers.

2 Answers

up vote 1 down vote accepted

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"
share|improve this answer
    
Thanks for this, I will try to see if I can implement it within our setup. –  yayim Feb 1 '10 at 23:03
add comment

Both? Probably not, at least with stock qmail. If you're happy to recompile qmail, you can define QUEUE_EXTRA to anything you like, and then route the local ones to a second local server.

share|improve this answer
    
Thanks, I was asking about stock qmail. –  yayim Jan 29 '10 at 17:55
add comment

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.