SUMMARY : Mail Routing

From: Rahul Roy (
Date: Thu Aug 15 1996 - 12:48:07 CDT

My original question :

Hi Managers !!
The scenario :
Ultra 170 running Solaris 2.5
The predicament :
This machine is multi homed - 2 domains and
I want mail for to be sent to and mail for to be sent to How would I affect this ???

The responses :

Most of the responses pointed me towards the comp.mail.sendmail FAQ. The best
response was from Claus Assmann and goes something like this :

Taken from
How to handle multiple domains on one machine?
There are many solutions to this problem.
<A HREF="">
FAQ of sendmail V8</A> has now a section about this.

Other solutions are available from
<A HREF="">Johan Svensson</A>,
<A HREF="">Robert Sanders</A>,
<A HREF="">Homer Wilson

Taken from the FAQ for sendmail:
  * How do I manage several domains with sendmail V8?
        If you want to provide mailservice to several domains and be
        able to add identical names across different domains (example:
           user@a.dom.ain mb1@dom.ain
           user@b.dom.ain mb2@dom.ain
        you may accomplish this by using an external database in
        conjunction with minor Ruleset rewriting in Many
        ISPs (Internet Service Providers) has asked me and here's a
        general solution (you may combine it with userdb's if you
        need to).
        Here it goes:
        1. Make a textfile (I usually make one for each domain and
           concatenate them before database-compilation) with the
           following structure:
            user@a.dom.ain mb1@dom.ain
           user@b.dom.ain mb2@dom.ain
           The LHS (Left Hand Side) is the mail-adress of a particular
           user and the RHS is the corresponding mailbox. An example from
           the that might apply to the real world:
           Note that you have to spell out the complete email-address
           in the LHS entry. The RHS entry may be either a local address
           (for example 'johan' if that account exists) or a complete
           email-adress on another system (or a domain that the server
           recognizes as local for that matter).
        2. Compile the textfile into a database:
              makemap hash mbt.db <mbt
           You may you use other lookup-methods than hash (btree for
           example). The resulting database is mbt.db in this example
           and the input is the textfile mbt.
        3. Add a few lines in
           A. In the beginning (typically in the "local info" section or
              together with the user database option in the "options"
              # Declare mbt as a hash-lookup database:
              Kmbt hash /etc/mail/mbt.db
           B. In the Ruleset 98 section (local part of ruleset 0):
              # Use mailboxtable-database:
              R$+ < @ $+ . > $: $1 < @ $2 > .
              R$+ < @ $+ > $* $: $(mbt $1@$2 $: $1 < @ $2 > $3 $)
              R$+ < @ $+ > $* $: $(mbt $2 $: $1 < @ $2 > $3 $)
              R$+ < @ $+ > . $: $1 < @ $2 . >
        4. Restart sendmail:
           You must do this in order to reread the cf-file.
        5. Up and going!
        6. Test with sendmail -bv or sendmail -bt

Thanks to the following people for their input :
Claus Assmann <>
Richard Pieri <>
Cathy Hargrave <>
Joe Pruett <>
John Nguyen <>
Mike Ordun <mro@LANcomp.COM>

Thanks !!!

Rahul Roy
Systems Consultant
Bluestone Consulting Inc.


This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:08 CDT