Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Sep 2000 03:40:48 +0300
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Lisa Casey <lisa@jellico.com>
Cc:        freebsd-isp@FreeBSD.ORG, freebsd-questions@FreeBSD.ORG
Subject:   Re: Sendmail: virtual hosts
Message-ID:  <20000928034048.A3780@hades.hell.gr>
In-Reply-To: <00b901c02899$0779bd20$be32a0cd@lisa.jellico.com>; from lisa@jellico.com on Wed, Sep 27, 2000 at 11:38:40AM -0400
References:  <00b901c02899$0779bd20$be32a0cd@lisa.jellico.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 27, 2000 at 11:38:40AM -0400, Lisa Casey wrote:
> Hi,
> 
> This is a Sendmail problem but I hope someone here can help me. I'm
> running Sendmail 8.9.3 on FreeBSD 3.2
>
> My FBSD box accepts mail for the virtual domain hardwickclothes.com and
> sends that E-mail to the local user hardmail. This works just fine.

To install a virtual domain called hell.gr to a machine today, I took
the following steps:

0. Set up the DNS server to point the primary MX record to the machine,
   and the secondary MX record to some other machine.

1. Add FEATURE(`virtusertable', `-o /etc/mail/virtusertable') to my
   master-config file, and regenerate my sendmail.cf file.

	% cd ~/sendmail
	% vi gray.mc
	[ add FEATURE(`virtusertable', `-o /etc/mail/virtusertable') ]
	% make gray.cf
	[ ./Makefile takes care of generating gray.cf from gray.mc ]

2. Copy my new configuration to /etc/mail/sendmail.cf

3. Add "hell.gr" to the /etc/mail/sendmail.cw file.

4. Add a line that allows relaying from the secondary MX for the domain
   in /etc/mail/access.

	# cd /etc/mail
	# vi access
	[ add a line: secondary.mx.host.name.gr RELAY ]
	# makemap hash access < access

5. Edit /etc/mail/virtusertable and add a line that contains:

        dns@hell.gr		charon@localhost
	postmaster@hell.gr	charon@localhost
	info@hell.gr		charon@localhost

6. Generate the virtusertable.db file:

	# makemap hash virtusertable < virtusertable

7. Restart Sendmail:

	# killall -hup sendmail

That's all there was to it.  I could then send mail to info@hell.gr and
have Sendmail correctly forward it to the local user that is responsible
for that domain, i.e. "charon".

The setup of procmail to separate the mail messages to different folders
for info@hell.gr, postmaster@hell.gr and dns@hell.gr, was trivial.  The
rules were:

	DEFAULT=$HOME/mail/00.inbox

	:0 H
	* ^TOdns@hell.gr
	01.hell.gr-dns

	:0 H
	* ^TOinfo@hell.gr
	01.hell.gr-info

	:0 H
	* ^TOpostmaster@hell.gr
	01.hell.gr-postmaster

Then, all was ready to work properly.

-  -  --  ---  -----  --------  -------------  ---------------------
Giorgos Keramidas, < keramida @ ceid . upatras . gr >


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000928034048.A3780>