docker-offlineimap/offlineimap/repository
Sebastian Spaeth 1754bf4110 Allow to create the root MailDir directory
We currently do not allow nametrans rules such as
nametrans = lambda foldername: re.sub('^INBOX$', '', foldername)

because we crash with a traceback when running:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=499755

The underlying reason is that we cannot create the "top level" root
directory of the Maildir in the function makefolders(), it will bail
out. John Goerzen intentionally prevented offlineimap from creating the
top-level dir, so that a misconfiguration could not arbitrarily create
folders on the file system. I believe that it should be perfectly
possible to automatically create the root dirctory of the maildir. We
still protect against folder creations at arbitrary places in the file
system though.

This patch cleans up makefolders(), adds documentation, allows to
automatically create rootfolders if needed (using absolute paths) and
adds some robustness in case the folders already exist that we want to
create (rather than simply crapping out).

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2011-06-08 17:15:31 +02:00
..
__init__.py Create an abstract Repository class 2011-03-03 18:19:42 +01:00
Base.py Make str() of Repository() be its name 2011-04-27 19:07:10 +02:00
Gmail.py cleanup import statements and conform to PEP-8 2011-03-14 21:35:33 +01:00
IMAP.py Let the user configure how long to IDLE for 2011-05-24 18:55:46 +02:00
LocalStatus.py fix magicline import 2011-05-25 21:54:55 +02:00
Maildir.py Allow to create the root MailDir directory 2011-06-08 17:15:31 +02:00