We have a postfix that lives on a web server and processes mails both from the system (cron mails etc.) and the web application.
It sends mails for an own domain and a customer's domain.
Mails for owndomain.org (owndomain.org is recipient) are relayed over a relayhost that we control and that is allowed to send mails for this domain. We do this via transport_maps
The webserver is hosted by us for our customer. So it must also be able to send mails with customerdomain.org as sender. Unfortunately there is no way to make our customer change it's SPF record to include our mailserver as well. So our solution would be, to relay mails with this sender over our customer's mail server.
However, there are mails with sender (from) = customerdomain.org and recipient = owndomain.org.
Since transport_maps beats sender_dependent_relayhost_maps all mails with exactly this from/rcpt to combination would go over our own relayhost.
Is there a way to make it work as we want?