From owner-freebsd-questions@FreeBSD.ORG Sat Sep 17 02:04:53 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 30DCF16A41F for ; Sat, 17 Sep 2005 02:04:53 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from rosebud.otenet.gr (rosebud.otenet.gr [195.170.0.94]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7AD7643D46 for ; Sat, 17 Sep 2005 02:04:51 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from flame.pc (patr530-b175.otenet.gr [212.205.244.183]) by rosebud.otenet.gr (8.13.4/8.13.4/Debian-1) with ESMTP id j8H24lh6007074 for ; Sat, 17 Sep 2005 05:04:48 +0300 Received: from flame.pc (flame [127.0.0.1]) by flame.pc (8.13.4/8.13.4) with ESMTP id j8H24Z11001192 for ; Sat, 17 Sep 2005 05:04:35 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by flame.pc (8.13.4/8.13.4/Submit) id j8H24YRT001191 for freebsd-questions@freebsd.org; Sat, 17 Sep 2005 05:04:34 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Sat, 17 Sep 2005 05:04:34 +0300 From: Giorgos Keramidas To: freebsd-questions@freebsd.org Message-ID: <20050917020434.GC1021@flame.pc> References: <20050917014901.GA29887@teddy.fas.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050917014901.GA29887@teddy.fas.com> Subject: Re: A sendmail config question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Sep 2005 02:04:53 -0000 On 2005-09-16 21:49, stan wrote: > I'm setting up a 4.11 STABLE machine. > > 4.11 comes with sendmail 8.13.4, and I prefer to use this, rather than > build the one from ports (BTW if anyone has a strong reason that I should > do this different, I'd entertain a discussion on this). > > In any case the scenario I'm trying to set up is that I wat to recive mail > for say a@x.com, b@x.com ... a.y.com, c.y.com . Note that I _don't want to > accept mail for b@x.com. > > Now how I'm trying to do this is using /etc/mail/virtusertable I've got etnries > like this: > > stan@a.net stan > stanb@b.com stan > > In /etc/mail/local-host-names I have entries like: > > a.net > b.com > c.com I think the following paragraph from the sendmail.org page on virtual hosting may be helpful: % [See: http://www.sendmail.org/virtual-hosting.html] % % Note 1: if you have a local user, say sam, and there is no % key for sam@yourdomain.com and no catch-all key for % @yourdomain.com, then sendmail will fall back to the local % user sam when resolving sam@yourdomain.com. To prevent this, % you must use either a catch-all key or an explicit key for % sam@yourdomain.com; the error:nouser example above may be % useful in this instance. You have to specify a "catch-all" rule for the rest of the a.net or the b.com domain, with something like this: stan@a.net stan @a.net error:nouser No such user here stan@b.com stan @b.com error:nouser No such user here > Notice that there is not entry in virtusertable for stan@c.com, yet > mail addressed to that address is acepted and deliverd (as are the ones > I _want_ to work) to the local user stan. A similar, since you have c.com as a local host name (virtual or not) but no virtusertable entries, so Sendmail assumes all @c.com addresses can be delivered to existing local users. - Giorgos