Support Postfix Address Rewriting
Proposed feature
Postfix address rewriting purpose
Address rewriting is at the heart of the Postfix mail system. Postfix rewrites addresses for many different purposes. Some are merely cosmetic, and some are necessary to deliver correctly formatted mail to the correct destination. Examples of address rewriting in Postfix are:
-
Transform an incomplete address into a complete address. For example, transform "username" into "[email protected]", or transform "username@hostname" into "[email protected]".
-
Replace an address by an equivalent address. For example, replace "[email protected]" by "[email protected]" when sending mail, and do the reverse transformation when receiving mail.
-
Replace an internal address by an external address. For example, replace "[email protected]" by "[email protected]" when sending mail from a home computer to the Internet.
-
Replace an address by multiple addresses. For example, replace the address of an alias by the addresses listed under that alias.
-
Determine how and where to deliver mail for a specific address. For example, deliver mail for "[email protected]" with the smtp(8) delivery agent, to the hosts that are listed in the DNS as the mail servers for the domain "example.com". (
/usr/share/doc/postfix/README_FILES/ADDRESS_REWRITING_README)
Rationale
"To transform a locally valid address into a globally valid address when sending mail across the Internet.
This is needed when the local machine does not have its own Internet domain name, but uses something like localdomain.local instead." ( man 5 postconf | grep -A9 '^smtp_generic_maps' )
Additional context
Implementation should be quite similar like the postfix_aliases .