Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Sep 2005 05:04:34 +0300
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        freebsd-questions@freebsd.org
Subject:   Re: A sendmail config question
Message-ID:  <20050917020434.GC1021@flame.pc>
In-Reply-To: <20050917014901.GA29887@teddy.fas.com>
References:  <20050917014901.GA29887@teddy.fas.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2005-09-16 21:49, stan <stanb@panix.com> 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




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