On Mon, Jul 28, 2008 at 02:28:36PM -0500, David W. Tamkin wrote:
Dallman recommended to Josias,
  :0 fw h
  | formail -iFrom: -RX-Recipient From
Just in case From_ is there, and also I'm not so sure that -R will work  
without the colons, make that
  | formail -iFrom: -R X-Recipient: From:
Well, that's fine, but I tested mine with a From_ header intact, and
it worked as I hoped it would.
So -- either one of these should be fine.  Adding the colon is
probably better self-documentation, though, I will grant.
(the space before X-Recipient is not required, just my preference for  
legibility).
I personally prefer it to, but I went with the more obfuscatory
look used in the formail man pages. :-)  At least I thought I went with
that.  Now, looking at the man pages, I don't see that.  Maybe I
was remembering from old man pages from before Philip took the code
over, I don't know.  In any case, while I share your personal preference,
showing it the other way also demonstrates tacitly that without the
spaces it still works.
If you want to leave the X-Recipient header there as well, though, we
could use another approach:
  :0 fw h
  * ^X-Recipient:\/.*
  | formail -iFrom: -A"From: $MATCH"
That can be written,
  | formail -i"From: $MATCH"
or better,
 | formail -zi"From: $MATCH"
so that there will be exactly one space after the colon in the output.
Good thinking.  Thanks, David.
Dallman
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail