472,958 Members | 2,563 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 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 2970
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Yang Li Ke | last post by:
Hi there, I have a php script which creates a .html gallery with thumbs and links etc.. I would like it to update the gallery and change the thumbs according to some random values every 60...
6
by: chuck amadi | last post by:
Hi , Im trying to parse a specific users mailbox (testwwws) and output the body of the messages to a file ,that file will then be loaded into a PostGresql DB at some point . I have read the...
16
by: Chuck Amadi | last post by:
Sorry to bovver you again (again) here's script. I still can't see why the get_payload() doesn't produce the plain text message body of an emails in the testwwws users mailbox. As you can see I...
0
by: Job Lot | last post by:
I need to create an application that checks email sent to a particular address on mail server and extract any attachments from these emails. I am using mail server 2003. Could someone please...
1
by: Jules Mitland | last post by:
I dont have Jmail v4 due to ISP limitations. Is there any other way I can decode an email to save the attachments? I can do the first part of saving the emails using Perl. Is it possible to use any...
5
by: Miguel Arenas | last post by:
In vb.2003 I sent automated e-mails, but now I need to read e-Mail and attachments what can I do ? or somebody know where can I find some code to do that. Thansk.
0
by: Alen192 | last post by:
i have create this simple script i bash that modify the crontab's user's file with an option passed by standard input, now i would know if is possible create a similar script with php so i can...
5
by: This | last post by:
I have a pretty basic emailing script that sends a relatively small number (150) of html emails. The emails are compiled, personalised from a mysql db subscribers list, and sent using mail() -...
0
by: Michiel Overtoom | last post by:
Ahmed wrote... I'm not sure if you are able to bypass Outlook (and have Python fetch the mail itself using poplib), but if you are, the following code might be useful. I use this to pry apart...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.