471,110 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,110 software developers and data experts.

script to read emails and extract attachments from cron

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

Feb 6 '06 #1
1 2899
On Mon, 06 Feb 2006 10:57:23 -0800, Jo*********@gmail.com 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
Feb 6 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

16 posts views Thread by Yang Li Ke | last post: by
6 posts views Thread by chuck amadi | last post: by
1 post views Thread by Jules Mitland | last post: by
5 posts views Thread by Miguel Arenas | last post: by
reply views Thread by Alen192 | last post: by
5 posts views Thread by This | last post: by
reply views Thread by Michiel Overtoom | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.