- Go to Postfix and open the “opt/trend/imss/postfix/etc/postfix/canonical”
- Add new lines with email mappings in following format:
john@example.com john.doe@example.org
- Save your changes
- Go to Postfix and open the “opt/trend/imss/postfix/etc/postfix/main.cf”
- Point the canonical_maps parameter to the canonical file with a new line:
canonical_maps = hash: opt/trend/imss/postfix/etc/postfix/canonical
- Save your changes
- Execute postmap against canonical file and reload Postfix so that it recognizes changes to main.cf:
#postmap opt/trend/imss/postfix/etc/postfix/canonical #postfix reload
This configuration will rewrite "john@example.com" sender to " jane.doe@example.org".
Reference: https://www.postfix.org/ADDRESS_REWRITING_README.html#canonical