Subject: Re: how to have a mail account name different from shell account
To: Henry Nelson <netb@yuba.ne.jp>
From: Jeremy C. Reed <reed@reedmedia.net>
List: netbsd-help
Date: 02/02/2007 18:22:11
On Sat, 3 Feb 2007, Henry Nelson wrote:

> Forever I've just let the mailbox name for Sendmail automagically be the
> same as the uid.  Is there some "simple" way to change the portion before
> "@" of an e-mail address so that it is different from the uid, and that
> Sendmail will refuse to receive e-mail addressed to the uid (return "No
> such user"), and only accept mail for that user addressed to the specified
> "e-mail name."  TIA

Should be able to do this with a sendmail /etc/mail/virtusertable.

You could setup the alias there to your @localhost account.

And then for the real@hostname account setup an "error:" target.

See /usr/share/sendmail/README for details.

Ask if you need more help.

(Newer NetBSD is moving to Postfix so if you want details with that I am 
sure someone can help there too.)

  Jeremy C. Reed