Here is an alternative example without virtual alias maps, and perhaps easier to understand.
- One SMTP client that delivers mail from the PHP application host to the Internet. This uses smtp_generic_maps to transform [email protected] into [email protected]. - One SMTP client that delivers mail from the Internet to the PHP application host. This does the reverse transformation. /etc/postfix/master.cf: # Outbound with address translation. smtp unix - - n - - smtp -o smtp_generic_maps=hash:/etc/postfix/generic # Inbound with reverse address translation. smtp-in unix - - n - - smtp -o smtp_generic_maps=generic-reverse /etc/postfix/generic: # Outbound address translation. [email protected] [email protected] /etc/postfix/generic-reverse: # Inbound address translation. [email protected] [email protected] /etc/postfix/main.cf: transport_maps = hash:/etc/postfix/transport /etc/postfix/transport: # Select the inbound SMTP client for PHP application host. # Be sure to deliver both the translated and untranslated address! [email protected] smtp-in:app01.4reseller.org app01.4reseller.org smtp-in:app01.4reseller.org "postmap" the tables, and "postfix reload" to make the smtp-in channel available. Wietse
