I want to address a user as firstname.lastname@example.org and the it has to be redirected.forwarded to email@example.com
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: "firstname.lastname@example.org email@example.com
". Generate db: "makemap hash /etc/mail/virtusertable < /etc/mail/virtusertable". Test: "sendmail -bt", "/map virtuser <user>", should resolve "firstname.lastname@example.org" 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.