[RCD] x-sender

Thomas Bruederli thomas at roundcube.net
Fri Oct 31 10:48:41 CET 2014


On Fri, Oct 31, 2014 at 10:37 AM, Cor Bosman <cor at xs4all.nl> wrote:
> Am 31.10.2014 um 10:24 schrieb Cor Bosman:
>>> Hey all, it seems that with return receipts messages there is no x-sender header. Is that on purpose?
>>
>> i guess "return receipts" means NDA / bounces
>>
>> * roundcube is just a client and don't mangle messages
>> * any header starting with X- is *non-standard* at all
>
> That's all fine, but normal emails produced through compose do have an x-sender.
>
> And actually, I looked wrong. Return receipts do get an x-sender, but these emails are probably not going through message_outgoing_headers hook.  I have a plugin that adds encrypted real user to outgoing headers, and I noticed return receipts weren't getting them.
>
> So to rephrase, am I right in concluding that return receipts dont pass message_outgoing_headers ? Is that fixable?

Confirmed. 'message_outgoing_headers' is only called for composed
messages. But in the source I see the following:

  // exec hook for header checking and manipulation
  // Depracated: use message_before_send hook instead
  $data = $RCMAIL->plugins->exec_hook('message_outgoing_headers',
array('headers' => $headers));

Thus you should use the 'message_before_send' hook which is triggered
for all outgoing messages including return receipts.

Best,
Thomas


More information about the dev mailing list