I think its possible, try something like that on smtpd_recipient_restrictions
Code:
smtpd_recipient_restrictions =
permit_mynetworks,
reject_sender_login_mismatch,
permit_sasl_authenticated,
...
Now you just have to configure mynetworks to something like
Code:
mynetworks_style = host
mynetworks = 127.0.0.0/8
When your local script try to send an e-mail the first rule (permit_mynetworks) will match and the e-mail will be going.
When some user try to send an e-mail, the second rule will check the mail sender to see if it matches with the sasl_authenticated login, if so, the message will be send and so on...
I believe that this configuration works for what you want, but have some tests is always good!
[]'s, FMC!