procmail
[Top] [All Lists]

Re: Problem with missing "Message-ID:"

2005-04-28 09:53:55
On Thu, 28 Apr 2005, Michelle Konzack <linux4michelle(_at_)freenet(_dot_)de> 
wrote:

Am 2005-04-28 15:21:21, schrieb Ruud H.G. van Tol:
Klaus Johannes Rusch schreef:

 |/usr/bin/perl5 -n -p -e 's/^Message-Id: (.*)$/Message-Id: <$1>/'

Aaargh, please learn formail.

But Formail wiil remove the "Message-ID:" Header and write a new one.
I want to keep the "Message-ID" and add only the "< >" to it.

But why perl if

    |sed 's/^Message-Id: (.*)$/Message-Id: <$1>/'


To catch the Header please use:
* ^Message-ID: [^<]*[^>]$

Then pipe it to sed as:

sed 's/^Message-ID: \(.*\)$/Message-ID: <\1>/'

Thanks,
Hossein


____________________________________________________________
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>