Subject: mail header munging with "formail"

From: "J. Daniel Smith" <[email-masked]>
Date: Thu, 30 Mar 95 11:31:04 -0500

This isn't really a very much of a procmail question, but I figure
"formail" users are good with mail headers.

Part of our bug-reporting system uses Lotus Notes, which has rather
limited email capabilites (at least compared to what you can do with
"procmail").  I've worked around some of this by putting a wrapper
around "sendmail" as follows
-----
#!/bin/sh
if [ "$1" = "-bd" ]; then
  exec /usr/lib/SENDMAIL $*
else
  /usr/local/bin/procmail /home/nadmin/add-replyto.rc | \
  exec /usr/lib/SENDMAIL $*
fi
-----

/home/nadmin/add-replyto.rc looks like
-----
PATH=/bin:/usr/bin:/usr/local/bin:/usr/ucb
SHELL=/bin/sh

DEFAULT=|

#####
##### MAJOR HACK to add a Reply-To: header to support mail from notes
#####
:0f
* ^Subject: Re: SPR [0-9][0-9][0-9][0-9][0-9]* - 
* ^From:.*<.*/[email-masked]>
| formail -f -a "Reply-To: [email-masked]"
-----

This works fine as long as the mail program used by the recipient
understands the "Reply-To:" header.  Unfortunately, it seems there are
still many MUAs in use which don't, or there are users which don't
know what this header means.  The end result is I still get a lot of
mail sent to my personal account, instead of "[email-masked]".

My question is then: what headers should I change to further minimize
getting mail sent to my own account instead of [email-masked]?
Clearly, I want to change "From:" to be "[email-masked]"; thus
removing the need for the "Reply-To:" header.  However, I'd like to
preserve the original "From:" line somehow, since that is the user who
sent the message.  The "Resent-*" headers don't quite make sense,
since the message isn't really being forwarded.  About the best I
could come up with is "X-Orig-From:" or "Old-From:" (formail's -i option). 
Does anyone have any better suggestions?

Thanks,
   Dan
--------------------- message is author's opinion only --------------------
J. Daniel Smith <[email-masked]>               http://www.bristol.com/~dan
Bristol Technology Inc.	                    +1 203 438 6969, 438-5013 (FAX)
Ridgefield, Connecticut (USA)                       {info,[email-masked]
                                 --------
Von guten Maechten wunderbar geboren, erwarten wir getrost, was kommen
mag.  Gott ist mit uns am Abend und am Morgen, und ganz gewiss an
jedem neuen Tag.   - Dietrich Bonhoeffer

---

From: "J. Daniel Smith" <[email-masked]>
Date: Thu, 30 Mar 95 15:28:24 -0500

Michael J. Corrigan ([email-masked]) writes on 30 March 1995 at 12:20:34 -0800
>The second:
>might better be
>exec /usr/lib/SENDMAIL [email-masked]  $*
>[...]
>> [...]
>> -----
>> #!/bin/sh

That will cause all mail sent from this machine to have
"[email-masked]" as the postmark; not good because some people use
Lotus Notes as their normal MUA, in which case the From: header should
remain unchanged.

For now I've went with 
   formail -i"From: [email-masked]" -i"Return-Path: <[email-masked]>"

   Dan