mbnames

Sebastian Spaeth Sebastian at SSpaeth.de
Sun Jan 8 11:38:59 GMT 2012


On Sun, 08 Jan 2012 12:02:44 +0100, Paul Collignan <p at ul.collignan.fr> wrote:
> I use offlineimap to sync a remote courrier IMAP account and a local 
> Maildir. I use nametrans to get rid of the courrier INBOX. useless 
> string:
> nametrans = lambda foldername: re.sub('^INBOX\.*', '', foldername)
> and
> nametrans = lambda f: "INBOX." + f
> and it works well. In fact without those two lines it does not work at 
> all.
I would be interested to hear why it doesn't work without those, but
that's a different story.

> My problem is that mbnames keeps the INBOX. substring in mailboxes 
> names, so mutt is not able to find the corresponding Maildirs.

This could be a side-effect of the recent introduction of server side
folder creation, which led to the introduction of "nametrans" rules on
the LOCAL repository.

The foldername being written is determined here:
accounts.py:l377
        # Write the mailboxes
        mbnames.add(account.name, localfolder.getvisiblename())

getvisiblename() transforms the folder name according to the
nametransrule which is generally not what we want, I believe.

Can you replace that line in accounts.py:
-        mbnames.add(account.name, localfolder.getvisiblename())
+        mbnames.add(account.name, localfolder.getname())

and see whether the results are better?
If yes, I believe we should change that in the code. We clearly want the
local names and not the translated names here.

Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20120108/50b480f6/attachment-0001.sig>


More information about the OfflineIMAP-project mailing list