Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > script to read emails and extract attachments from cron

Reply
Thread Tools

script to read emails and extract attachments from cron

 
 
JohnRHarlow@gmail.com
Guest
Posts: n/a
 
      02-06-2006
Hi:

I am looking for advice on the best way to set up a process to read
incoming emails (from a normal unix mailbox on the same host)
containing a gzipped telemetry attachment. I'd like the script to
extract the attachment into a directory where another process will pick
it up. I plan to run it every minute out of cron, so it would probably
start by moving the mbox file to another name so that incoming emails
and later instances of itself won't be affected.

I'm new to Python (I've mostly tweaked other scripts until now) and
just looking for advice on how to put such a program together. I'm
particularly interested in how to deal with encoded binary attachments.

Thanks
John

 
Reply With Quote
 
 
 
 
Dan M
Guest
Posts: n/a
 
      02-06-2006
On Mon, 06 Feb 2006 10:57:23 -0800, http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> Hi:
>
> I am looking for advice on the best way to set up a process to read
> incoming emails (from a normal unix mailbox on the same host)
> containing a gzipped telemetry attachment. I'd like the script to
> extract the attachment into a directory where another process will pick
> it up. I plan to run it every minute out of cron, so it would probably
> start by moving the mbox file to another name so that incoming emails
> and later instances of itself won't be affected.


You might want to take a look at
http://aspn.activestate.com/ASPN/Coo...n/Recipe/86675 and
http://aspn.activestate.com/ASPN/Coo...n/Recipe/86676

I'm using those two recipes for a project very similar to what you
described.

Dan
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Traceback when trying to run script from cron? erikcw Python 3 04-17-2007 07:48 PM
shell script for running as a weekly cron job NOSPAM@NOSPAM.invalid.com NZ Computing 9 12-13-2004 12:26 AM
attachments unable to read attachments from email bub.mk Computer Support 1 09-29-2004 02:29 AM
Re: How to send SIGTSTP,SIGCONt signals to a script scheduled using cron Manish Kumar Arya Python 0 09-23-2004 09:29 AM
How to send SIGTSTP,SIGCONt signals to a script scheduled using cron Saurabh Agarwal Python 0 09-23-2004 09:10 AM



Advertisments