Tugger the SLUGger!SLUG Mailing List Archives

RE: [SLUG] Program to detach e-mail attachment


 
> looking for some pointers on getting together some code to 
> auto process incoming e-mails, detach their attachments and 
> save them as files. The MTA is qmail so the appropriate 
> "|myprog" entry in .qmail gets the mail passed to the program 
> then I need to code up something that will take the 
> attachment, detach & decode it and save it as a file.

Give munpack a try, I think it's available in many distributions all packaged up (as "mpack").  I have a procmail recipe thus ...

| munpack -f -q -C /somepath/

HTH, YMMV, etc. :)
- Rog