A sendmail config question

Giorgos Keramidas keramida at ceid.upatras.gr
Fri Sep 16 19:04:53 PDT 2005

On 2005-09-16 21:49, stan <stanb at 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 at x.com, b at x.com ... a.y.com, c.y.com . Note that I _don't want to
> accept mail for b at x.com.
> Now how I'm trying to do this is using /etc/mail/virtusertable I've got etnries
> like this:
> stan at a.net                                       stan
> stanb at 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 at yourdomain.com and no catch-all key for
%       @yourdomain.com, then sendmail will fall back to the local
%       user sam when resolving sam at yourdomain.com. To prevent this,
%       you must use either a catch-all key or an explicit key for
%       sam at 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 at a.net                      stan
        @a.net                          error:nouser No such user here

        stan at b.com                      stan
        @b.com                          error:nouser No such user here

> Notice that there is not entry in virtusertable for stan at 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

More information about the freebsd-questions mailing list