Eric Sammons:
> I have a requirement to always_bcc except when email is internal.
Instead of always_bcc use sender_bcc_maps or recipient_bcc_maps.
> I have
> investigated options such as always_bcc, sender|recipient_bcc_maps and none
> seem to fully address the issue.
Yes they do. Just configure them so that the archive copy is
made when:
the sender is remote OR the receiver is remote.
/etc/postfix/main.cf:
sender_bcc_maps = pcre:/etc/postfix/archive-check
recipient_bcc_maps = pcre:/etc/postfix/archive-check
/etc/postfix/archive-check:
!/@example\.com$/ [email protected]
This is a predicate transformation, from (NOT (local AND local)),
what you asked for, into ((NOT local) OR (NOT local)), shown above.
Now, if it takes a PhD in nuclear physics to configure an MTA, then
that is another issue.
Wietse
> Sample scenario.
>
> My domain is example.com; when a email's RECIPIENT and SENDER are both @
> example.com then process email WITHOUT forwarding a copy to
> [email protected]. IF the email's RECIPIENT and / or SENDER are
> not @example.com then process email AND forward a copy to
> [email protected].
>
> Is this possible with postfix, postfix filters, and / or postfix + procmail?
>
> Thank you!
> Eric