Complete.Org: Mailing Lists: Archives: offlineimap: January 2007:
Re: nametrans to add a dot in the beginning of the foldername
Home

Re: nametrans to add a dot in the beginning of the foldername

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: offlineimap@xxxxxxxxxxxx
Subject: Re: nametrans to add a dot in the beginning of the foldername
From: Aaron Schrab <aaron@xxxxxxxxxx>
Date: Sun, 28 Jan 2007 07:46:39 -0600

At 01:27 +0100 24 Jan 2007, hans <hans.ekbrand@xxxxxxxxx> wrote:
> Hello!
> I use the dovecot imap server, which uses Maildir++ (nested maildir
> folders, but requires the foldername to start with a dot).
> 
> I would like to have a Maildir++ structure locally too (since the mutt
> support for that seems to be good).
> 
> Is it possible to use a nametrans rule so that offlineimap adds a
> leading dot to the foldername?

The following is what I use to replicate the directory structure from
dovecot to local maildirs (which are used by another instance of
dovecot).  For this to work, the base directory needs to already be a
valid maildir with cur,new,tmp subdirectories.

######## From .offlineimaprc
[general]
pythonfile = ~/.offlineimap.py

[Repository atsRemote]
nametrans = imap_nametrans_qqx

######## .offlineimap.py
def imap_nametrans_qqx( foldername ):
  if foldername == 'INBOX':
    return '.'
  else:
    return '.' + foldername



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