something like X-Procmid: msgid11111999239812
You shouldn't need to re-use the original message-id. Traditionally
a message-id is generated by using the current date, process ID of the
MTA, and the hostname.
I want to do this so that i can get a unique X-Procmid header with every
email. In the foll: recipee, i get the same mesaage id for multiple
recipients in the same email. For ex, if one message is bcc'ed to more than
one, then all those messages have the same message ID.
MSGID=`perl -e 'use
| formail -I "X-Procmid: $MSGID"
Now, if you don't want to use perl you can try extracting the date from
the From envelope header. It doesn't look as cool, though. :)
# NOTE THAT [ ]+ below contains a space and a tab in between brackets
* ^From .*\/[A-Za-z]+[ ]+[A-Za-z]+[ ]+[0-9]+[ ]+[0-9:]+[ ]+[0-9]+
| formail -I "X-Procmid: <\"$$-$MATCH\"@$HOSTNAME>"