Another email issue

Dave Anderson, 7/9/2003

Mark Olson requested handling for some aliases where any reply to the original message would automatically:

If we ignore the BCC issue, the first part should be easy -- when the message is received on our mailserver just run it through something (procmail?) which adds a 'reply-to' header which specifies both the original sender and the alias itself.  Any mail client which properly handles the 'reply-to' header (which certainly ought to be all of them) would then do the right thing when the message is replied to.

Doing the whole package is a bit harder, but there's at least one obvious and not especially difficult way to do it (I don't know if there's any affordable tool that already does this; I haven't yet looked for one).  The implementation would be in two parts plus a database.  (1) all incoming messages to aliases of this type are piped through something which records in the database the content of the 'message-id' header, the sender (from the headers) (and perhaps any other addressees from the 'to' and 'cc' headers), the alias receiving the message (from the envelope), and the current date and time, adds a 'reply-to' header pointing to a special username, and resends the message to all of the targets of the alias.  Entries in the database are automatically deleted after, e.g., 3 months.  (2) All messages to that special username have the content of their 'in-reply-to' header looked up in the database (if not found, bounce the message back to its sender); the 'from' header content is replaced with the alias, the 'to' header content is replaced with the sender of the original message, all of the targets of the alias are added as 'bcc' header content, and the message is resent.  If we want to do a more complete job of disguising the actual origin of the message, log and strip off any 'received' headers and replace the content of the 'message-id' header with a local message-id.  If we want to get fancy, we could also use this to keep track of messages which have not been replied to...  Again, any mail client which properly handles the 'reply-to' header (doing which includes generating a proper 'in-reply-to' header) will automatically work with this -- all of the magic is done on the mailserver.