Using Postfix Header_Check to prevent spoofing

I have a simple problem that I am having trouble fixing.
I have a web app that sends mail through a postfix server as domain1.com, however the actual Postifix server is domain2.com.
When the app sends the email that appears to come from domain1.com to the real domain1.com it is seen as spoofing and is rejected.
Whitelisting is on domain1.com is not an option so my thought was I could use Header_Checks to replace *.domain1.com with [email protected].

I have tried several examples seen around the internet but none are working: