Posts Tagged ‘python’

Python script to backup an IMAP Account

Thursday, October 5th, 2006

python-logo-glassy.pngIn the hunt for a solid, comprehensive backup solution for his IMAP accounts, Rui Carmo (Tao of Mac) has produced a python script that will copy all the emails from an IMAP account, do it all as safely as possible and generate mbox-formatted files that can be imported into Mail.app and is completely and utterly free.

You can’t ask for more than that!

Not being very smart about these things, I asked him why he didn’t just copy Mail.app’s local caches. He set me straight:

Well, the caches aren’t portable, aren’t in a standardized format, are not guaranteed to be complete (remember the Preferences: you may or may not cache messages, and even then you’re only sure of those you actually downloaded), and they don’t necessarily store the original message contents as they arrived to your server.

Not only that, doing it this way makes the backup useful for people whatever mail client they use.

He hopes to wrap the whole thing in a shiny GUI soon, but for the moment it’s command-line only.

Rui is looking for feedback and testers to help improve the script even more. You can get the script and leave your helpful comments on his web site .

[Thanks to Jacob Rus for the "aquafied" Python image. Check out more nice Mac-friendly icons from Python's future at his web site ]mail.app, apple mail, email, imap, backup, mbox, python, script, tips, local caches

Tags: , , , , , , , , ,

Roll your own Mail.app plugin

Monday, April 10th, 2006

James Eagan, the creator of the Missing Attachments plugin, has written a tutorial on how to make a Mail.app plugin.

He writes:

In the course of writing my email un-attachment plugin for Mail.app, I found that Apple has a capable, but entirely undocumented, plugin API. I’m providing this tutorial in the hopes that it may be useful to anyone else considering implementing a plugin for Apple Mail.

Personally, I can’t understand a word of it, but many Hawk Wings readers with Python skills will no doubt find it excellent.

A poster on the macOSXHints forums has already used the tutorial to create a plugin that does something with signatures in Mail.app (adds a random signature to each email from the UNIX program Fortune?).plugins, tutorial, howto, signatures, python, mail.app, apple mail, fortune

Tags: , , , , , , ,