1

Topic: sogod [ERROR] [NGImap4ConnectionManager]> IMAP4 login failed

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):  1.5.2 MARIADB edition.
- Deployed with iRedMail Easy or the downloadable installer? installer
- Linux/BSD distribution name and version:  Rocky Linux release 8.10 (
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? YES
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

The problem is that one account could not read mailbox (both soqod and imap). The other accounts are working OK.


Restarting the server doesn't help


/var/log/sogo/sogo.log:

Aug 20 21:18:57 sogod [2257]: 77.65.6.55 "POST /SOGo/so/passwordRecoveryEnabled HTTP/1.0" 403 0/56 0.002 - - 0 - 12
Aug 20 21:18:57 sogod [2257]: 77.65.6.55 "POST /SOGo/so/passwordRecoveryEnabled HTTP/1.0" 403 0/56 0.001 - - 0 - 12
Aug 20 21:18:58 sogod [2257]: 77.65.6.55 "POST /SOGo/so/passwordRecoveryEnabled HTTP/1.0" 403 0/56 0.001 - - 0 - 12
Aug 20 21:19:00 sogod [2257]: SOGoRootPage successful login from '77.65.6.55' for user 'bartlomiej.woynicz@____DOMAIN____' - expire = -1  grace = -1
Aug 20 21:19:00 sogod [2257]: [ERROR] <0x0x55708f1e4ec0[GCSSessionsFolder]> -[GCSSessionsFolder writeRecordForEntryWithID:value:creationDate:lastSeenDate:]: cannot write record: <MySQL4Exception: 0x55708f3044d0> NAME:ExecutionFailed REASON:Data too long for column 'c_value' at row 1
Aug 20 21:19:00 sogod [2257]: 77.65.6.55 "POST /SOGo/connect HTTP/1.0" 200 92/100 0.011 - - 0 - 14
Aug 20 21:19:01 sogod [2257]: 77.65.6.55 "GET /SOGo/so/bartlomiej.woynicz%40____DOMAIN____ HTTP/1.0" 302 0/0 0.003 - - 0 - 14
Aug 20 21:19:01 sogod [2257]: 77.65.6.55 "GET /SOGo/so/bartlomiej.woynicz%40____DOMAIN____/view HTTP/1.0" 302 0/0 0.004 - - 0 - 14
Aug 20 21:19:01 sogod [2257]: 77.65.6.55 "GET /SOGo/so/bartlomiej.woynicz@____DOMAIN____/Mail HTTP/1.0" 302 0/0 0.003 - - 0 - 14
Aug 20 21:19:01 sogod [2257]: 77.65.6.55 "GET /SOGo/so/bartlomiej.woynicz@____DOMAIN____/Mail/view HTTP/1.0" 200 25184/0 0.027 101004 75% 0 - 14
Aug 20 21:19:02 sogod [2257]: 77.65.6.55 "GET /SOGo/so/bartlomiej.woynicz@____DOMAIN____/Calendar/alarmslist?browserTime=1724181541 HTTP/1.0" 200 60/0 0.008 - - 0 - 14
Aug 20 21:19:02 sogod [2257]: <0x0x55708f2117a0[NGImap4Client]> TLS started successfully.
Aug 20 21:19:02 sogod [2254]: <0x0x55708f098910[NGImap4Client]> TLS started successfully.
Aug 20 21:19:04 sogod [2257]: [ERROR] <0x0x55708e723760[NGImap4ConnectionManager]> IMAP4 login failed:
  host=127.0.0.1, user=bartlomiej.woynicz@____DOMAIN____, pwd=yes
  url=imaps://bartlomiej.woynicz%40____DOMAIN____@127.0.0.1/?tls=YES&tlsVerifyMode=allowInsecureLocalhost
  base=(null)
  base-class=(null))
  = <0x0x55708f2117a0[NGImap4Client]: login=bartlomiej.woynicz@____DOMAIN____(pwd) socket=<NGActiveSSLSocket[0x0x55708f424950]: mode=rw address=(null)>>
Aug 20 21:19:04 sogod [2257]: <0x55708f4160c0[SOGoMailAccount]:0> renewing imap4 password
Aug 20 21:19:04 sogod [2257]: <0x0x55708ef16320[NGImap4Client]> TLS started successfully.
Aug 20 21:19:08 sogod [2254]: [ERROR] <0x0x55708e7618d0[NGImap4ConnectionManager]> IMAP4 login failed:
  host=127.0.0.1, user=bartlomiej.woynicz@____DOMAIN____, pwd=yes
  url=imaps://bartlomiej.woynicz%40____DOMAIN____@127.0.0.1/?tls=YES&tlsVerifyMode=allowInsecureLocalhost
  base=(null)
  base-class=(null))
  = <0x0x55708f098910[NGImap4Client]: login=bartlomiej.woynicz@____DOMAIN____(pwd) socket=<NGActiveSSLSocket[0x0x55708efb6c00]: mode=rw address=(null)>>
Aug 20 21:19:08 sogod [2254]: <0x55708f2b48d0[SOGoMailAccount]:0> renewing imap4 password
Aug 20 21:19:08 sogod [2254]: <0x0x55708f22a320[NGImap4Client]> TLS started successfully.
Aug 20 21:19:10 sogod [2257]: [ERROR] <0x0x55708e723760[NGImap4ConnectionManager]> IMAP4 login failed:
  host=127.0.0.1, user=bartlomiej.woynicz@____DOMAIN____, pwd=yes
  url=imaps://bartlomiej.woynicz%40____DOMAIN____@127.0.0.1/?tls=YES&tlsVerifyMode=allowInsecureLocalhost
  base=(null)
  base-class=(null))
  = <0x0x55708ef16320[NGImap4Client]: login=bartlomiej.woynicz@____DOMAIN____(pwd) socket=<NGActiveSSLSocket[0x0x55708f1d4910]: mode=rw address=(null)>>
Aug 20 21:19:10 sogod [2257]: [ERROR] <0x55708f4160c0[SOGoMailAccount]:0> Could not connect IMAP4
Aug 20 21:19:10 sogod [2257]: 77.65.6.55 "POST /SOGo/so/bartlomiej.woynicz@____DOMAIN____/Mail/0/folderINBOX/changes HTTP/1.0" 200 18/126 8.042 - - 0 - 14
Aug 20 21:19:14 sogod [2254]: [ERROR] <0x0x55708e7618d0[NGImap4ConnectionManager]> IMAP4 login failed:
  host=127.0.0.1, user=bartlomiej.woynicz@____DOMAIN____, pwd=yes
  url=imaps://bartlomiej.woynicz%40____DOMAIN____@127.0.0.1/?tls=YES&tlsVerifyMode=allowInsecureLocalhost
  base=(null)
  base-class=(null))
  = <0x0x55708f22a320[NGImap4Client]: login=bartlomiej.woynicz@____DOMAIN____(pwd) socket=<NGActiveSSLSocket[0x0x55708f11ddf0]: mode=rw address=(null)>>
Aug 20 21:19:14 sogod [2254]: [ERROR] <0x55708f2b48d0[SOGoMailAccount]:0> Could not connect IMAP4
Aug 20 21:19:14 sogod [2254]: 77.65.6.55 "GET /SOGo/so/bartlomiej.woynicz@____DOMAIN____/Mail/0/view HTTP/1.0" 200 16/0 12.067 - - 0 - 12
Aug 20 21:19:14 sogod [2254]: <0x0x55708f07ac00[NGImap4Client]> TLS started successfully.
Aug 20 21:19:20 sogod [2254]: [ERROR] <0x0x55708e7618d0[NGImap4ConnectionManager]> IMAP4 login failed:
  host=127.0.0.1, user=bartlomiej.woynicz@____DOMAIN____, pwd=yes
  url=imaps://bartlomiej.woynicz%40____DOMAIN____@127.0.0.1/?tls=YES&tlsVerifyMode=allowInsecureLocalhost
  base=(null)
  base-class=(null))
  = <0x0x55708f07ac00[NGImap4Client]: login=bartlomiej.woynicz@____DOMAIN____(pwd) socket=<NGActiveSSLSocket[0x0x55708efb2e00]: mode=rw address=(null)>>
Aug 20 21:19:20 sogod [2254]: <0x55708f086850[SOGoMailAccount]:0> renewing imap4 password
Aug 20 21:19:20 sogod [2254]: <0x0x55708f22a310[NGImap4Client]> TLS started successfully.
Aug 20 21:19:22 sogod [2254]: [ERROR] <0x0x55708e7618d0[NGImap4ConnectionManager]> IMAP4 login failed:
  host=127.0.0.1, user=bartlomiej.woynicz@____DOMAIN____, pwd=yes
  url=imaps://bartlomiej.woynicz%40____DOMAIN____@127.0.0.1/?tls=YES&tlsVerifyMode=allowInsecureLocalhost
  base=(null)
  base-class=(null))
  = <0x0x55708f22a310[NGImap4Client]: login=bartlomiej.woynicz@____DOMAIN____(pwd) socket=<NGActiveSSLSocket[0x0x55708f2c8d10]: mode=rw address=(null)>>
Aug 20 21:19:22 sogod [2254]: [ERROR] <0x55708f086850[SOGoMailAccount]:0> Could not connect IMAP4
Aug 20 21:19:22 sogod [2254]: 77.65.6.55 "POST /SOGo/so/bartlomiej.woynicz@____DOMAIN____/Mail/unseenCount HTTP/1.0" 200 19/31 7.540 - - 0 - 12

----

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

2

Re: sogod [ERROR] [NGImap4ConnectionManager]> IMAP4 login failed

rafal.mikolajczak wrote:

Aug 20 21:19:00 sogod [2257]: [ERROR] <0x0x55708f1e4ec0[GCSSessionsFolder]> -[GCSSessionsFolder writeRecordForEntryWithID:value:creationDate:lastSeenDate:]: cannot write record: <MySQL4Exception: 0x55708f3044d0> NAME:ExecutionFailed REASON:Data too long for column 'c_value' at row 1

It's clear here.
Please drop SQL table `sogo.sogo_sessions_folder` and restart SOGo service to
fix it. SOGo will re-create this table automatically.

This is mentioned in iRedMail upgrade tutorial for 1.5.1, seems you missed it:
https://docs.iredmail.org/upgrade.iredm … -sql-table

3

Re: sogod [ERROR] [NGImap4ConnectionManager]> IMAP4 login failed

I have executed the command but the problem remained - "No mailbox selected" message in SOGo web service.

[root@poczta ~]# mysql sogo -e "DROP TABLE sogo_sessions_folder;"
[root@poczta ~]# /bin/systemctl status sogod.service
● sogod.service - SOGo is a groupware server
   Loaded: loaded (/usr/lib/systemd/system/sogod.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2024-08-21 07:57:29 CEST; 1min 7s ago




Aug 21 08:03:19 sogod [132507]: <0x0x55c488d231b0[NGSieveClient]> TLS started successfully.
Aug 21 08:03:19 sogod [132507]: ____IP____ "GET /SOGo/so/bartlomiej.woynicz@____DOMAIN____/Preferences HTTP/1.0" 200 33440/0 0.747 136460 75% 7M - 13
Aug 21 08:03:20 sogod [132507]: <0x0x55c489125470[SOGoWebDAVAclManager]> entry '{DAV:}write' already exists in DAV permissions table
Aug 21 08:03:20 sogod [132507]: <0x0x55c489125470[SOGoWebDAVAclManager]> entry '{DAV:}write-properties' already exists in DAV permissions table
Aug 21 08:03:20 sogod [132507]: <0x0x55c489125470[SOGoWebDAVAclManager]> entry '{DAV:}write-content' already exists in DAV permissions table
Aug 21 08:03:20 sogod [132507]: ____IP____ "GET /SOGo/so/bartlomiej.woynicz@____DOMAIN____/Calendar/alarmslist?browserTime=1724220199 HTTP/1.0" 200 60/0 0.009 - - 0 - 14
Aug 21 08:03:20 sogod [132506]: <0x0x55c488c39ac0[NGImap4Client]> TLS started successfully.
Aug 21 08:03:20 sogod [132507]: <0x0x55c488d84910[NGSieveClient]> TLS started successfully.
Aug 21 08:03:22 sogod [132506]: [ERROR] <0x0x55c488ca9670[NGImap4ConnectionManager]> IMAP4 login failed:
  host=127.0.0.1, user=bartlomiej.woynicz@____DOMAIN____, pwd=yes
  url=imaps://bartlomiej.woynicz%40____DOMAIN____@127.0.0.1/?tls=YES&tlsVerifyMode=allowInsecureLocalhost
  base=(null)
  base-class=(null))
  = <0x0x55c488c39ac0[NGImap4Client]: login=bartlomiej.woynicz@____DOMAIN____(pwd) socket=<NGActiveSSLSocket[0x0x55c488bdf030]: mode=rw address=(null)>>
Aug 21 08:03:22 sogod [132506]: <0x55c488d6af00[SOGoMailAccount]:0> renewing imap4 password
Aug 21 08:03:22 sogod [132506]: <0x0x55c488d375b0[NGImap4Client]> TLS started successfully.
Aug 21 08:03:24 sogod [132507]: ____IP____ "GET /SOGo/so/bartlomiej.woynicz@____DOMAIN____/activeExternalSieveScripts HTTP/1.0" 404 0/0 4.040 - - 0 - 15
Aug 21 08:03:28 sogod [132506]: [ERROR] <0x0x55c488ca9670[NGImap4ConnectionManager]> IMAP4 login failed:
  host=127.0.0.1, user=bartlomiej.woynicz@____DOMAIN____, pwd=yes
  url=imaps://bartlomiej.woynicz%40____DOMAIN____@127.0.0.1/?tls=YES&tlsVerifyMode=allowInsecureLocalhost
  base=(null)
  base-class=(null))
  = <0x0x55c488d375b0[NGImap4Client]: login=bartlomiej.woynicz@____DOMAIN____(pwd) socket=<NGActiveSSLSocket[0x0x55c488dd91a0]: mode=rw address=(null)>>
Aug 21 08:03:28 sogod [132506]: [ERROR] <0x55c488d6af00[SOGoMailAccount]:0> Could not connect IMAP4
Aug 21 08:03:28 sogod [132506]: ____IP____ "POST /SOGo/so/bartlomiej.woynicz@____DOMAIN____/Mail/0/folderINBOX/changes HTTP/1.0" 200 18/126 8.057 - - 0 - 13

4

Re: sogod [ERROR] [NGImap4ConnectionManager]> IMAP4 login failed

- Did you use correct username and password? I suggest double check. And verify it with Roundcube webmail (if you have it running too) or MUA like Thunderbird.
- Turn on debug mode in Dovecot for authentication. FYI https://docs.iredmail.org/debug.dovecot.html