On 6/18/12, Wietse Venema <[email protected]> wrote:
> On the PHP application host use smtp_generic_maps to transform
> [email protected] to [email protected].
>
> On the relay host use virtual_alias_maps (NOT: virtual_alias_domains)
> to transform [email protected] to [email protected].

achal tomar:
> Thanks wietse for your good reply but my PHP application host doesnt
> has postfix installed on it at it just sends the mails to my server
> i.e r09.4reseller.org for transfer so can this be not done on my
> actual mail server i.e r09.4reseller.org.

In that case you need to two SMTP clients on the relay host.

- 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 doesn't use smtp_generic_maps.

/etc/postfix/master.cf:
    # Outbound with address translation.
    smtp      unix  -       -       n       -       -       smtp
        -o smtp_generic_maps=hash:/etc/postfix/generic
    # Inbound. Address translation happens in virtual_alias_maps.
    smtp-in   unix  -       -       n       -       -       smtp
        -o smtp_generic_maps=

/etc/postfix/generic:
    # Outbound address translation.
    [email protected] [email protected]

/etc/postfix/main.cf:
    virtual_alias_maps = hash:/etc/postfix/virtual
    transport_maps = hash:/etc/postfix/transport

/etc/postfix/virtual:
    # Inbound address translation.
    [email protected] [email protected]

/etc/postfix/transport:
    # Select the inbound SMTP client for PHP application host.
    app01.4reseller.org smtp-in:app01.4reseller.org

"postmap" the tables, and "postfix reload" to make the smtp-in
channel available.

        Wietse

Reply via email to