On Mon, Oct 28, 2024 at 06:17:56PM -0400, Wietse Venema via Postfix-users wrote:
> > My problem is that I have to slow down the sending rate to domain1, but > > in the same time I need to segregate (send out on different IP address) > > based on sender address. > > > > So, as I understand this is possible only with multi-instance? > > main.cf: > # Limitation: this setting is overruled with FILTER om access map > # or header/body_checks. > smtpd_sender_restrictions = inline:{ > { u...@example.com = FILTER smtpb: } } > > A less hackey solution would require a transport policy service, > kind of like check_policy_service for the scheduler. Or multiple instances with sender_dependent routing in the front-end instance sometimes bypassing the default back-end instance which ignores sender addresses and routes by recipient. This avoids problems if "u...@example.com" happens to send mail to a local address, that should not be sent via "smtpb". Postfix sensibly prioritises choosing transports by recipient rather than sender when explicit non-default routing is available. The OP's case of carving out very special exceptions does not have a simple solution. What's "missing" is a way to say that an explicit transport selected for a recipient is still in some sense a lower priority "default" transport that a sender-dependent transport might override. This would include custom delivery channels to remote destinations used only for traffic shaping, but not deliveries to local or relay recipients. One way to do this would be designate additional transports as being essentially secondary "default" transports. default_transport = smtp secondary_default_transports = smtpa in which case sender_dependent_default_transport would override "smtp" and "smtpa", but not "relay", "local", or "virtual", ... -- Viktor. _______________________________________________ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org