sender rules ahead of recipient rules?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

sender rules ahead of recipient rules?

Paulo Fraser

We send email on behalf of customers as part of our product and run outbound only mail servers for this.  Thus we send out mail with many different sender addresses.  Some customers have asked us to relay their mail through their servers, which we are happy to do.   sender_dependent_relayhost_maps works great for this.  However, we also have some custom transport_maps in place for some recipient domains (e.g. gmail.com) where we do some throttling.  The problem is that transport maps overrides any sender_dependent_relayhost_maps as is documented.  Is there any way around this?  Can I have rules to relay emails to a different server based on sender address as the first priority and then for anything that doesn’t match those rules, then apply other rules such as transport maps that are recipient based?

 

--

Paulo Fraser

Lithium Technologies, Inc.

415.757.3220

 

Reply | Threaded
Open this post in threaded view
|

Re: sender rules ahead of recipient rules?

Noel Jones-2
On 9/29/2017 1:23 PM, Paulo Fraser wrote:

> We send email on behalf of customers as part of our product and run
> outbound only mail servers for this.  Thus we send out mail with
> many different sender addresses.  Some customers have asked us to
> relay their mail through their servers, which we are happy to do. 
>  sender_dependent_relayhost_maps works great for this.  However, we
> also have some custom transport_maps in place for some recipient
> domains (e.g. gmail.com) where we do some throttling.  The problem
> is that transport maps overrides any sender_dependent_relayhost_maps
> as is documented.  Is there any way around this?  Can I have rules
> to relay emails to a different server based on sender address as the
> first priority and then for anything that doesn’t match those rules,
> then apply other rules such as transport maps that are recipient based?

You can use a check_sender_access map with a FILTER result pointing
to the relayhost to be used for that sender domain.

Find details of the FILTER action in
http://www.postfix.org/access.5.html



  -- Noel Jones
Reply | Threaded
Open this post in threaded view
|

Re: sender rules ahead of recipient rules?

Viktor Dukhovni
In reply to this post by Paulo Fraser

> On Sep 29, 2017, at 2:23 PM, Paulo Fraser <[hidden email]> wrote:
>
> We send email on behalf of customers as part of our product and run outbound only mail servers for this.  Thus we send out mail with many different sender addresses.  Some customers have asked us to relay their mail through their servers, which we are happy to do.   sender_dependent_relayhost_maps works great for this.  However, we also have some custom transport_maps in place for some recipient domains (e.g. gmail.com) where we do some throttling.  The problem is that transport maps overrides any sender_dependent_relayhost_maps as is documented.  Is there any way around this?  Can I have rules to relay emails to a different server based on sender address as the first priority and then for anything that doesn’t match those rules, then apply other rules such as transport maps that are recipient based?

Only if you replace sender_dependent_transport_maps with FILTER access(5) rules.

--
        Viktor.