Archived posting to the Leica Users Group, 2001/12/28

[Author Prev] [Author Next] [Thread Prev] [Thread Next] [Author Index] [Topic Index] [Home] [Search]

Subject: [Leica] Re: technical help wanted
From: Jeff Moore <jbm@oven.com>
Date: Fri, 28 Dec 2001 16:14:13 -0500
References: <5086466.1009482160@pool0107.cvx32-bradley.dialup.earthlink.net>

2001-12-27-22:42:40 Brian Reid:
> I've decided that I'm going to make a LUG PAW server that people can mail 
> their photos to, open free of charge to any memeber of the LUG, because I 
> think that this PAW concept is truly great.

Cool!

> I need a Unix program that can input a MIME file and emit the attachments. 
> I'd prefer it not be written in Perl because then I'd have to learn Perl, 
> which I've successfully avoided for 20 years. Howver, as long as it's 
> callable from the shell, I guess I shouldn't look inside.

20 years?  C'mon, it hasn't been there for 20 years to avoid.
Besides, Perl rules -- once you have a taste, you can become
addicted.

> Basically I want to say
> 	mkdir foo.dir
> 	extractAttachments foo.dir < mail-message.txt
> and have foo.dir contain all of the jpegs, viruses, hoaxes, TNEFs, and other 
> junk that people attach. Once I have a binary jpeg in foo.dir I know how to 
> find it and take it from there, using netpbm.

Talking off the top of my head, since I haven't yet done precisely
this thing, I'd be inclined to investigate:

  1) a (yes, Perl) script, which I'd guess from a peek at CPAN:

       http://www.cpan.org/

     might involve heavy use of MIME::Parser and kin:

       http://search.cpan.org/doc/ERYQ/MIME-tools-5.411a/lib/MIME/Tools.pm

     ...there's a pre-built script people have recommended to me which
     appears to use these objects and might be a good starting place
     for you at:

       http://freshmeat.net/projects/stripmime/

  2) whatever else a freshmeat search might yield:

       http://freshmeat.net/search/?q=mime+attachment&section=projects

I could've sworn there was something people were recommending which
could hook right into a good MTA like Postfix or QMail, but I can't
dind the email.  Maybe they were plugging it all together a step
farther down using procmail.

- --
To unsubscribe, see http://mejac.palo-alto.ca.us/leica-users/unsub.html

In reply to: Message from Brian Reid <reid@mejac.palo-alto.ca.us> ([Leica] technical help wanted)