Complete.Org: Mailing Lists: Archives: offlineimap: July 2008:
Re: OfflineIMAP and KMail
Home

Re: OfflineIMAP and KMail

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: offlineimap@xxxxxxxxxxxx
Subject: Re: OfflineIMAP and KMail
From: Josh Rickmar <joshua_rickmar@xxxxxxxxxxx>
Date: Mon, 14 Jul 2008 11:21:05 -0400

Sweet.  Finally got KMail to work properly with Dovecot and OfflineIMAP.  The 
problem was that in my .offlineimaprc, I had the line:

localfolders =3D /home/joshua/maildir   # also in dovecot-passdb

exactly as it appears above.  OfflineIMAP was actually putting it in a folder 
called "maildir   # also in dovecot-passdb", which caused all the errors.  
After removing the "comment", it is working fine without any patches.

The only problem I had was somehow I blew away everything in my Inbox... 
whoops.  Not too big of a problem since most of it is mailing lists and stuff 
forwarded from my Gmail account.  Not sure how, but somewhere along the way I 
made an error. (I have a hunch, but don't worry, I think it's my fault, not 
your's.)

So I sent a test email from my Gmail account to this Lavabit account, and 
within like 2 minutes or so, OfflineIMAP had downloaded it, Dovecot had 
recognized it, and it appeared in my (empty) Inbox.

Thanks so much for your help with this.  Perhaps this should go on the 
OfflineIMAP FAQ so others like me can get this fixed easially?

Also, one last question, although it's not releated dirrectly to OfflineIMAP.  
In KMail, my folder list looks like this:

Inbox
-Sent
-Trash
-Drafts
-Templates
-Subfolder1

where everything is a subfolder of the Inbox.  I know this is because of how 
OfflineIMAP is now placing the files for Dovecot to read, but is it possible 
in KMail to flatten the directories out?

On Monday 07 July 2008 12:07:05 am David L. Emerson wrote:
> yeah, that very thing frustrated me, too. I couldn't get dovecot to look
> in the right places for my mail folders -- heaven knows why. Maybe the
> dovecot mailing list would be a good place to ask.
> Anyway, I never got dovecot to behave properly, so I went with the
> offlineimap nametrans, which has worked great.
>
> My custom offlineimap.py looks something like this:
>
> import re
> dovecot_kmail_re = re.compile('^\.?(inbox[./])?', re.IGNORECASE)
>
> def fix_dovecot_kmail (folder_nm):
>   if folder_nm.lower() in ('inbox', '.inbox', '.'):
>     return '.'
>   return dovecot_kmail_re.sub('.INBOX.', folder_nm, 1)
>
> And of course as I mentioned, my ~/.offlineimaprc contains
> pythonfile = /path/to/offlineimap/config/offlineimap.py
> # and for each account's remoterepository section,
> nametrans = fix_dovecot_kmail
>
> What the first "return" line does is map the inbox to the maildir (not
> to a subdirectory of it). So if the maildir is /home/david/mail,
> then /home/david/mail will contain {cur,new,tmp} folders for inbox:
> so /home/david/mail/. is my inbox folder.
>
> All other folders are made subfolders of the inbox by the compiled re
> which is run by the second "return". They thus are named,
> e.g., /home/david/mail/.INBOX.Subfolder/cur etc. So that's how my
> mailboxes are set up ... not the best design (I don't really like it,
> anyway) but dovecot seems to like it, so I guess that's what's
> important.
>
> Of course, the trouble is that when offlineimap first creates an
> account, it receives the foldername '.' from the nametrans, attempts to
> call mkdir('.') and crashes (line 100 of Maildir.py) So I patched
> offlineimap so it would never call mkdir on '.' (which is incidentally
> why I'm still using 5.99.4)
>
> Sorry I can't really help you solve the real problem, which is dovecot
> behaving badly, but maybe my workaround will work for you too. Good
> luck!
>
> ~David.
>
>
>
> P.S. I've never had an issue before with those =20 things at the end of
> *my* messages. I've seen them on other people's messages many times.
> Dunno what made them suddenly appear ... hopefully they will disappear
> just as quickly!
>
> On Saturday 05 July 2008 6:29 am, Josh Rickmar wrote:
> > Thanks for your response.
> >
> > I tried to get this fixed using your recommendations, but its not
> > quite working the way I expected it to. :)
> >
> > [...]
>





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