Re: 2 mail servers, 1 domain
- From: "Robert Harker" <harker@xxxxxxxxxx>
- Date: 28 Feb 2006 18:43:20 -0800
We want to put another Linux/Sendmail server at
siteB so that each site will handle mail for its local users.
How do we do this?
You would do this by assigning each mail server at each
site a separate hostname or subdomain name:
site-a.domain.org
site-b.domain.org
You would then use the virtusertable to accept mail for
the correct users.
Now a bit of theory:
In email, like physical mail, there are two separate sets
of addresses: envelope addreses and header addresses.
These two sets of addresses are used differently by
the mail system. The header addresses are what
people see in the message in the From:, To: and Cc:
headers. They get rewritten by sendmail, but are not
actually used by sendmail for delivery. The second set
of addresses, the envelope addresses are used for
delivery. They show up in the SMTP protocol conversation
in the MAIL From: and RCTP To: commands.
Why this is important is that you can change the envelope
addresses without affecting what the recipient sees in the
header addresses.
So all of the header addresses should be simply:
user@xxxxxxxxxx
for both the sender and recipients.
We will use the envelope recipient address to direct the
delivery of the message to the correct host.
We do this with the virtusertable. In your host.mc file add:
FEATURE(`virtusertable')
and
VIRTUSER_DOMAIN(`domain.org')
This adds domain.org to class $={VirtHost} which is a list
of domains or hostnames that will be checked in the
virtusertable, but not accepted for local delivery like
class $=w. This is to avoid looping problems in the
virtusertable.
Next the virtusertable would have 4 sets of entries:
1) local administrative accounts for local delivery on
each mail server:
postmaster@xxxxxxxxxx postmaster
root@xxxxxxxxxx root
operator@xxxxxxxxxx oeprator
support@xxxxxxxxxx support
2) users at SiteA:
user1@xxxxxxxxxx user1@xxxxxxxxxxxxxxxxx
user2@xxxxxxxxxx user2@xxxxxxxxxxxxxxxxx
or
jane.user@xxxxxxxxxx user1@xxxxxxxxxxxxxxxxx
joe.blow@xxxxxxxxxx user2@xxxxxxxxxxxxxxxxx
3) users at SiteB:
user3@xxxxxxxxxx user3@xxxxxxxxxxxxxxxxx
user4@xxxxxxxxxx user4@xxxxxxxxxxxxxxxxx
4) a "catchall" rejecting any address that is not explictly
listed. This is to avoid virtusertable loops and mail loops:
@domain.org error:550 user unknown
You can use the same virtusertable file on both hosts.
This is why I used class $={VirtHost}.
You do not need one for site-a and one for site-b with
different entries.
To keep all of the header addresses and the enveope
sender address generic you would want to masquerade:
MASQUERADE_AS(`domain.org')
FEATURE(`allmasquerade')
FEATURE(`masquerade_envelope')
A final note: This will forward mail to the correct mail server once
it is received by domain.org. It will not do anything inteligent about
having the internet forward mail for SiteA directly to
site-a.domain.org
or forward mail for SiteB directly to site-b.domain.org.
The two hosts could be listed as equal preference MX hosts for
load balancing with a 50/50 chance the mail would be forwarded
to the correct server the first time. Or if one site got more mail
than the other it could be listed as a lower preference MX host
with the lower volume site listed as a higher preference MX host
for robustness. In this case the lower volume site's mail would
normally be routed through the higher volume site.
Hope this helps
RLH
For info about our "Managing Internet Mail, Setting Up and Trouble
Shooting sendmail and DNS" and a schedule of dates and locations,
please send email to info@xxxxxxxxxx, or visit www.harker.com
.
- Prev by Date: Re: question about smtp connections...
- Next by Date: Re: config error: mail loops
- Previous by thread: Re: Unable to receive e-mail from particular domain
- Next by thread: Re: config error: mail loops
- Index(es):
Relevant Pages
|