Backing Up an IMAP Folder Tree?
Jason Weill asks: "After finishing up school, I'm transitioning away from my school-run IMAP e-mail account. During my time, I managed to save thousands of messages in dozens of subfolders in my 'Inbox' hierarchy. Pine lets me save an entire folder to a file easily. Mozilla creates a folder tree when I drag 'Inbox' into a local repository, but none of the messages in the subfolders are downloaded. Opera M2 assimilates all those messages into my collection, but it flattens them all into one giant mess. Are there any scripts or programs that can easily export an entire folder tree to files or import it into a local repository for an e-mail program?"
will do what you need
I've done an IMAP to IMAP backup before with mozilla. Setup a new IMAP account in mozmail, and then do one huge drag and drop. It takes a while, but it works.
/home, then all you really need to do is tarball that up.
Antother options, if you have a shell account and they setup maildirs in your
You might want to try imapxfer from the UW-IMAP toolkit:
r .Z
http://www.washington.edu/imap/
The source for the utilities is at:
ftp://ftp.cac.washington.edu/imap/imap-utils.ta
A.
...bringing you cynical quips since 1998
This is a good question. I too like to carry my mail around with me. I use an IMAP server, but the one that I need the data off of first is my Yahoo Mail account. I want to grab the 20+ Meg of messages that my account has collected over the years, and export them to a cd. I want to ween myself off of their massive MY! application. So, any way to take my mail/address book/notepad/breifcase/photos/etc with me? anyone? anyone?
Can't you just run fetchmail deliver through procmail to any format you want?
-- Don't Tase me, bro!
I came to a similar dillemma: I had amassed an amount of email which was pushing me over disk quota at my university. I could've deleted the email or my web page. Didn't sound like a good solution. The email wasn't critically important, but not worthless enough to just delete. But most of them also aren't so important that I need to read one of these old message too often. I was using pine on a Uni's Unix machine.
:)
I was long wanting to switch to the email client in Squeak, Celeste, as I spend most of my time in Squeak. I even telnet'd from it to access my email from within a client in Squeak.
So, I setup Celeste to get my mail via POP. Had it download all my messages in my INBOX. Then, I downloaded the mail folders from the Solaris machine. Gzip and ftp. Celeste has the ability to import messages from Unix mailbox files. So I did that, into respective folders/categories. All done, less fuss than reading through the replies in this Ask Slashdot.
Most clients can read mbox format.
If you can't get to your raw mbox files, it would be easy to write a script to pull out messages via IMAP, and then output them to Unix mbox format. Then import. I was working on a similar thing before figuring out I could simply download my mbox files. I had written most of a script that went to the mail server, iterated over each mail category and saved it to the mail database. Squeak provides a nice MailDB class for it's own mail database format, so it was less than a dozen lines of code.
Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
I've done exactly this before. (under gnome)
;-)
I moved one IMAP tree from an old account directly into the new one. I'm not even sure if it downloaded locally first or just moved from one server to the next.
Screw that outlook express peice of microsoft junk. Whose posting on slashdot lately??
/* oops I accidentally made a comment, sorry */
IMAP Copy
I'd like to archive some of my IMAP mail into a subfolder called "archive" with a duplicate tree layout under it. Anyone know an easy way to do this, while keeping mail that is not X days old where it is.
apt-get install isync
pkg_add -r isync
or go to
http://www.cs.hmc.edu/~me/isync/
Buttsex.
The last time I had to use an exchange server, I used Netscape 4.7's e-mail client, created local folders, and dragged and dropped each folder from server to local machine folder by folder. Took about an hour for 400MB, IIRC.
"God is dead." - Frederik Nietzsche
What's the problem? I'm a developer for one of the big name corporate mail servers out there and if you want to back up your personal IMAP account the easiest, you get a simple client like Mulberry or Mozilla, copy your entire IMAP tree to your LOCAL folders, zip and burn the Local mail folder from your user profile on your PC to a disc.
When you're ready to move the mail back into active status, fire up your browser, connect to your new IMAP server and drag and drop the contents of your Local folder to your IMAP server folder in your email client.
How did a question like this ever make it to slashdot? Jesus holy fucking christ.
Of course, not all postmasters are that helpful :) But it never hurts to ask.
Method of processing duck feet
Internet Message Access Protocol - version 4rev1
There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
searching in my debian repo, I find:
offlineimap - IMAP/Maildir synchronization and reader support
http://gopher.quux.org:70/devel/offlineimap/
isync - synchronize a local maildir with a remote IMAP4 mailbox
http://www.cs.hmc.edu/~me/isync/
I believe that fetchmail would do the trick but you would have to tweak its configuration a bit.
1. You would have to download every imap folder separatelly.
2. Since default mode of operation for fetchmail is to retrieve mail from server and put it into local smtp system, you would have to direct it to deliver mail to procmail or other program, that would deliver messages to mbox or maildir.
Robert
Bastard Operator From 193.219.28.162
I just opened a guest account on freemail.fm today. I'm going to try it out to see how well it works. My other "free" IMAP account at freeshell has been unresponsive for 2 days, so I'm thinking of switching. Anyway, the point is that fastmail has a way to copy all of your imap content. It actually conects to your old account and uses some method to transfer them all, folders and all. I haven't tried it yet, since I can't connect to freeshell yet, but that might be an option if you're looking for another provider.
THIS SPACE FOR RENT
While I never normally advocate the use of Perl for anything, I've had to do what you're looking for before, and I found the easiest way was to whip up a quick Perl script using libmail-imapclient-perl or libcyrus-imap-perl which recursively sucks your mail off the server.
:(
The advantages of doing this is that you can then save it into any format you want. I personally was using it to do a IMAP server to server copy, and it worked fantastically.
If I still had the script, I'd post it, but it was many, many harddrives ago that I saw it last.
/mike
-- "So, what's the deal with Auntie Gerschwitz et all?"
In both OE and Netscape, you can change your preferences to save messages for "offline" viewing. If you do this, you can transfer all your IMAP folder messages to your computer that way. Prepare to wait awhile, if you've really got hundreds of messages.
If you use NS, I think they're saved in mbox format. In any case, you then have them locally and can archive them from there (or transfer them to your new IMAP server).
Absolutely. Not long ago I marked my entire work IMAP mailbox -- all 200 MB of it -- for off-line use in Mozilla while I was on a trip out of state. It works .. and it's always nice to have an off-site backup.
Ouch! The truth hurts!
I just underwent a huge email tribulation at work. I've been on RedHat for about 5 years now, getting my corporate Exchange email through a variety of means. The lastest one was comprised of setting having fetchmail grab my mail from the Exchange server over IMAP, and filter it through spamassassin via procmail. Then I'd grab it through IMAP to my local machine, but the folders (except for the inbox, since this will NOT work) were all on an NFS mount to be backed up. Now I've installed Gentoo, and I wanted less fooling around with email. So I emerged evolution and really explored it. I've been using it at home for a long time now, but besides doing my IMAP mail at home (off my own email server), I like the Palm Pilot integration.
/cur, /new, and /tmp subdirs.) Then just drag and drop. If you're on a slow link, it may take awhile, but you can control how this gets done. What I find in these situations is that this is a time for cleaning up. The other methods discussed here will probably be faster, but you probably won't streamline anything with the move.
What does this have to do with you? Sorry, I'm off track. What I found at work is that this thing is the Outlook Express of the Linux world. (If you've never really looked at OE, it's tough. Microsoft actually made a really good product, and then covered it up with their much less useful one, Outlook.) It does like 6 different mail methods, including maildir. (You never said what OS you're using, but I'm assuming it's Linux.) You can set Evolution up to have both your current IMAP server and a maildir heirarchy. (Just create ~/Maildir with
Acts 17:28, "For in Him we live, and move, and have our being."
I'm in the middle of migrating a a few thousand accounts from Maildir format spools to Cyrus. I did some hunting on search.cpan.org and found Mail::IMAPClient. The documentation is very concise and the module works like a charm. :)
/pointer
That said, I think you could achieve your goal a lot easier with a run of the mill MUA like mozilla/evolution. If at first you don't succeed, google for a solution!
[%- PROCESS life -%]
I run offlineimap from cron on a host at home to keep a backup copy of my mail. It maintains a maildir hierarchy of all my IMAP folders. Setup was quite stratightforward and took me about five minutes. In a word, offlineimap rules !
http://gopher.quux.org:70/devel/offlineimap/
And it is available in Debian.
In my endless pursuit for a decent IMAP client on Windoze (still using Eudora 4), I found a beautiful bug in The Bat!'s IMAP support - it treated IMAP as just another protocol to download the mail like POP and then happily cleared it from the server! :(
- RR
[Feel free to mod humorous]
I should put something clever here. Maybe someday.
Hi. I asked this question.
I managed to make a backup to local folders using Mulberry. Mozilla and Evolution, as suggested by several posters, simply wouldn't let me drag and drop a folder onto another. Mozilla would create an empty folder tree and copy INBOX. Evolution displayed its "you can't do this" cursor and produced an error message basically saying "you can't do this."
For more information, click here.