mutt folderfilter errors

I've been slowly setting up mutt, along with offlineimap and fetchmail, to replace Thunderbird as my primary email client. One of the problems I ran into was with the offlineimap folderfilter option. I only wanted to sync a few specific folders on my IMAP server, instead of all of them. The way you do this with offlineimap is to use the folderfilter option. According to the offlineimap documentation, here is how you do it:


folderfilter = lambda foldername: foldername in [
      'Mail/INBOX',
      'Mail/list/zaurus-general',
      'Mail/list/zaurus-dev',
      ]

However, after copying and pasting that very same command (changing the folder names of course), I received the following errors:


Traceback (most recent call last):
File "/usr/bin/offlineimap", line 21, in ?
init.startup('4.0.8')
File "/usr/lib/python2.3/site-packages/offlineimap/init.py", line 79, in startup
config.read(configfilename)
File "/usr/lib/python2.3/ConfigParser.py", line 263, in read
self._read(fp, filename)
File "/usr/lib/python2.3/ConfigParser.py", line 484, in _read
raise e
ConfigParser.ParsingError: File contains parsing errors: /home/raam/.offlineimaprc
[line 34]: ']n'

At first glance, those look like some pretty obscure errors. So what's the problem? The new line character (n)! During my copy and paste, hidden characters were copied over. After I put the entire folderfilter opton on a single line, I was able to move each mailbox entry down to it's own line and run offlineimap without errors.

Not a very exciting problem (or solution), however this might find it's way into someone's Google search and resolve a not-so-obvious problem.

Write a Comment

Comment

  • Related Content by Tag