Complete.Org: Mailing Lists: Archives: offlineimap: July 2002:
Re: Mailbox name recorder bug/missing feature
Home

Re: Mailbox name recorder bug/missing feature

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Martijn Pieters <mj@xxxxxxxx>
Cc: offlineimap@xxxxxxxxxxxx
Subject: Re: Mailbox name recorder bug/missing feature
From: John Goerzen <jgoerzen@xxxxxxxxxxxx>
Date: Mon, 15 Jul 2002 19:44:35 -0500

I'm applying the attached patch for version 3.0.2 to fix the problem.

-- John

On Fri, Jul 12, 2002 at 04:16:31PM -0400, Martijn Pieters wrote:
> Unfortunately for me, the mailbox name recorder does not generate a useful
> Mutt include file for me, because it only has access to the remote mailbox
> names, not the local, rewritten names. 
> 
> This means every mailbox is written as seen on the IMAP server, not as they
> appear on my local disk, which is what I want Mutt to look at. For example,
> the remote mailbox Admin/Zope.org becomes the local maildir Admin.Zope.org.
> Yet the generated file tells Mutt to look for =Admin/Zope.org.
> 
> Either 'foldername' should be the local mailbox name (after nametrans has
> been applied), or a 'dirname' (or somesuch) key has to be available.
> 
> -- 
> Martijn Pieters
> | Software Engineer  mailto:mj@xxxxxxxx
> | Zope Corporation   http://www.zope.com/
> | Creators of Zope   http://www.zope.org/
> ---------------------------------------------

-- 
John Goerzen <jgoerzen@xxxxxxxxxxxx>    GPG: 0x8A1D9A1F    www.complete.org


-- Attached file included as plaintext by Ecartis --

--- offlineimap.py~     Mon Jul 15 10:53:05 2002
+++ offlineimap.py      Mon Jul 15 19:42:29 2002
@@ -103,15 +103,8 @@
                                          config.getint(account, 
"maxconnections"))
 
 mailboxes = []
-mailboxlock = Lock()
 servers = {}
 
-def addmailbox(accountname, remotefolder):
-    mailboxlock.acquire()
-    mailboxes.append({'accountname' : accountname,
-                      'foldername': remotefolder.getvisiblename()})
-    mailboxlock.release()    
-    
 def syncaccount(accountname, *args):
     # We don't need an account lock because syncitall() goes through
     # each account once, then waits for all to finish.
@@ -161,7 +154,7 @@
 def syncfolder(accountname, remoterepos, remotefolder, localrepos,
                statusrepos):
     mailboxes.append({'accountname': accountname,
-                      'foldername': remotefolder.getvisiblename()})
+                      'foldername': localfolder.getvisiblename()})
     # Load local folder.
     localfolder = localrepos.\
                   getfolder(remotefolder.getvisiblename().\




[Prev in Thread] Current Thread [Next in Thread]