From owner-freebsd-questions Wed Sep 27 17:47:12 2000 Delivered-To: freebsd-questions@freebsd.org Received: from athserv.otenet.gr (athserv.otenet.gr [195.170.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 4A3A537B42C; Wed, 27 Sep 2000 17:46:21 -0700 (PDT) Received: from hades.hell.gr (patr530-b051.otenet.gr [195.167.121.179]) by athserv.otenet.gr (8.10.1/8.10.1) with ESMTP id e8S0j8429288; Thu, 28 Sep 2000 03:45:09 +0300 (EET DST) Received: (from charon@localhost) by hades.hell.gr (8.11.0/8.11.0) id e8S0em003886; Thu, 28 Sep 2000 03:40:48 +0300 (EEST) Date: Thu, 28 Sep 2000 03:40:48 +0300 From: Giorgos Keramidas To: Lisa Casey Cc: freebsd-isp@FreeBSD.ORG, freebsd-questions@FreeBSD.ORG Subject: Re: Sendmail: virtual hosts Message-ID: <20000928034048.A3780@hades.hell.gr> References: <00b901c02899$0779bd20$be32a0cd@lisa.jellico.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <00b901c02899$0779bd20$be32a0cd@lisa.jellico.com>; from lisa@jellico.com on Wed, Sep 27, 2000 at 11:38:40AM -0400 X-PGP-Fingerprint: 3A 75 52 EB F1 58 56 0D - C5 B8 21 B6 1B 5E 4A C2 X-URL: http://students.ceid.upatras.gr/~keramida/index.html Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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