> On May 3, 2018, at 8:37 PM, Phil Ingram <p...@communityds.com.au> wrote:
> 
> We are using postfix as a central email relay that forwards to an external 
> provider for trusted sending to our customers. Centralising this relay is a 
> must to limit the distribution of sasl creds required for sending to our 
> external provider. We have several products, each with dev, staging and 
> production environments and each with their own defined Class A address 
> ranges (10.0.0.0/16). Every server has an FQDN which makes email sent to 
> accounts such as 'root' from CRON easy to filter - "To: 
> root@$host.app-environment.local".

There's your mistake, you're trying to route mail based or header regular
expressions.  Don't do that.  Route mail based on the envelope recipient
address, your address rewriting tables (aliases, virtual aliases, etc.) and
transport settings.  If needed, consider a separate null-client instance
for cron-generated mail.

But first explain in more detail where the mail that needs to go to the
provider originates from, and how it is different from the mail that
should not go to the provider.

-- 
        Viktor.

Reply via email to