You are not logged in.

#1 2013-08-08 03:34:37

z1lt0id
Member
Registered: 2012-09-20
Posts: 177

[SOLVED] offlineimap issues

Been trying to get offlineimap to work but having issues.

Whenever I try to load it I get the following error:

Traceback (most recent call last):
  File "/usr/bin/offlineimap", line 23, in <module>
    oi.run()
  File "/usr/lib/python2.7/site-packages/offlineimap/init.py", line 44, in run
    options, args = self.parse_cmd_options()
  File "/usr/lib/python2.7/site-packages/offlineimap/init.py", line 218, in parse_cmd_options
    config.set_if_not_exists('general','dry-run','False')
  File "/usr/lib/python2.7/site-packages/offlineimap/CustomConfig.py", line 80, in set_if_not_exists
    self.set(section, option, value)
  File "/usr/lib/python2.7/ConfigParser.py", line 753, in set
    ConfigParser.set(self, section, option, value)
  File "/usr/lib/python2.7/ConfigParser.py", line 396, in set
    raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'general'

My config files look like the following:

.offlineimaprc
[Repository gmail-remote]
type = Gmail
remoteuser = deanthomson50@gmail.com
remotepass = [password]
nametrans = lambda foldername: re.sub ('^\[gmail\]', 'bak',
                               re.sub ('sent_mail', 'sent',
                               re.sub ('starred', 'flagged',
                               re.sub (' ', '_', foldername.lower()))))
folderfilter = lambda foldername: foldername not in '[Gmail]/All Mail'
# Necessary as of OfflineIMAP 6.5.4
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
.netrc
machine hostname.tld
   login deanthomson50@gmail.com
   password [password]

What could the issue be?

Last edited by z1lt0id (2013-08-08 04:12:06)

Offline

#2 2013-08-08 03:57:31

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] offlineimap issues

The issue is in the final line of the error: no 'general' section at the top of your .offlineimaprc
https://wiki.archlinux.org/index.php/Of … onfiguring


Also, your .netrc is wrong: machine name has to be imap.gmail.com


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2013-08-08 03:59:18

z1lt0id
Member
Registered: 2012-09-20
Posts: 177

Re: [SOLVED] offlineimap issues

Thanks jasonwryan, that makes a lot of sense smile  A tired day for me.

Offline

#4 2013-08-08 04:03:42

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] offlineimap issues

We all do it. Please remember to mark your thread as [Solved]...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB