0

I have Request Tracker 4.4 succesfully set up to use msmtp to send emails using account "support@domain.com" (used this manual: https://rt-wiki.bestpractical.com/wiki/Msmtp).

But, I need to send mail from "support-comment@domain.com", too. I'm thinking of enhcancing the msmtp_wrapper: catching sdtin to a variable, then parsing it to get "From:", then pipe it to msmtp, specifying "-a" (account).

Is there any sane workaround? Or is my solution the best possible?

real_sm
  • 112
  • 2
  • 14

1 Answers1

0

The From address in outgoing mail can all be configured in RT. You can set up global defaults for all of RT in RT_SiteConfig.pm with $CorrespondAddress and $CommentAddress. In the admin web UI for each queue, you can also set an address for each of these. Once set, mail sent from these queues should have an appropriate From address.

Jim Brandt
  • 280
  • 1
  • 4
  • Yes, that's right, but how do I let msmtp_wrapper know, which account to use? – real_sm May 24 '17 at 20:19
  • Assuming msmtp doesn't modify the email From address, it should only be setting the envelope from address. Email clients should still recognize the email From and Reply-to, so the smtp account you use to send shouldn't matter. If you send an email with a From address different from the msmtp account, what do you see in your email client when you receive the email? – Jim Brandt May 26 '17 at 12:34
  • Yes, thank you. Resolved this by using "--read-envelope-from" argument into msmtp_wrapper script. – real_sm Aug 04 '17 at 08:26