I'm using Postfix with Cyrus Imap.
The login is done by authenticating with GSS-API (SSO).
The format of mail accounts for all users is username@ejemplo.org.
For a few users want your mail account follow another format.
Example that pepe has as pepe1@ejemplo.org as mail account.
All who receive mail from pepe have as sender pepe1@ejemplo.org.
And that all mail sent to pepe1@ejemplo.org receive pepe.
I have the following:
In /etc/postfix/main.cf add
virtual_alias_maps = hash:/etc/postfix/virtual
canonical_maps = hash:/etc/postfix/canonical
sender_canonical_maps = hash:/etc/postfix/canonical
recipient_canonical_maps = hash:/etc/postfix/canonical
/etc/postfix/virtual
pepe1@ejemplo.org pepe@ejemplo.org
pepe2@ejemplo.org pepe@ejemplo.org
/etc/postfix/canonical
pepe@ejemplo.org pepe1@ejemplo.org
pepe pepe1
Also run the following lines:
postmap /etc/postfix/virtual
postmap /etc/postfix/canonical
If sending an email to pepe1@ejemplo.org get what I want, pepe@ejemplo.org can read the mail.
But if I send an email from pepe@ejemplo.org you receive the mail from pe@ejemplo.org and NO pepe1 as I want it to display.
Any help?, Thanks for help.