My original question :
Hi Managers !!
The scenario :
Ultra 170 running Solaris 2.5
The predicament :
This machine is multi homed - 2 domains abc.com and xyz.com
I want mail for info@abc.com to be sent to foo@abc.com and mail for
info@xyz.com to be sent to bar@xyz.com. 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 http://www.informatik.uni-kiel.de/%7Eca/email/english.html
<H3>
How to handle multiple domains on one machine?
</H3>
There are many solutions to this problem.
The
<A HREF="http://www.informatik.uni-kiel.de/%7Eca/faqs/sendmailv8.html">
FAQ of sendmail V8</A> has now a section about this.
Other solutions are available from
<A HREF="http://www.josnet.se/projects/mbt/mbt.txt">Johan Svensson</A>,
<A HREF="http://hub.org/softdocs/Sendmail-VD">HUB.ORG</A>,
<A HREF="http://www.westnet.com/providers/maildomains.doc">Robert Sanders</A>,
and
<A HREF="http://www.amazing.com/internet/virtual-homer.html">Homer Wilson
Smith</A>.
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
user@c.dom.ain mb@outer.space
you may accomplish this by using an external database in
conjunction with minor Ruleset rewriting in sendmail.cf. 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
user@c.dom.ain mb@outer.space
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:
webmaster@josnet.se wm.list@eowyn.josnet.se
webmaster@client1.se joe@client1.se
webmaster@client2.se anne@another.provider.se
webmaster@client3.se joe@client3.se
joe@client1.se c1_joe@mail.josnet.se
joe@client3.se joeuser
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 sendmail.cf:
A. In the beginning (typically in the "local info" section or
together with the user database option in the "options"
section):
# 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 <ca@informatik.uni-kiel.de>
Richard Pieri <ratinox@unilab.dfci.harvard.edu>
Cathy Hargrave <cathy@mercury.stm.com>
Joe Pruett <joey@q7.com>
John Nguyen <jnguyen@mmts.eds.com>
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