[rt-devel] support for dynamic envelope sender addresses

Sam Hanes sam at maltera.com
Thu Jul 28 12:50:31 EDT 2016


Hi All,

I'm trying to get RT to do something fairly complex with envelope
senders for an extension: I want to encode the transaction ID and the
recipient address with VERP, and I want to use different VERP domains
for privileged and unprivileged users. Something like this:

     priv'd:    rt+11758-privileged=example.com at authmail.example.com
     unpriv'd:  rt+11758-unprivileged=example.com at mail.example.com



First, it looks like RT's existing VERP support in v4.4.1 using the
`VERPPrefix` and `VERPDomain` config values encodes the sender (the
transaction creator), not the recipient, in the generated VERP address.
That doesn't seem particularly useful for the original purpose of VERP,
that being to make it easy to discover the recipient address affected by
a bounce message. It's understandable, though, since generating VERP
addresses per-recipient requires that one can never send messages with
more than one recipient.

That's not really an issue for me since I can use the VERP support in
Postfix (via the `-XV` sendmail flag) to split up multiple-recipient
messages and generate proper VERP senders. I mostly mention it to
explain why I'm not using the built-in VERP support.



Since I'm planning to use Postfix to generate the actual VERP addresses,
I just need RT to generate envelope senders like this:

     priv'd:    rt+11758 at authmail.example.com
     unpriv'd:  rt+11758 at mail.example.com

I see two other methods that could be used to set the envelope sender:
`SetOutgoingMailFrom` plus `OverrideOutgoingMailFrom`, or setting the
`-f` flag directly in `SendmailArguments`. Neither appears to support
CODE refs or any other mechanism for dynamically setting the envelope
sender usable to include the transaction ID. I therefore assume that
I'll need to patch `RT::Interface::Email::SendEmail()`.



Is it likely that a patch to add a callback capable of setting the
envelope sender in `RT::Interface::Email::SendEmail()` would be accepted
upstream?

Should such a callback be passed a reference to the array of `sendmail`
arguments so it can modify them as desired or should it be expected to
return an envelope sender address?



Thanks for your consideration,
Sam Hanes


More information about the rt-devel mailing list