Re: Extract Email Attachments.....

2004-08-20 Thread Lonnie Olson
On Fri, 2004-08-20 at 07:51 -0700, samy lancher wrote:
> Hello All,
> I have a sendmail Email server on freebsd OS. I  would like to know if there is any 
> way I can extract the attachments that come with email and store them in a local 
> folder. I do not want to use any MUA. I will be getting several Emails with image 
> attachments. I just want to automatically extract those image attachments and store 
> them in local folder. Are there any third party applications or some kind of script 
> or maybe need some configuration on the server for this purpose. I would really 
> appreciate if someone could help me out.
>  
> Thanks in advance.
> Naveen.
> 
> 

You can use mimeStrip available at http://oneguycoding.com/opensource/
mimeStrip has lots of uses.  For example I use it in a procmail recipe
to do exactly what you are looking for.

:0
* ^Mailing-List: .*yahoogroups.com
{
:0 fw
| /usr/local/bin/mimeStrip.pl --dir=${HOME}/attachments

:0:
lists/yahoo
}

This recipe will save the attachment to my attachments directory, and
strip them from the original email and save it to the lists/yahoo
folder.

--lonnie

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Extract Email Attachments.....

2004-08-20 Thread Andrew L. Gould
On Friday 20 August 2004 09:51 am, samy lancher wrote:
> Hello All,
> I have a sendmail Email server on freebsd OS. I  would like to know
> if there is any way I can extract the attachments that come with
> email and store them in a local folder. I do not want to use any MUA.
> I will be getting several Emails with image attachments. I just want
> to automatically extract those image attachments and store them in
> local folder. Are there any third party applications or some kind of
> script or maybe need some configuration on the server for this
> purpose. I would really appreciate if someone could help me out.
>
> Thanks in advance.
> Naveen.

Certain scripting languages, Python for one, have email related modules.  
You can use these to write scripts that will extract various parts of 
an email.  Once you write your script, I think you can get procmail to 
call the script so that the processing can be done when emails are 
initially received.  (I have no personal experience doing such a task.)

Best of luck,

Andrew Gould
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"