1

Topic: Upgrade to Trixie... errors on TASK mlmmjadmin Sync profiles to SQL

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 2025122901 (Backend: mariadb, Date: 2025-12-29 23:53:44) iRedMail Enterprise Edition:
- Deployed with iRedMail Easy or the downloadable installer? iredmail EE
- Linux/BSD distribution name and version: Trixie 13.2
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro?  iredmail EE
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====


After upgrade to Trixie, and re-deploy iredmail EE, some errors appears on mlmmjadmin sync task...







TASK [mlmmjadmin] Sync profiles to SQL/LDAP.

failed

stderr: Traceback (most recent call last):

File "/opt/mlmmjadmin/tools/sync_profiles_to_db.py", line 82, in

qr = conn.select("maillists", what="address", where="active=1")

File "/opt/mlmmjadmin/tools/../web/db.py", line 870, in select

return self.query(qout, processed=True)

~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^

File "/opt/mlmmjadmin/tools/../web/db.py", line 816, in query

db_cursor = self._db_cursor()

File "/opt/mlmmjadmin/tools/../web/db.py", line 723, in _db_cursor

return self.ctx.db.cursor()

^^^^^^^^

File "/opt/mlmmjadmin/tools/../web/db.py", line 661, in _getctx

self._load_context(self._ctx)

~~~~~~~~~~~~~~~~~~^^^^^^^^^^^

File "/opt/mlmmjadmin/tools/../web/db.py", line 673, in _load_context

ctx.db = self._connect(self.keywords)

~~~~~~~~~~~~~^^^^^^^^^^^^^^^

File "/opt/mlmmjadmin/tools/../web/db.py", line 701, in _connect

return self.db_module.connect(**keywords)

~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^

File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 292, in __init__

self.ctx = self._create_ssl_ctx(ssl)

~~~~~~~~~~~~~~~~~~~~^^^^^

File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 373, in _create_ssl_ctx

ca = sslp.get("ca")

^^^^^^^^

AttributeError: 'set' object has no attribute 'get'

[ERROR] task error: exit status 1, Traceback (most recent call last):

File "/opt/mlmmjadmin/tools/sync_profiles_to_db.py", line 82, in

qr = conn.select("maillists", what="address", where="active=1")

File "/opt/mlmmjadmin/tools/../web/db.py", line 870, in select

return self.query(qout, processed=True)

~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^

File "/opt/mlmmjadmin/tools/../web/db.py", line 816, in query

db_cursor = self._db_cursor()

File "/opt/mlmmjadmin/tools/../web/db.py", line 723, in _db_cursor

return self.ctx.db.cursor()

^^^^^^^^

File "/opt/mlmmjadmin/tools/../web/db.py", line 661, in _getctx

self._load_context(self._ctx)

~~~~~~~~~~~~~~~~~~^^^^^^^^^^^

File "/opt/mlmmjadmin/tools/../web/db.py", line 673, in _load_context

ctx.db = self._connect(self.keywords)

~~~~~~~~~~~~~^^^^^^^^^^^^^^^

File "/opt/mlmmjadmin/tools/../web/db.py", line 701, in _connect

return self.db_module.connect(**keywords)

~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^

File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 292, in __init__

self.ctx = self._create_ssl_ctx(ssl)

~~~~~~~~~~~~~~~~~~~~^^^^^

File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 373, in _create_ssl_ctx

ca = sslp.get("ca")

^^^^^^^^

AttributeError: 'set' object has no attribute 'get'

...ignore error

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Upgrade to Trixie... errors on TASK mlmmjadmin Sync profiles to SQL

Could you please show me output of commands below?

ls -dl /opt/mlmmjadmin*
cd /opt/mlmmjadmin/tools/
python3 sync_profiles_to_db.py

3

Re: Upgrade to Trixie... errors on TASK mlmmjadmin Sync profiles to SQL

mail:~# ls -dl /opt/mlmmjadmin*
lrwxrwxrwx  1 root  root    21 Dec 30 00:54 /opt/mlmmjadmin -> /opt/mlmmjadmin-3.6.0
drwxr-xr-x 12 mlmmj mlmmj 4096 May  1  2025 /opt/mlmmjadmin-3.3.1
drwxr-xr-x 12 mlmmj mlmmj 4096 Nov  9 06:12 /opt/mlmmjadmin-3.4.0
drwxr-xr-x 12 mlmmj mlmmj 4096 Nov  9 06:18 /opt/mlmmjadmin-3.5.0
drwxr-xr-x 12 mlmmj mlmmj 4096 Dec 30 00:54 /opt/mlmmjadmin-3.6.0
mail:~# cd /opt/mlmmjadmin/tools/
mail:/opt/mlmmjadmin/tools# python3 sync_profiles_to_db.py
Usage:

    python3 sync_profiles_to_db.py [-A] [email] [email] [...]

Samples:

    *) Sync all mailing lists (note: `-A` in upper case, not `-a`):

        python3 sync_profiles_to_db.py -A

    *) Sync only one mailing list:

        python3 sync_profiles_to_db.py list@domain.com

    *) Sync multiple mailing lists:

        python3 sync_profiles_to_db.py list1@domain.com list2@domain.com list3@domain.com

4

Re: Upgrade to Trixie... errors on TASK mlmmjadmin Sync profiles to SQL

My mistake, please run this one instead:

python3 sync_profiles_to_db.py -A

5

Re: Upgrade to Trixie... errors on TASK mlmmjadmin Sync profiles to SQL

/opt/mlmmjadmin/tools# python3 sync_profiles_to_db.py -A
Traceback (most recent call last):
  File "/opt/mlmmjadmin-3.6.0/tools/sync_profiles_to_db.py", line 82, in <module>
    qr = conn.select("maillists", what="address", where="active=1")
  File "/opt/mlmmjadmin-3.6.0/tools/../web/db.py", line 870, in select
    return self.query(qout, processed=True)
           ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/mlmmjadmin-3.6.0/tools/../web/db.py", line 816, in query
    db_cursor = self._db_cursor()
  File "/opt/mlmmjadmin-3.6.0/tools/../web/db.py", line 723, in _db_cursor
    return self.ctx.db.cursor()
           ^^^^^^^^
  File "/opt/mlmmjadmin-3.6.0/tools/../web/db.py", line 661, in _getctx
    self._load_context(self._ctx)
    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/opt/mlmmjadmin-3.6.0/tools/../web/db.py", line 673, in _load_context
    ctx.db = self._connect(self.keywords)
             ~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/opt/mlmmjadmin-3.6.0/tools/../web/db.py", line 701, in _connect
    return self.db_module.connect(**keywords)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 292, in __init__
    self.ctx = self._create_ssl_ctx(ssl)
               ~~~~~~~~~~~~~~~~~~~~^^^^^
  File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 373, in _create_ssl_ctx
    ca = sslp.get("ca")
         ^^^^^^^^
AttributeError: 'set' object has no attribute 'get'

6

Re: Upgrade to Trixie... errors on TASK mlmmjadmin Sync profiles to SQL

I can reproduce this issue locally, will try to fix it shortly. Stay tuned.

7

Re: Upgrade to Trixie... errors on TASK mlmmjadmin Sync profiles to SQL

Hi Juanito,

This issue has been fixed in mlmmjadmin 3.6.2, please upgrade:
https://docs.iredmail.org/upgrade.mlmmjadmin.html