procmail
[Top] [All Lists]

Re: Multiple Header (same name)

2006-05-30 12:06:35
On Tue, May 30, 2006 at 07:00:08PM +0200, Michelle Konzack wrote:

Mail with existing header:

X-Ruud: OK

Now I want to add a second Header:

  echo -e "$MSG" |formail -f -A "X-Ruud: nice guy"

wich produce

  Old-X-Ruud: OK
  X-Ruud: nice guy

OK, I have tried to rename it with

  echo -e "$MSG" |formail -f -A "X-Ruud: nice guy" -R Old-X-Ruud: X-Ruud:

which infortunatly not work...
I have to invoke formail twice with

  echo -e "$MSG" |formail -f -A "X-Ruud: nice guy" |\
                  formail -f -R Old-X-Ruud: X-Ruud:

which I use currently and is working.


You don't have to do all that at all.  Do read the fine man
page and pay attention to the -i option.


  formail -fi "X-Ruud: nice guy" < "$MSG"

is all you need.


dman

____________________________________________________________
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

<Prev in Thread] Current Thread [Next in Thread>