procmail
[Top] [All Lists]

Re: Problem with missing "Message-ID:"

2005-04-28 06:00:05
Michelle Konzack wrote:

If the "Message-ID:" is

Message-ID: 20050428140913(_dot_)12345(_at_)freenet(_dot_)de

I can not repaire broken Mail-Threads, because the "Message-ID:"
Header should be:

Message-ID: <20050428140913(_dot_)12345(_at_)freenet(_dot_)de>
           ^                               ^

So how can I correct this problem ?
Check for the presence of the header and the lack of < >:

:0 fhw
* ^Message-Id: .
* !^Message-Id: <.*>$

then use your favorite mechanism to add these characters, like

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

Calling perl might not be the most efficient solution and the double matching is not elegant either, using the result of the procmail match would be a good alternative.

--
Klaus Johannes Rusch
KlausRusch(_at_)atmedia(_dot_)net
http://www.atmedia.net/KlausRusch/


____________________________________________________________
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