I haven't had the occasion to dissect the webmail internals enough to know where you'd add such functionality specific to HTTP, but if adding it to all outgoing messages is satisfactory, then you can write a plugin.
In fact, here are two links. One describes the method of creating a plugin and uses an example that includes a number of other features. The second link contains the actual code for the entire plugin. You can just remove the additional functionality that you don't want to employ before compiling.
<a href="http://docs.iplanet.com/docs/manuals/messaging/nms41/api/ms4sp.htm#996942 ">Sample SMTP Plugin</a>
<a href="http://docs.iplanet.com/docs/manuals/messaging/nms41/api/ms5.htm#999760"& gt;SMTP Plugin Code</a>