Zhou, Yan:
> Hi there,
>
> I have defined my own process to handle all incoming emails, by using a
> local transport. My master.cf has entry like this, where the Python
> script delegates each mail processing to somewhere else.
>
> connector unix - n n - - pipe
> flags= user=testuser argv=python /usr/local/bin/connector.py
>
>
> A problem I run into is that if I am sending an email out, and it gets
> bounced back, it is going through the above transport.
>
> Does Postfix see regular incoming mail and bounced mail (bounced by
> remote SMTP server) the same? Can we somehow separate their processing
> into two different transports?
By default, Postfix delivery decisions are based solely on envelope
recipient addresses. If you send mail to a non-existent address,
then the non-delivery report will be sent to your email address.
You can configure Postfix via access(5), header_checks(5) and
body_checks(5) tables to make delivery decisions based on other
message properties than the envelope recipient address; in addition
some Postfix features provide mail handling that is controlled by
the envelope sender address.
Wietse