Roundcube Community Forum

 

UID of outgoing message

Started by unicorn, February 02, 2011, 05:53:12 AM

Previous topic - Next topic

unicorn

How can I get outgoing message's UID? Is there any way to get it? May be in hook message_sent?

doctorow

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.