On Wed, Mar 31, 1999 at 03:01:43PM -0600, Stephen Anderson wrote:
> I have a mail routing question and I'm hoping someone can help me.  I have
> searched through the mailing list archive (approx 580 msgs) and I couldn't
> decipher the answer from any post(s) as being definative.
> 
> I have several domains to recieve mail for (names have been changed to
> protect the ignorant <grin>)
> 
> company.com
> alpha.company.com
> beta.company.com
> 
> Correspondingly I have three machines, mail.company.com,
> mail.alpha.company.com, and mail.beta.company.com.  In my DNS I have:
> 
> company.com.          IN      MX  0   mail.company.com.
>                       IN      MX 10   mail.alpha.company.com.
>                       IN      MX 10   mail.beta.company.com.
> 
> alpha.company.com.    IN      MX  0   mail.alpha.company.com.
>                       IN      MX 10   mail.company.com.
>                       IN      MX 20   mail.beta.company.com.
> 
> beta.company.com.     IN      MX  0   mail.beta.company.com.
>                       IN      MX 10   mail.company.com.
>                       IN      MX 20   mail.alpha.company.com.
> 
> Now, all of these mail machines will be running Qmail.  I need to figure
> out how to configure each system so that *company.com mail is delivered
> from mail.company.com (where it will all arrive) to the appropriate
> mailhost via DNS MX records.  All mail coming from the subdomains should
> use DNS MX records for internal mail delivery.  And finally, all company
> external outgoing mail should override DNS MX records and forward through
> our mail gateway (mail.company.com).

Each machine should have all three domains in rcpthosts, but only the domain
it's hosting in locals (or virtualdomains, as the case may be).

mail.alpha.company.com's smtproutes file should look like this:

beta.company.com:mail.beta.company.com
:mail.company.com

Mail arriving at mail.alpha.company.com for alpha.company.com will be handled
locally (because alpha.company.com is in locals). Mail arriving for
beta.company.com will get sent to mail.beta.company.com, and mail for any other
domain will get forwarded to mail.company.com (because of the smtproutes
entries). You could leave the beta.company.com line out of smtproutes, but then
mail arriving at mail.alpha.company.com for beta.company.com would take an
extra hop to get to mail.beta.company.com. (It would be forwarded to
mail.company.com, and then DNS would take care of its getting to
mail.beta.company.com.)

mail.beta.company.com's setup will be similar.

You shouldn't need any smtproutes on mail.company.com. The MX records in DNS
will take care of mail arriving there and destined for
(alpha|beta).company.com.

Chris

Reply via email to