[PATCH] Re: Allow to create the root MailDir directory
    Nicolas Sebrecht 
    nicolas.s-dev at laposte.net
       
    Sun May  8 12:06:26 BST 2011
    
    
  
On Sat, May 07, 2011 at 08:06:27PM +0200, Sebastian Spaeth wrote:
> 
> 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 we a) should not bail out
> with a mysterious error message, and b) that it should be possible to
> automatically create the root dirctory of the maildir.
a) and b) should be two lone patches, each resolving its own issue.
I'm not sure to get all the side-effects of b) so I'm pending this patch
for now.
> 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).
-- 
Nicolas Sebrecht
    
    
More information about the OfflineIMAP-project
mailing list