Author Topic: UID of outgoing message  (Read 5060 times)

Offline unicorn

  • Jr. Member
  • **
  • Posts: 15
UID of outgoing message
« on: February 02, 2011, 05:53:12 AM »
How can I get outgoing message's UID? Is there any way to get it? May be in hook message_sent?

Offline doctorow

  • Newbie
  • *
  • Posts: 1
UID of outgoing message
« Reply #1 on: February 02, 2011, 03:02:31 PM »
I didn't like how Roundcube generates the message-id either (it shouldn't show the authorized username), so I replaced it through the additional_message_headers plugin.

cd plugins/additional_message_headers
cp -a config.inc.php.dist config.inc.php

edit config.inc.php and add the following to it (just before the last line ?>):

function anon_messageid()
{
        return '<' . date('YmdHis') . '.'
                . substr(str_pad(base_convert(microtime(), 10, 36), 16, uniqid(mt_rand()), STR_PAD_LEFT), -16)
                . '@' . $_SERVER['SERVER_NAME'] . '>';
}

$rcmail_config['additional_message_headers']['Message-ID'] = anon_messageid();

-- save and make sure to enable the additional_message_headers in your main config file.