ramfree17 Posted December 17, 2004 Report Share Posted December 17, 2004 anybody know of a utility/script that can harvest the attachments from a mbox file? my highschool friends are sending me scanned pix for our reunion this coming year for collation and it is tedious to save then one by one. sylpheed-claws has a save-all functionality but it is still tedious to open each message one by one. i am hoping for something that i will just feed the mail file to and it will traverse it and save the attachments in a directory. thanks. ciao! Quote Link to comment Share on other sites More sharing options...
Gowator Posted December 17, 2004 Report Share Posted December 17, 2004 Are the attachments not just in the directory? perhaps they are renamed but try using file on the files? then you can just copy them all and rename em ?? Quote Link to comment Share on other sites More sharing options...
aru Posted December 17, 2004 Report Share Posted December 17, 2004 (edited) You are lucky man! there is a tool named 'uudeview' that does just what you want. You can feed it with your whole user's spool file or even with all the mailboxes at once. just an example: ~$ uudeview -i +o +a -p ~/tmp/ /var/spool/mail/$USER Found 'alaska 119email.jpg' State 16 Base64 Parts 1 OK Found 'portada.pdf' State 16 Base64 Parts 1 OK Found 'icestorm 010email.jpg' State 16 Base64 Parts 1 OK Found 'portada.pdf' State 16 Base64 Parts 1 OK File successfully written to /home/aru/tmp/alaska 119email.jpg File successfully written to /home/aru/tmp/portada.pdf File successfully written to /home/aru/tmp/icestorm 010email.jpg *** Target File /home/aru/tmp/portada.pdf exists - autorenamed to /home/aru/tmp/portada_1.pdf File successfully written to /home/aru/tmp/portada_1.pdf ~$ check the options on the man page You can get uudeview from the contrib mirror. HTH [edited: now I've post the best way to call uudeview --IMHO-- (notice that when two attached files are found with the same name the later is renamed to not overwrite the former) see the man page to findout what the cmdline opts do] Edited December 17, 2004 by aru Quote Link to comment Share on other sites More sharing options...
aru Posted December 17, 2004 Report Share Posted December 17, 2004 ramfree, you can also combine procmail with uudeview to full automate the process ;) Quote Link to comment Share on other sites More sharing options...
ramfree17 Posted December 20, 2004 Author Report Share Posted December 20, 2004 (edited) thanks aru. i think that will work just fine. i wonder if there is a cygwin port so i can test it while im here in the office. as for procmail, it was way above my range of thought. i even printed the whole faq so i can read it at home. i think it was made for loonixers like you. ciao! [edit] google to the rescue!!!! -> http://www.fpx.de/fp/Software/UUDeview/ Edited December 20, 2004 by ramfree17 Quote Link to comment Share on other sites More sharing options...
aru Posted December 20, 2004 Report Share Posted December 20, 2004 as for procmail, [...] i think it was made for loonixers like you. :dry: bah! It deserves the effort, and it's not that hard, even for a near-a-decade-newbie like you! In five minutes (let's say 10 because of reading of man pages) you can do a nice combined script (bash - procmail - uudeview) to full automate the proccess and create whatever you are going to do with those pictures... and more important it will be more fun and cooler than doing in a demi-automatic way just using uudeview :deal: Quote Link to comment Share on other sites More sharing options...
ramfree17 Posted December 21, 2004 Author Report Share Posted December 21, 2004 near-a-decade? where did you get an idea like that? oh, i spent more than 10 minutes on that. i think i devoted at least 5 hours reading the faq pages from iink.net and all it got me are a couple of simple recipes that doesnt want to work the way i want them to. i was using anon's server back then so when he reformatted it i also said good bye to procmail. ciao! Quote Link to comment Share on other sites More sharing options...
aru Posted December 21, 2004 Report Share Posted December 21, 2004 near-a-decade? where did you get an idea like that? is it even more???? Quote Link to comment Share on other sites More sharing options...
ramfree17 Posted December 22, 2004 Author Report Share Posted December 22, 2004 hehehe... much.. much less. :P ciao! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.