Extracting ALL of the attachments from a mailing list
Jeremy Turner
jeremy at linuxwebguy.com
Thu Apr 28 19:54:06 CDT 2005
On Thu, 2005-04-28 at 17:44 -0500, Gerald Combs wrote:
> Before I start rolling my own solution, does anyone know of a utility or
> collection of utilities that will
>
> 1) Extract all of the MIME attachments from a mailing list archive,
You might check out uudeview or mpack
http://www.fpx.de/fp/Software/UUDeview/
No URL for mpack. In the Debian package, the author says of mpack says
to use uudeview.
> 2) Extract the files from any archived (tar|zip|rar|...) attachments,
I assume once you extract the files from your mail archives and remove
any duplicates, it would be trival to run a loop on all files you
extracted:
<pseudo-code>
if $extension eq ".tar.gz" or $extension eq ".tgz"
then
tar xvfz $filename
else if $extension eq ".tar.bz2" or $extension eq ".tbz2"
then
tar xvfj $filename
else if $extension eq ".zip"
then
unzip $filename
end if
</pseudo-code>
> 3) Move each extracted file to a specific directory, renaming it if
> there's a naming collision, and
uudeview does this.
> 4) Remove any duplicate files.
Maybe an MD5sum hash table to check for duplicates?
Jeremy
More information about the Kclug
mailing list