Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imap-migration associated domains feature doesn't work #2617

Closed
stefaweb opened this issue Sep 27, 2022 · 1 comment
Closed

imap-migration associated domains feature doesn't work #2617

stefaweb opened this issue Sep 27, 2022 · 1 comment
Labels
stale stale status

Comments

@stefaweb
Copy link

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/...

@stale
Copy link

stale bot commented 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.

@stale stale bot added the stale stale status label Nov 26, 2022
@stale stale bot closed this as completed Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale stale status
Projects
None yet
Development

No branches or pull requests

1 participant