[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Sendmail problems
On Sun, 25 Jan 1998, Itamar S.-T. wrote:
> I'm running a server (RH4.2 kernel 2.0.32) which has multiple IP's, and
> thereafore multiple hostnames. When I send mail to the default hostname
> (jhom.com) it has no problems. However, when sending to another name
> (maxnm.com) it bounces the folloeing message to me (note that an MX DNS
> record is set up for maxnm.com, and I added maxnm.com to
> /etc/sendmail.cw):
Do you have sendmail.cf configured to read sendmail.cw?
:
##################
# local info #
##################
Cwlocalhost
Fw/etc/sendmail.cw
:
Also, read this:
<HTML>
<HEAD>
<TITLE>Re: Virtual Host/ Sendmail Problem</TITLE>
</HEAD>
<BODY>
<H1>Re: Virtual Host/ Sendmail Problem</H1>
<HR>
<PRE>
<strong>From </strong> <A HREF="mailto:chris.needham@zetnet.co.uk">chris.needham@zetnet.co.uk</A> (Chris Needham)
<strong>Date </strong> Fri, 13 Dec 1996 00:31:05 GMT
<strong>Newsgroups </strong> <A HREF="news:comp.os.linux.networking">comp.os.linux.networking</A>
<strong>Message-ID </strong> <58q84s$li2@irk.zetnet.co.uk>
<strong>References </strong> <A HREF="/cgi-bin/news?id@32AC6A04.4487@mornet.com">1</A>
</PRE>
<HR>
<PRE>
Dave Moore <dave@mornet.com> wrote:
>Hey everyone,
> Got a question for you.
>My mailhub is a linux machine running 2.0.23. and I host a couple of
>domains. I am using <strong>sendmail</strong> 8.7.5/8.7.3, and so far when I set up mail
>for the <strong>virtual</strong> domains I just add a good 'ol Cwdomain.name to the
><strong>sendmail</strong>.cf file. What I would like is a solution that would allow for
>multiple dave's or multiple kari's etc.. The way it is now
>dave@realdomain.name is the same as
>dave@virtualdomain.name.
>Which limits the the users choices a bit.
>Any info would be much appreciated
>thanks in advance
>dave
>CSU
Futher to Jeff's post here are the full instructions originally posted
to comp.mail.<strong>sendmail</strong>, i hope they help.
Q3.7 -- How do I manage several (<strong>virtual</strong>) domains?
Date: Aug 9, 1996
If you want to provide mailservice to several domains and be able
to add identical names across different domains, as in this 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 <strong>sendmail</strong>.cf. Many ISPs
(Internet Service Providers) have asked me and here's a general
solution (you may combine it with userdb's if you need to):
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
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 <strong>sendmail</strong>.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 $)
RERROR $* $#error $: $1
R$+ < @ $+ > . $: $1 < @ $2 . >
4. The next-to-last line of these rules let you have an alias
file like:
joe@somedom.com joe
jim@somedom.com jim@othersite
somedom.com ERROR "No such user"
And still have mail addressed to unknown users at that domain
bounce properly. You can also do a form of redirects, such
as:
fred@somedom.com ERROR "This user has moved to
fred@otherdom.com"
5. Restart <strong>sendmail</strong>. You must do this in order to reread the
cf-file.
6. Test with <strong>sendmail</strong> -bv or <strong>sendmail</strong> -bt
Note: Alternate sets of instructions and/or kits
can be found at <<A HREF="http://www.westnet.com/providers">http://www.westnet.com/providers</A>>,
<<A HREF="http://hub.org/softdocs/Sendmail-VD">http://hub.org/softdocs/<strong>Sendmail</strong>-VD</A>>,
<<A HREF="ftp://samson.oslo.uninett.no/pub/unix/sendmail/">ftp://samson.oslo.uninett.no/pub/unix/<strong>sendmail</strong>/</A>>, and
<<A HREF="http://jos.net/projects/mbt/">http://jos.net/projects/mbt/</A>>. Neither these nor the instructions
here have yet to be tested by the maintainer of this FAQ, but are
believed to work correctly. Which you use is a matter of your
personal aesthetics.
Chris Needham.
</PRE>
</BODY>
</HTML>
EE 77 7F 30 4A 64 2E C5 83 5F E7 49 A6 82 29 BA ~. .~ TclTek Ltd.
=}-------------------------------------------------ooO--U--Ooo-----------{=
- benavrhm@tcltek.co.il - tel: +972.52.670.353, http://www.tcltek.co.il -