I want to address a user as email@example.com and the it has to be redirected.forwarded to firstname.lastname@example.org
On mailserver access sendmail in test mode: "sendmail -bt", test for local alias "user" (don't want that): /map aliases <user>. Error=OK, else ditch <user> from /etc/aliases :-], quit w "/quit".
Open up /etc/mail/sendmail.mc, check/add entry: "FEATURE(`virtusertable', `hash /etc/mail/virtusertable')dnl". Generate (m4, mailconf --generate-cf) /etc/sendmail.cf.
Open up /etc/mail/virtusertable, add line: "email@example.com firstname.lastname@example.org
". Generate db: "makemap hash /etc/mail/virtusertable < /etc/mail/virtusertable". Test: "sendmail -bt", "/map virtuser <user>", should resolve "email@example.com" to exit "/quit".
AFAIK the only dependancies for this to work are
I. having resolvable domainnames,
II. all mail for mymachine.mydomain.com should be received by the mailserver,
III. user not having a local account on the mailserver, and
IV. a mailserver must be running on mymachine.mydomain.com.
Someone cowwect me if I'm wwonk.