How to configure sendmail

Warren Block wblock at
Fri Nov 6 15:12:27 UTC 2009

Olivier Nicole wrote:
> I have this stupide little configuration that I cannot manage to get 
> working.
> I have one machine that I want to be able to deliver
> system mail (like cron and so on) with the following rules:
> - user1 on has the same username as on; I
>   want that mail sent to user1 is delivered to user1 at;

An alias will do that.

> - user2 on has no corresponding user on, 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 at y.z should be
>   delivered accordingly, eventually using a mail relay.

> I tried using masquerade in,

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

>  user1 is then rewritten as,

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

> 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:

> and user2 is also rewritten as user2 at

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

-Warren Block * Rapid City, South Dakota USA

More information about the freebsd-questions mailing list