Mailcow-dockerized: No MailBox, Login, ... after update

Created on 26 Nov 2018  路  28Comments  路  Source: mailcow/mailcow-dockerized

Hello,

I have updated the mailcow with ./update.sh after them I can't login to my Mailbox's.
I have found some error messages. In mailcow admin under "Mailbox" there is a infinity loading circle.

SOGo Error:
Failed to load resource: the server responded with a status of 501 (Request Failed)

Error in mailcow admin
Uncaught TypeError: Cannot read property 'tls_enforce_in' of null at Object.<anonymous> (mailbox.js:351) at Function.each (jquery-1.12.4.min.js:2) at Object.success (mailbox.js:340) at i (jquery-1.12.4.min.js:2) at Object.fireWith [as resolveWith] (jquery-1.12.4.min.js:2) at y (jquery-1.12.4.min.js:4) at XMLHttpRequest.c (jquery-1.12.4.min.js:4)

Dovecot login request (also not working):
`
26.11.2018, 14:12:06 | info | imap-login: Aborted login (auth failed, 1 attempts in 2 secs): user=mail@domain.tld, method=PLAIN, rip=RouterIP, lip=172.22.1.4, TLS, TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)
-- | -- | --
26.11.2018, 14:12:03 | info | imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=RouterIP, lip=172.22.1.4, TLS: Connection closed, TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)

`

Most helpful comment

Hm, but it would set the field @hachre

$stmt = $pdo->query("UPDATE `mailbox` SET `attributes` = '{}' WHERE `attributes` = '' OR NULL;");

I tried to run that sql from console but it doesn't set the attributes. When i use

OR `attributes` IS NULL

at the end it works.

All 28 comments

Thanks

here is the mysql output:

MariaDB [mailcow]> select attributes from mailbox;
+------------+
| attributes |
+------------+
| NULL |
| NULL |
| NULL |
+------------+
3 rows in set (0.00 sec)

helps to edit the rows?

The contents of the attribute fields should look like this, it may be enough to just set it to {} though:

{"force_pw_update": "0", "tls_enforce_in": "0", "tls_enforce_out": "0", "sogo_access": "1", "mailbox_format": "maildir:"}

Why is it NULL?

Is it possible that people who haven't updated in a while (maybe since before the attribute field existed), aren't upgraded properly?

I have updated a older instance.
With {"force_pw_update": "0", "tls_enforce_in": "0", "tls_enforce_out": "0", "sogo_access": "1", "mailbox_format": "maildir:"} I can login to SOGo but not to imap. And there are no mails?

Hm, but it would set the field @hachre

$stmt = $pdo->query("UPDATE `mailbox` SET `attributes` = '{}' WHERE `attributes` = '' OR NULL;");

I have updated a older instance.
With {"force_pw_update": "0", "tls_enforce_in": "0", "tls_enforce_out": "0", "sogo_access": "1", "mailbox_format": "maildir:"} I can login to SOGo but not to imap. And there are no mails?

Try docker-compose down && docker-compose up -d

Same "No mailbox selected" in SOGo and no imap login.

Can you print the attributes contents again please, as you did before.

Hm, but it would set the field @hachre

$stmt = $pdo->query("UPDATE `mailbox` SET `attributes` = '{}' WHERE `attributes` = '' OR NULL;");

Would this line only be called after logging into the web interface? Maybe something in the web interface requires the attributes fields before this line runs and thus breaks? Not sure.

Maybe it doesn't get run when people log in to the web interface but haven't erased their browser cache after an update?

Can you print the attributes contents again please, as you did before.

MariaDB [mailcow]> select attributes from mailbox;
+---------------------------------------------------------------------------------------------------------------------------+
| attributes |
+---------------------------------------------------------------------------------------------------------------------------+
| {"force_pw_update": "0", "tls_enforce_in": "0", "tls_enforce_out": "0", "sogo_access": "1", "mailbox_format": "maildir:"} |
| {"force_pw_update": "0", "tls_enforce_in": "0", "tls_enforce_out": "0", "sogo_access": "1", "mailbox_format": "maildir:"} |
| {"force_pw_update": "0", "tls_enforce_in": "0", "tls_enforce_out": "0", "sogo_access": "1", "mailbox_format": "maildir:"} |
+---------------------------------------------------------------------------------------------------------------------------+
3 rows in set (0.00 sec)

Okay, this looks fine now. It seems like you may be running outdated Docker images? Are you sure the update.sh went through?

Does your docker-compose.yml reference image: mailcow/dovecot:1.45 for example? If so, you can try running docker-compose down && docker-compose pull && docker-compose up -d to make sure the images are up-to-date.

If it doesn't mention dovecot:1.45, run ./update.sh again.

dovecot-mailcow: image: mailcow/dovecot:1.45 build: ./data/Dockerfiles/dovecot cap_add: - NET_BIND_SERVICE volumes:
update.sh finished successfully, without an error. I will test docker-compose down && docker-compose pull && docker-compose up -d

Sorry, yes, 1.45 is current.

No change after docker-compose down && docker-compose pull && docker-compose up -d

Check to see whether the Mailbox area in the web interface works correctly now. It should...

Still an empty mailbox, and no imap login.

No, I mean the Mailcow admin interface (not SOGo).

This works, but I can't save any change.

Erase your browser cache, that's a typical problem we've seen after updates.

Thanks, Now it works. After a success save from the mailcow admin. Imap and SOGo works.

馃憤 great, glad it's solved

Hm, but it would set the field @hachre

$stmt = $pdo->query("UPDATE `mailbox` SET `attributes` = '{}' WHERE `attributes` = '' OR NULL;");

I tried to run that sql from console but it doesn't set the attributes. When i use

OR `attributes` IS NULL

at the end it works.

That's true. Good catch, damn. :-)

@Smove great, thanks!

Note: I had to set this to a default value like {"force_pw_update": "0", "sogo_access": "0"}. Mailboxes with empty attributes had login problems.

Yes, that鈥檚 correct. The attributes are obligatory.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

CrAazZyMaN21 picture CrAazZyMaN21  路  3Comments

pgollor picture pgollor  路  3Comments

patrick7 picture patrick7  路  3Comments

zkryakgul picture zkryakgul  路  3Comments

phipag picture phipag  路  3Comments