473,406 Members | 2,387 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 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 3005
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.