Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Nov 2009 08:12:14 -0700 (MST)
From:      Warren Block <wblock@wonkity.com>
To:        Olivier Nicole <Olivier.Nicole@cs.ait.ac.th>
Cc:        questions@freebsd.org
Subject:   Re: How to configure sendmail
Message-ID:  <alpine.BSF.2.00.0911060754570.81381@wonkity.com>

next in thread | raw e-mail | index | archive | help
Olivier Nicole wrote:
> I have this stupide little configuration that I cannot manage to get 
> working.
> 
> I have one machine a.domain.net that I want to be able to deliver
> system mail (like cron and so on) with the following rules:
> 
> - user1 on a.domain.net has the same username as on domain.net; I
>   want that mail sent to user1 is delivered to user1@domain.net;

An alias will do that.

> - user2 on a.domain.net has no corresponding user on domain.net, but
>   it has an alias defined; I want to mail sent to user2 is delivered
>   to the alias.

Creating an alias for a nonexistent user seems to work here.

> - of course, mail addressed to a full address x@y.z should be
>   delivered accordingly, eventually using a mail relay.

> I tried using masquerade in submit.mc,

I don't edit submit.mc, just <hostname>.mc.

>  user1 is then rewritten as user1.domain.net,

That's the masquerade...  Wait, is that a typo?  Should be 
"user1@domain.net"?

> but the alias for user2 is not parsed

newaliases(1) is needed after editing /etc/mail/aliases.  And there is a 
bug if you're using 8.0:

http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/139870

> and user2 is also rewritten as user2@domain.net.

Masquerade again.  Not clear whether that's what you want.

-Warren Block * Rapid City, South Dakota USA



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