From owner-freebsd-questions Fri Feb 21 5:28:42 2003 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 2FBD837B401 for ; Fri, 21 Feb 2003 05:28:40 -0800 (PST) Received: from diana.northnetworks.ca (att-ws20.switchview.com [216.13.70.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id 77E6C43FA3 for ; Fri, 21 Feb 2003 05:28:39 -0800 (PST) (envelope-from iaccounts@northnetworks.ca) Received: from localhost (iaccounts@localhost) by diana.northnetworks.ca (8.11.6/8.11.6) with ESMTP id h1LDSZm59312; Fri, 21 Feb 2003 08:28:36 -0500 (EST) (envelope-from iaccounts@northnetworks.ca) Date: Fri, 21 Feb 2003 08:28:35 -0500 (EST) From: IAccounts To: Laszlo Vagner Cc: Questions@FreeBSD.ORG Subject: Re: usernames and aliases etc. In-Reply-To: <200302201022.11194.george@vagner.com> Message-ID: <20030221081843.J52146-100000@diana.northnetworks.ca> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > While hosting mail for several domains, a local user > with an account name of say "biz" has a domain of say "domain.com" > would receive mail from other domains hosted at the same site > such as "biz@otherdomain.com". > > What I am looking for is a general setup criteria that would eliminate this > behavior so that biz@otherdomain.com would be rejected even though > otherdomain.com is hosted on the same server but has no username of biz. I use the virtusertable (sendmail) for this. There are several things that I have done. You can use the *strange* method, which works very well, and allows for greater expandibility and management when dealing with thousands of users, or use the straight up approach and ensure that there is a catchall for the domain after it's last valid user, so _anything_@domain.com will not be sent to the improper user: a@companya.com companya01 b@companya.com companya02 c@companya.com companya03 @companya.com company04 a@companyb.com companyb01 b@companyb.com companyb02 @companyb.com /dev/null or tammy@this.com tammy david@this.com david @this.com /dev/null biz@that.com biz help@that.com help @that.com biz Both of these situations force the username to be inside of it's own domain to accept mail. With both setups above, you can be assured that biz will only receive email if it is sent to the domain his virtuser entry resides in. Note that the second approach is the exact same, but using the actual named account. This will quickly become a nightmare (and a large mess) if you get up around the thousand user mark. Steve > > One thing I thought of would be to use strange local usernames and > then create virtual users that point to them. > > can anyone give me a suggestion on standard practice with this? > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message