Complete.Org: Mailing Lists: Archives: offlineimap: August 2006:
Re: nametrans IMAP INBOX to maildir base directory?

Re: nametrans IMAP INBOX to maildir base directory?

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: offlineimap@xxxxxxxxxxxx
Subject: Re: nametrans IMAP INBOX to maildir base directory?
From: Aaron Schrab <aaron@xxxxxxxxxx>
Date: Mon, 21 Aug 2006 19:38:00 -0500

At 15:20 -0500 21 Aug 2006, John Goerzen <jgoerzen@xxxxxxxxxxxx> wrote:
> This sounds similar to the Courier example:
> # Using Courier remotely and want to duplicate its mailbox naming
> # locally?  Try this:
> #
> # nametrans = lambda foldername: re.sub('^INBOX\.*', '.', foldername)

That's somewhat similar.  What I'm actually using:

def imap_nametrans_qqx( foldername ):
  if foldername == 'INBOX':
    return '.'
    return '.' + foldername

And the error I was getting.

  File "offlineimap/", line 153, in run
  File "", line 422, in run
    self.__target(*self.__args, **self.__kwargs)
  File "offlineimap/", line 118, in syncrunner
  File "offlineimap/", line 133, in sync
  File "offlineimap/repository/", line 124, in syncfoldersto
  File "offlineimap/repository/", line 77, in makefolder
    os.makedirs(foldername, 0700)
  File "", line 159, in makedirs
    mkdir(name, mode)
OSError: [Errno 17] File exists: '.'

> Perhaps there is some other difficulty with your config?

I've now gotten it to work by creating the cur, new, and tmp directories
for the maildir to which INBOX gets mapped before running offlineimap.
Not great, but it might not be good to just turn an existing directory
into a maildir either.

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