Redirecting multiple domains to multiple mail servers

Jim Flowers jflowers at EZO.NET
Wed Feb 4 19:08:12 GMT 2004


Assuming sendmail for your outbound transport, there are seemingly endless
possibilities.  Perhaps the simplest all-in-one method is to use mailertable
entrys:

domain1.com         server1.whatever.com
domain2.com         server6.whatever.com
domainsoandso.com   server2.whatever.com
domainwhatnot.com   [192.168.0.101]

Note that you can avoid some potential dns looping problems by using ip
addresses and including them in the brackets [] to prevent lookups.  If you
anticipate multiple fqdn (including host portion) then you may also want to
include:

.domain1.com         server1.whatever.com
.domain2.com         server6.whatever.com
.domainsoandso.com   server2.whatever.com
.domainwhatnot.com   [192.168.0.101]

You will also have to identify these as acceptable domains using a relay-
domains table or, if you prefer, virtual-domains after adding
VIRTUSER_DOMAIN_FILE(`/etc/mail/virtual-domains')
to your mc file.  You DON'T want to identify them as local.

The access file can still be used in all it's glory but you can't use
virtusertable to reroute individual users as mailertable bypasses that.
With a relay, using access to validate real users and reject all others is
probably a good idea but can be tedious if you have many users (say more
than 100).

If routing user1 at domain1.com to one mail server and user2 at domain1.com to a
different mail server is needed there are better approaches using
virtusertable or aliases.

original message -----------------------------------------
domain1.com  ----> server1.whatever.com
domain2.com  ----> server6.whatever.com
domainsoandso.com  ----> server2.whatever.com
domainwhatnot.com  ----> 192.168.0.101

--
Jim Flowers<jflowers at ezo.net>



More information about the MailScanner mailing list