SOLVED Re: [CentOS] extract MIME attachments from 700MB imap folder

Ray Leventhal centos at
Wed Jul 2 12:52:22 UTC 2008

>>> Hi Les,
>>> Thanks for your reply.
>>> I'm wholly ignorant of how to go about doing this using your 
>>> suggestion.  Are there resources to which you might point me for 
>>> additional info?
>> That was the whole perl program needed to split the body of a message 
>> and any MIME attachments into separate files, given one email message 
>> on standard input.  If that doesn't make sense, you'll probably have 
>> to start with the 'learning perl' book or any general perl 
>> programming tutorials.  There are some details about the Mime::Tools 
>> package and how to use the components here: 
> Thanks, Les.  I'm digging into the docs now.
Solution was easier than I'd expected.  I implemented Les' perl mime 
extractor script with slight mods so that on a go-forward, this will 
happen without intervention.

For the 700MB imap folder of historical docs, I used a thunderbird 
add-on called 'extract attachments' which does just what it says.  Got 
over 1300 docs in less than 10 mins simply by subscribing to the folder 
and running the add-on.

Thanks for the script and docs pointer, Les.


More information about the CentOS mailing list