[GH-ISSUE #2617] imap-migration associated domains feature doesn't work #1657

Closed
opened 2026-02-27 11:18:25 +03:00 by kerem · 1 comment
Owner

Originally created by @stefaweb on GitHub (Sep 27, 2022).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/2617

Impacted versions

  • OS Type: Debian
  • OS Version: bullseye
  • Database Type: PostgreSQL
  • Database version: 13.8-0+deb11u1
  • Modoboa: 2.0.2
  • installer used: Yes
  • Webserver: Nginx

Current behavior

Hi!

It seems that "Associated domains" feature in imap-migration extension is not working.

Old server: support@domainA.tld
New server: support@domainB.tld

Associated domains
domainA.tld -> domainB.tld

The sync do not work (WRONG AUTH). If we don't use it. It works with the same accounts/domains.

root@mailhub:/srv/vmail# sudo -u vmail -i
$ cd /srv/vmail && /srv/modoboa/env/bin/python /srv/modoboa/instance/manage.py generate_offlineimap_config --output .offlineimaprc && /usr/bin/offlineimap
OfflineIMAP 8.0.0
  Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v3.05, Python v3.9.2, OpenSSL 1.1.1n  15 Mar 2022
Account sync sleclerc@domainA.tld:
 *** Processing account support@adomainA.tld
 Establishing connection to mailhub.xxxxxxx.eu:993 (Remote_support@domainA.tld)
 Establishing connection to localhost:143 (Local_support@domainA.tld)
 PLAIN authentication failed: b'[AUTHENTICATIONFAILED] Authentication failed.'
 LOGIN authentication failed: b'[AUTHENTICATIONFAILED] Authentication failed.'
 ERROR: All authentication types failed:
	PLAIN: b'[AUTHENTICATIONFAILED] Authentication failed.'
	LOGIN: b'[AUTHENTICATIONFAILED] Authentication failed.'
 *** Finished account 'support@domainA.tld' in 0:08
ERROR: Exceptions occurred during the run!
ERROR: All authentication types failed:
	PLAIN: b'[AUTHENTICATIONFAILED] Authentication failed.'
	LOGIN: b'[AUTHENTICATIONFAILED] Authentication failed.'

Traceback:
  File "/usr/share/offlineimap3/offlineimap/accounts.py", line 298, in syncrunner
    self.__sync()
  File "/usr/share/offlineimap3/offlineimap/accounts.py", line 375, in __sync
    localrepos.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 593, in acquireconnection
    self.__authn_helper(imapobj)
  File "/usr/share/offlineimap3/offlineimap/imapserver.py", line 453, in __authn_helper
    raise OfflineImapError("All authentication types "

In .offlineimaprc:

[general]
accounts = support@domainA.tld


[Account support@domainA.tld]
localrepository = Local_support@domainA.tld
remoterepository = Remote_support@domainA.tld

[Repository Local_support@domainA.tld]
type = IMAP
ssl = false
remotehost = localhost
remoteuser = support@domainA.tld
remotepass = xxxxxxxxxxx


[Repository Remote_support@domainA.tld]
type = IMAP
remotehost = mailhub.xxxxxxx.eu
remoteport = 993

ssl = yes
sslcacertfile = /etc/ssl/certs/ca-certificates.crt

remoteuser = support@domainA.tld
remotepass = xxxxxxxxxxx
readonly = true

I found another point.

In the /srv/vmail/.offlineimaprc file, we have sslcacertfile def.

Where does this definition come from?

sslcacertfile = /etc/ssl/certs/ca-certificates.crt

As I use Letsencrypt certbot, I thought I would find the path to the Letsencryp certificate there.

sslcacertfile = /etc/letsencrypt/live/...

Originally created by @stefaweb on GitHub (Sep 27, 2022). Original GitHub issue: https://github.com/modoboa/modoboa/issues/2617 # Impacted versions * OS Type: Debian * OS Version: bullseye * Database Type: PostgreSQL * Database version: 13.8-0+deb11u1 * Modoboa: 2.0.2 * installer used: Yes * Webserver: Nginx # Current behavior Hi! It seems that "Associated domains" feature in imap-migration extension is not working. Old server: support@domainA.tld New server: support@domainB.tld Associated domains domainA.tld -> domainB.tld The sync do not work (WRONG AUTH). If we don't use it. It works with the same accounts/domains. ``` root@mailhub:/srv/vmail# sudo -u vmail -i $ cd /srv/vmail && /srv/modoboa/env/bin/python /srv/modoboa/instance/manage.py generate_offlineimap_config --output .offlineimaprc && /usr/bin/offlineimap OfflineIMAP 8.0.0 Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception) imaplib2 v3.05, Python v3.9.2, OpenSSL 1.1.1n 15 Mar 2022 Account sync sleclerc@domainA.tld: *** Processing account support@adomainA.tld Establishing connection to mailhub.xxxxxxx.eu:993 (Remote_support@domainA.tld) Establishing connection to localhost:143 (Local_support@domainA.tld) PLAIN authentication failed: b'[AUTHENTICATIONFAILED] Authentication failed.' LOGIN authentication failed: b'[AUTHENTICATIONFAILED] Authentication failed.' ERROR: All authentication types failed: PLAIN: b'[AUTHENTICATIONFAILED] Authentication failed.' LOGIN: b'[AUTHENTICATIONFAILED] Authentication failed.' *** Finished account 'support@domainA.tld' in 0:08 ERROR: Exceptions occurred during the run! ERROR: All authentication types failed: PLAIN: b'[AUTHENTICATIONFAILED] Authentication failed.' LOGIN: b'[AUTHENTICATIONFAILED] Authentication failed.' Traceback: File "/usr/share/offlineimap3/offlineimap/accounts.py", line 298, in syncrunner self.__sync() File "/usr/share/offlineimap3/offlineimap/accounts.py", line 375, in __sync localrepos.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 593, in acquireconnection self.__authn_helper(imapobj) File "/usr/share/offlineimap3/offlineimap/imapserver.py", line 453, in __authn_helper raise OfflineImapError("All authentication types " ``` In .offlineimaprc: ``` [general] accounts = support@domainA.tld [Account support@domainA.tld] localrepository = Local_support@domainA.tld remoterepository = Remote_support@domainA.tld [Repository Local_support@domainA.tld] type = IMAP ssl = false remotehost = localhost remoteuser = support@domainA.tld remotepass = xxxxxxxxxxx [Repository Remote_support@domainA.tld] type = IMAP remotehost = mailhub.xxxxxxx.eu remoteport = 993 ssl = yes sslcacertfile = /etc/ssl/certs/ca-certificates.crt remoteuser = support@domainA.tld remotepass = xxxxxxxxxxx readonly = true ``` I found another point. In the /srv/vmail/.offlineimaprc file, we have sslcacertfile def. Where does this definition come from? `sslcacertfile = /etc/ssl/certs/ca-certificates.crt` As I use Letsencrypt certbot, I thought I would find the path to the Letsencryp certificate there. `sslcacertfile = /etc/letsencrypt/live/...`
kerem 2026-02-27 11:18:25 +03:00
  • closed this issue
  • added the
    stale
    label
Author
Owner

@stale[bot] commented on GitHub (Nov 26, 2022):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

<!-- gh-comment-id:1328103934 --> @stale[bot] commented on GitHub (Nov 26, 2022): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#1657
No description provided.