Re: nametrans IMAP INBOX to maildir base directory?
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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 '.'
else:
return '.' + foldername
And the error I was getting.
File "offlineimap/threadutil.py", line 153, in run
Thread.run(self)
File "threading.py", line 422, in run
self.__target(*self.__args, **self.__kwargs)
File "offlineimap/accounts.py", line 118, in syncrunner
self.sync()
File "offlineimap/accounts.py", line 133, in sync
remoterepos.syncfoldersto(localrepos)
File "offlineimap/repository/Base.py", line 124, in syncfoldersto
dest.makefolder(key)
File "offlineimap/repository/Maildir.py", line 77, in makefolder
os.makedirs(foldername, 0700)
File "os.py", 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.
|
|