LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] script process mboxes add headers

[ILUG] script process mboxes add headers

Lars Hecking lhecking at users.sourceforge.net
Thu Aug 2 15:55:07 IST 2007


> Does anyone know how to process all messages in a mbox, taking the data 
> from the message-id header and adding it to a new X header?

 I think it's a bit more complicated than what you outlined: you need to run

 formail -s procmail -m rcfile <inbox >output

 to split the inbox into single emails and let procmail process each
 individually with the recipe(s) in rcfile. The procmail recipe will
 extract the message-id: header, and then use formail to append or
 insert the new XUIDL header. Something along the lines of
 (completely untested)

 :0 fwh
 * ^Message-ID: \/[^ ]*
 |formail -I "X-UIDL: $MATCH"

 give or take a few flags or options.





More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell