You are not logged in.

#1 2010-09-18 22:10:25

gtklocker
Member
Registered: 2009-09-01
Posts: 462

[SOLVED] OfflineIMAP configuration problem.

Hi! I want to use mutt with offlineIMAP and Google Apps (which I've set up on my domain). The .offlineimaprc I try to use is:

  [general]
  #ui = Curses.Blinkenlights
  #ui = TTY.TTYUI
  ui = Noninteractive.Quiet
  #ui = Noninteractive.Basic
  accounts = GMail

  [Account GMail]
  localrepository = Local
  remoterepository = Remote
  autorefresh = 0 
  quick = 0

  [Repository Local]
  type = Maildir
  localfolders = ~/Mail

  [Repository Remote]
  type = Gmail 
  remoteuser = user@mydomain.com
  remotepass = XXXXX 
  realdelete = no
  nametrans = lambda folder: re.sub('.*Spam$', 'spam', re.sub('.*Drafts$', 'drafts', re.sub('.*Sent Mail$', 'sent', re.sub('.*Starred$', 'flagged', re.sub('.*Trash$', 'trash', re.sub('.*All Mail$', 'archive', folder))))))

When I run it I get:

$ offlineimap 
Traceback (most recent call last):
  File "/usr/bin/offlineimap", line 21, in <module>
    init.startup('6.2.0')
  File "/usr/lib/python2.6/site-packages/offlineimap/init.py", line 81, in startup
    config.read(configfilename)
  File "/usr/lib/python2.6/ConfigParser.py", line 286, in read
    self._read(fp, filename)
  File "/usr/lib/python2.6/ConfigParser.py", line 482, in _read
    raise MissingSectionHeaderError(fpname, lineno, line)
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: /home/gtklocker/.offlineimaprc, line: 1
'  [general]\n'

What's wrong?

Last edited by gtklocker (2010-09-18 22:33:38)

Offline

#2 2010-09-18 22:30:46

madalu
Member
Registered: 2009-05-05
Posts: 217

Re: [SOLVED] OfflineIMAP configuration problem.

It looks like offlineimap is choking on the leading spaces in your config file:

'  [general]\n'
 ^
 

Try removing them and see what happens.

Offline

#3 2010-09-18 22:33:11

gtklocker
Member
Registered: 2009-09-01
Posts: 462

Re: [SOLVED] OfflineIMAP configuration problem.

I could never imagine it's so ridiculously easy! Thanks!

Offline

Board footer

Powered by FluxBB