473,698 Members | 2,631 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Backup GMAIL Messages with Python

I was wondering what methods you experts would reccomend for this task?

Here are the options I have come up with so far:

1. Build something with the poblib library
(http://docs.python.org/lib/module-poplib.html)
--Any pointers on doing this? How to I get poplib to save messages in
a standard format I can
later import into Thunderbird, Outlook, etc? (mbox?)

2. Use libgmail
--How stable is this package? Does it just use screenscraping?

3. Call Fetchmail from command line?
--Does anyone know an easy way to do this? All I found was a 6 page
tutorial! yikes!

Much thanks for any advice you might have. I'm also open to options I
haven't thought of too.

--
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com)
Aug 5 '06 #1
5 2099
Gregory Piñero wrote:
I was wondering what methods you experts would reccomend for this task?

Here are the options I have come up with so far:

1. Build something with the poblib library
(http://docs.python.org/lib/module-poplib.html)
--Any pointers on doing this? How to I get poplib to save messages in
a standard format I can
later import into Thunderbird, Outlook, etc? (mbox?)
I don't do much with email, but there's an example of accessing gmail
via poplib here:
http://groups.google.ca/group/comp.l...2263a870f5f236

And of course there's the 'email' standard library module:
http://docs.python.org/lib/module-email.html

HTH,
~Simon

Out of curiosity, why do you want to _backup_ a gmail account? (I use
my gmail account to backup files and documents I never want to lose.)
I could think of some reasons, but I'm wondering what yours are. : )

Aug 5 '06 #2
On 5 Aug 2006 15:27:03 -0700, Simon Forman <ro*********@ya hoo.comwrote:
Out of curiosity, why do you want to _backup_ a gmail account? (I use
my gmail account to backup files and documents I never want to lose.)
I could think of some reasons, but I'm wondering what yours are. : )
Here are a few:

1. Google could turn evil someday (and delete everyones' data?)
2. Google coud lose or delete data by accident
3. You could lose your internet connection for an extended period of time
4. You may want to move to a different email software in the future
and am not able to export from Google calendar at that time(see reason
1)

Update on my question:
getmail looks like another option: http://pyropus.ca/software/getmail/
but not cross platform?

-Greg
Aug 5 '06 #3
Gregory Piñero:
I was wondering what methods you experts
would reccomend for this task?
While you can write a script, its quite easy to turn on POP and run
a client side mail client like Thunderbird.

Neil
Aug 5 '06 #4
On 8/5/06, Neil Hodgson <ny************ *****@gmail.com wrote:
While you can write a script, its quite easy to turn on POP and run
a client side mail client like Thunderbird.
Good point, Neil. This is a very tempting option, I just wanted to
include it in a backup script rather than having to open up
Thunderbird once a day.

-Greg
Aug 6 '06 #5
fetchmail worked for me. You have to be patient though because it takes a
while for all of your mail to become available for pop download.

-Chris
On Sat, Aug 05, 2006 at 08:43:32PM -0400, Gregory Pi?ero wrote:
On 8/5/06, Neil Hodgson <ny************ *****@gmail.com wrote:
While you can write a script, its quite easy to turn on POP and run
a client side mail client like Thunderbird.

Good point, Neil. This is a very tempting option, I just wanted to
include it in a backup script rather than having to open up
Thunderbird once a day.

-Greg
--
http://mail.python.org/mailman/listinfo/python-list
Aug 8 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2953
by: Tim Gahnstrom | last post by:
rdiff-backup is aperently written in Python and when I run it in a special way I get some funy Python errors. Does anyone know if linux python have some issues with working with fat32 or usb drives? To tracebacks are provided below for more information. This is the version information I get when I start Python ojn my Fedora Core 2 computer. -bash-2.05b$ python Python 2.3.3 (#1, May 7 2004, 10:31:40)
5
8430
by: Igor Solodovnikov | last post by:
Hi. I am trying to automatically backup transaction log when error 9002 happened. So i have created appropriate job and alert to catch this error. I have two instances of sql server under Windows 2000. One of them is full SQL Server, another is msde. When transaction log is full in full SQL Server error 9002 severity 17 state 2 is logged in sql server log and in Windows Application log. My alert firing my job. All is fine. But when...
5
10597
by: David | last post by:
I am a little confused by DB2 Backup and Export. I used "db2 backup db QAS to /dev/rmt0" backuping 650GB database to a IBM LTO 3581 (1 drive) only 11 hours. But I used "db2 export to /dev/rmt0 of ixf messages MKPF.msg select * from mkpf" on the same 3581, and this table is only 5GB, but the export used 4 hours. What's the diffirent between Backup and Export? I mean except backup is used to backup whole database or tablespace, and export...
1
4749
by: alex | last post by:
Hi ! I couldn't make backups with our new system using db2 8.2. Every time I trigger a backup I get this error message: BACKUP DATABASE EBUERO2 ONLINE TO "/raid/backup/ebuero2/part1", "/raid/backup/ebuero2/part10", "/raid/backup/ebuero2/part11", "/raid/backup/ebuero2/part12", "/raid/backup/ebuero2/part13", "/raid/backup/ebuero2/part14", "/raid/backup/ebuero2/part15", "/raid/backup/ebuero2/part16", "/raid/backup/ebuero2/part17",
1
9062
by: Najm | last post by:
Hi All, I am facing this issue very frist time. I add a logical device as following: USE master GO EXEC sp_addumpdevice 'disk', 'AdvWorksData',
13
3960
by: NDayave | last post by:
How do, For backing up my database(Access 2000), i am trying to just back up the tables and their data, as this will save on space and allow for importing back into the actual database. I want the data copied into a dated backup database so a specific restore can be performed and old backups arent lost. The vb code i have makes a new blank database and copies the data into tables through docmd.runSQL. Both aspects of the code work fine; the...
4
11773
by: gregpinero | last post by:
I'm trying to get a list of messages from GMAIL using it's new IMAP access. So far I've tried running this command but it just hangs. Any ideas? I figured that's the first line to run from this example: http://docs.python.org/lib/imap4-example.html Here are the configuration settings GMAIL says to use:
3
1953
by: misceverything | last post by:
I am writing a script that will backup specified folders from one hard drive to another (for example, backup source "C:\DATA", destination "D: \Backup"), and was thinking of using shutil. What I would like to do is recursively backup the specified directories (which copytree will do), but be able to specify exclusion directories (which copytree does not appear to allow you to do). My initial thoughts were I'll probably have to use...
0
726
by: Chris Rebert | last post by:
On Tue, Sep 30, 2008 at 1:21 PM, <dudeja.rajat@gmail.comwrote: You could probably whip one up very easily using the tarfile module http://docs.python.org/lib/module-tarfile.html] and shutil.move() http://docs.python.org/lib/module-shutil.html]. Just make a new TarFile of the directory, save it, then replace any previous backup file using shutil.move() Good luck, and have fun! Regards,
0
8611
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9170
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9031
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8904
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8876
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6531
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2341
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.