OfflineIMAP / offlineimap

Read/sync your IMAP mailboxes (python2) [LEGACY: move to offlineimap3]
http://www.offlineimap.org
Other
1.78k stars 360 forks source link

configuration issues on MacOS (most likely user error) #686

Open atanasj opened 4 years ago

atanasj commented 4 years ago

General information

I am trying to setup mu and mu4e in emacs and wanted to use offlineimap to retrieve and send mail. I want to set this up with gmail and my exchange emails. However, I am having some problems which I put down to user error, so was hoping for some help / guidance.

ProductName:    Mac OS X
ProductVersion: 10.15.7
BuildVersion:   19H15
offlineimap v7.3.3, imaplib2 v2.101 (bundled), Python v2.7.16, LibreSSL 2.8.3
Python 2.7.16

Configuration file offlineimaprc

[general]
accounts = Gmail
maxsyncaccounts = 2

[Account Gmail]
localrepository = LocalGmail
remoterepository = RepositoryGmail
autorefresh = 5
quick = 10
postsynchook = mu index --maildir ~/.mail
status_backend = sqlite

[Repository LocalGmail]
type = mail
localfolders = ~/.mail/gmail

[Repository RepositoryGmail]
type = Gmail
maxconnections = 2
remoteuser = <myemail>@gmail.com
remotepass = <mypassword>
folderfilter = lambda foldername: foldername not in ['[Gmail]/All Mail', '[Gmail]/Important']
sslcacertfile = /usr/local/etc/openssl/cert.pem 

Logs, error

OfflineIMAP 7.3.3
  Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v2.101 (bundled), Python v2.7.16, LibreSSL 2.8.3
  imaplib2: 2.101 (bundled)
Traceback (most recent call last):
  File "/usr/local/Cellar/offlineimap/7.3.3/libexec/offlineimap.py", line 22, in <module>
    oi.run()
  File "/usr/local/Cellar/offlineimap/7.3.3/libexec/offlineimap/init.py", line 91, in run
    self.__serverdiagnostics(options)
  File "/usr/local/Cellar/offlineimap/7.3.3/libexec/offlineimap/init.py", line 523, in __serverdiagnostics
    account.serverdiagnostics()
  File "/usr/local/Cellar/offlineimap/7.3.3/libexec/offlineimap/accounts.py", line 194, in serverdiagnostics
    remote_repo = Repository(self, 'remote')
  File "/usr/local/Cellar/offlineimap/7.3.3/libexec/offlineimap/repository/__init__.py", line 84, in __new__
    return repo(name, account)
  File "/usr/local/Cellar/offlineimap/7.3.3/libexec/offlineimap/repository/Gmail.py", line 33, in __init__
    IMAPRepository.__init__(self, reposname, account)
  File "/usr/local/Cellar/offlineimap/7.3.3/libexec/offlineimap/repository/IMAP.py", line 42, in __init__
    self.imapserver = imapserver.IMAPServer(self)
  File "/usr/local/Cellar/offlineimap/7.3.3/libexec/offlineimap/imapserver.py", line 95, in __init__
    self.sslcacertfile = repos.getsslcacertfile()
  File "/usr/local/Cellar/offlineimap/7.3.3/libexec/offlineimap/repository/IMAP.py", line 277, in getsslcacertfile
    raise OfflineImapError(reason, OfflineImapError.ERROR.REPO)
offlineimap.error.OfflineImapError: CA certfile for repository 'RepositoryGmail' couldn't be found.  No such file: '/usr/local/etc/openssl/cert.pem  # This will only work for macOS'

Steps to reproduce the error

nicolas33 commented 4 years ago
  1. I think the correct doc is think one: https://support.google.com/a/answer/6180220?hl=en
  2. The error says it can't find the file. Does it exists? Does the user has read access (cat /usr/local/etc/openssl/cert.pem).
atanasj commented 3 years ago

Hi @nicolas33, thanks for your repsonse.

  1. I tried this and get the following for all values of [hosthame]:
connect: Connection refused
connect:errno=61
  1. Yes, it does exist. I executed the command and I got the contents of and RSA PRIVATE KEY...

Not sure what I could be doing wrong. Any other ideas?