Emails for support and support-comments with different authentication

I’m trying to set up RT so we can use two different accounts with different
authentications for suppport and support-comment.
The reason is because mail-server doesn’t allow send as another user ("from"
field must match sender e-mail address).
Is it possible to somehow catch the from field in and use it in
$SendmailArguments to the mta (in our case msmtp with msmtp_wrapper)?
I would like to do something like
and catch it in the wrapper.

Current msmtp wrapper looks like this:

account support@domain
from support@domain
user user1
password xxxxx

account support-comment@domain
from support-comment@domain
user user2
password yyyyy

account default : support@domain

This is working only when From is support@domain but if it is
support-comment@domain the following error is generated:
smtpstatus=550 smtpmsg=‘550 5.7.60 SMTP; Client does not have permissions to
send as this sender’ errormsg='the server did not accept the mail’

Any suggestion?

View this message in context: