restore mails from local Maildir back to IMAP

Olaf Schreck chakl at syscall.de
Tue May 31 17:12:30 BST 2011


> OfflineImap will never create folders on the remote end.

That I learned from the archives :) I recreated the folder with mutt.

> But it will
> sync them if the folder exists on the remote end. So, if you create an
> empty folder of that name and drag your Maildir in place and sync, they
> should be synced back.

That's what I expected, but it doesn't seem to work. Here's what I did (log and 
config below):

1. Do a fresh offlineimap sync
2. The folder ~/Syncdir/someuser at somewhere.de/INBOX.Berlin/ is empty (3 empty 
Maildir subdirs cur, new, tmp)
3. Copy deleted message files from backup into this folder (INBOX.Berlin/cur/ 
now has about 20 message files, INBOX.Berlin/new/ has one.
4. Run offlineimap again and expect INBOX.Berlin synced back to the IMAP server.
5. Nope :( 

Here's the log (slightly edited)

OfflineIMAP 6.2.0
Copyright (C) 2002 - 2009 John Goerzen <jgoerzen at complete.org>
This software comes with ABSOLUTELY NO WARRANTY; see the file
COPYING for details.  This is free software, and you are welcome
to distribute it under the conditions laid out in COPYING.
***** Processing account someuser
Copying folder structure from IMAP to Maildir
Establishing connection to imap.REMOTE.de:143.
Syncing Deleted Messages: IMAP -> Maildir
[...]
Syncing INBOX: IMAP -> Maildir
Syncing INBOX/Berlin: IMAP -> Maildir
Deleting 23 messages (192, 201, 202, 203, 204, 90, 95, 99, 100, 101, 103, 107, \
108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118) in Maildir[INBOX.Berlin]\
, LocalStatus[INBOX.Berlin]
[...]
Syncing Trash: IMAP -> Maildir
***** Finished processing account someuser

So it deletes the freshly copied files from INBOX.Berlin instead of pushing them 
to the IMAP server. 

Here's my config (slightly edited)

[general]
accounts = someuser

[Account someuser]
localrepository = Local_someuser
remoterepository = REMOTE_someuser

[Repository Local_someuser]
type = Maildir
localfolders = ~/Syncdir/someuser at somewhere.de

[Repository REMOTE_someuser]
type = IMAP
remotehost = imap.REMOTE.de
remoteuser = someuser at somewhere.de
remotepass = secret

expunge = no
maxconnections = 1
realdelete = no


Whats wrong?  I don't get it.

Thanks,
Olaf






More information about the OfflineIMAP-project mailing list