Setting up OfflineIMAP for two mail accounts

Csányi Pál csanyipal at gmail.com
Sun Mar 10 10:36:38 GMT 2024


Hello,

I am using Debian 12 GNU/Linux operating system.
I would like to set up two mailboxes in OfflineIMAP: Gmail and STCable.
The contents of my offlineimaprc file are:

[general]
accounts = gmailfiokom,stcablefiokom
maxsyncaccounts = 1

# Gmail ##################
[Account gmailfiokom]
localrepository = gmailhelyben
remoterepository = gmailtavol

[Repository gmailhelyben]
type = GmailMaildir
localfolders = /home/$USER/mail/csanyipal at gmail.com

[Repository gmailtavol]
type = Gmail
maxconnections = 1
remotehost = imap.gmail.com
remoteuser = csanyipal at gmail.com
remotepass = **********************
ssl = yes
sslcacertfile = /etc/ssl/certs/ca-certificates.crt

# STCable #################
[Account stcablefiokom]
localrepository = stcablehelyben
remoterepository = stcabletavol

[Repository stcablehelyben]
type = Maildir
localfolders = /home/$USER/mail/csanyipal at stcable.net

[Repository stcabletavol]
type = IMAP
starttls = yes
auth_mechanisms = LOGIN
maxconnections = 1
remotehost = imap.stcable.net
remoteuser = csanyipal at stcable.net
remotepass = *********************************
ssl = yes
sslcacertfile = /etc/ssl/certs/ca-certificates.crt

When I run the offlineimap --dry-run command, the output is this:
OfflineIMAP 8.0.0
  Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v3.05, Python v3.11.2, OpenSSL 3.0.11 19 Sep 2023
Account sync gmailfiokom:
 *** Processing account gmailfiokom
 Establishing connection to imap.gmail.com:993 (gmailtavol)
 [DRYRUN] Creating folder [Gmail].&ANY-sszes lev&AOk-l[gmailhelyben]
 [DRYRUN] Creating folder [Gmail].Csillagozott[gmailhelyben]
 [DRYRUN] Creating folder [Gmail].Elk&APw-ld&APY-tt levelek[gmailhelyben]
 [DRYRUN] Creating folder [Gmail].Fontos[gmailhelyben]
 [DRYRUN] Creating folder [Gmail].Kuka[gmailhelyben]
 [DRYRUN] Creating folder [Gmail].Piszkozatok[gmailhelyben]
 [DRYRUN] Creating folder [Gmail].Spam[gmailhelyben]
 [DRYRUN] Creating folder Arduino[gmailhelyben]
 [DRYRUN] Creating folder C64[gmailhelyben]
 [DRYRUN] Creating folder Drafts[gmailhelyben]
 [DRYRUN] Creating folder INBOX[gmailhelyben]
 [DRYRUN] Creating folder Iskola[gmailhelyben]
 [DRYRUN] Creating folder Junk[gmailhelyben]
 [DRYRUN] Creating folder Nemzeti Regiszter[gmailhelyben]
 [DRYRUN] Creating folder Nemzeti V&AOE-laszt&AOE-si Iroda[gmailhelyben]
 [DRYRUN] Creating folder Queue[gmailhelyben]
 [DRYRUN] Creating folder Sent[gmailhelyben]
 [DRYRUN] Creating folder Trash[gmailhelyben]
 ERROR: getfolder() asked for a nonexisting folder '[Gmail].&ANY-sszes
lev&AOk-l'.
 *** Finished account 'gmailfiokom' in 0:01
Account sync stcablefiokom:
 *** Processing account stcablefiokom
 Establishing connection to imap.stcable.net:993 (stcabletavol)
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to
get local issuer certificate (_ssl.c:992)
 *** Finished account 'stcablefiokom' in 0:00
ERROR: Exceptions occurred during the run!
ERROR: getfolder() asked for a nonexisting folder '[Gmail].&ANY-sszes
lev&AOk-l'.

Traceback:
  File "/usr/share/offlineimap3/offlineimap/accounts.py", line 298, in
syncrunner
    self.__sync()
  File "/usr/share/offlineimap3/offlineimap/accounts.py", line 405, in __sync
    localfolder = self.get_local_folder(remotefolder)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/offlineimap3/offlineimap/accounts.py", line 326, in
get_local_folder
    return self.localrepos.getfolder(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/offlineimap3/offlineimap/repository/Maildir.py",
line 165, in getfolder
    raise OfflineImapError("getfolder() asked for a nonexisting "

ERROR: Unknown SSL protocol connecting to host 'imap.stcable.net' for
repository 'stcabletavol'. OpenSSL responded:
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to
get local issuer certificate (_ssl.c:992)

Traceback:
  File "/usr/share/offlineimap3/offlineimap/accounts.py", line 298, in
syncrunner
    self.__sync()
  File "/usr/share/offlineimap3/offlineimap/accounts.py", line 374, in __sync
    remoterepos.getfolders()
  File "/usr/share/offlineimap3/offlineimap/repository/IMAP.py", line
681, in getfolders
    imapobj = self.imapserver.acquireconnection()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/offlineimap3/offlineimap/imapserver.py", line 663,
in acquireconnection
    raise OfflineImapError(reason, severity, exc_info()[2])

So OfflineIMAP works with my GMail account, but not with my STCable account.
The output of the offlineimap --dry-run command shows some information
about the STCAble server; perhaps this information will help me when
setting up OfflineIMAP?
What would be the OfflineIMAP settings for my STCable account?

Any advices will be appreciated!

--
Best, from Paul



More information about the OfflineIMAP-project mailing list