From owner-freebsd-questions Wed Jan 22 09:11:50 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id JAA14408 for questions-outgoing; Wed, 22 Jan 1997 09:11:50 -0800 (PST) Received: from gatekeeper.barcode.co.il (gatekeeper.barcode.co.il [192.116.93.17]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id JAA14398 for ; Wed, 22 Jan 1997 09:11:43 -0800 (PST) Received: (from nadav@localhost) by gatekeeper.barcode.co.il (8.7.5/8.6.12) id TAA18287; Wed, 22 Jan 1997 19:10:02 +0200 (IST) Date: Wed, 22 Jan 1997 19:10:02 +0200 (IST) From: Nadav Eiron To: WebPro HTML Services cc: questions@freebsd.org Subject: Re: virtual hosts/email w/FreeBSD/Sendmail In-Reply-To: <32E54B0E.310@baic.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Tue, 21 Jan 1997, WebPro HTML Services wrote: > FreeBSD 2.1.5 > sendmail 8.7.5 > > I am trying to configure sendmail to allow email for virtual hosts to > be directed to local users. (user@virtual.host -> user@real.host) > > There are many different resources out there for linux, and hardly two > that say the same thing. I know i must be close, but not quite close > enough. I know that there must be someone out there who has this setup > and i'm interested in finding out what i'm missing in my attempt. > > Any help is appreciated. > > Thanks in advance. > This are the instructions I once got on this list: >From shovey@buffnet.netWed Jan 22 19:07:27 1997 Date: Fri, 25 Oct 1996 16:47:43 -0400 (EDT) From: Steve To: freebsd-questions@FreeBSD.ORG Subject: virtual domains for email. I keep seeing this question posted - below is a post I saved that explains how to do virtual email domains ---------- Forwarded message ---------- Date: Thu, 15 Aug 1996 22:39:30 -0400 (EDT) From: Mark Mathis To: "Jun, Gyu-Chang" Cc: questions@freebsd.org Subject: Re: Virtual mail hosting? On Fri, 16 Aug 1996, Jun, Gyu-Chang wrote: > > Now, here is the question. Is it possible to set up virtual mail host? > I think if I set Cw record in sendmail.cf, aaa@www.aaa.com and > bbb@www.bbb.com can be handled. My point is that ONE FBSD box can accept > mail for webmaster@www.aaa.com and webmaster@www.bbb.com simutaneously.. > What you will need to do is first modify sendmail.cf to deal with two databases in the /etc directory that will handle the aliasing. add these two lines to sendmail.cf Kvirtualhosts btree /etc/virtualhosts.db Kvirtualmasqs btree /etc/virtualmasqs.db add this rule set for the return mail masq S40 R$* < @ $* > $* $@ $1 < @ $2 > $3 already fully qualified #bc instead of automatically using $M, lookup masquerade in virtualmasqs R$* $: $(virtualmasqs $1 $: $1 @ $M $) #bcR$* $: $1 @ $M add local qualification R$* @ $: $1 @ $j if $M not defined add this rule set for the virtual hosts S98 ################################ # sendmail for virtual domains # ################################ R$+ < @ $+ . > $: $1 < @ $2 > . R$+ < @ $+ > $* $: $(virtualhosts $1@$2 $: $1 < @ $2 > $3 $) R$+ < @ $+ > $* $: $(virtualhosts $2 $: $1 < @ $2 > $3 $) R$+ < @ $* > . $: $1 < @ $2 . > for inbound mail: create /etc/virtualhosts with your favorite text editor, there can be as many lines as you want for each virtual host. virtdomain.com john@mydomain.com (all mail goes to john) sam@virtdomain.com sam@mydomain.com webmaster@virtdomain.com bob@other.domain.com (forward mail to third system) create the database virtualhosts.db from virtualhosts with the makemap command (makemap comes with sendmail) makemap btree virtualhosts.db $* $@ $1 < @ $2 > $3 already qualified R$=E $@ $1 < @ $j> show exposed names R$+ $: $(virtualmasqs $1 $: $1 @ $M $) #R$+ $: $1 < @ $M > user w/o host R$+ <@> $: $1 < @ $j > in case $M undefined Good luck, Nadav