1

Topic: Exchange sync fails

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

I'm experiencing an issue while syncing mailbox with Sogo Exchange ActiveSync with 13k messages starting from last week.
No changes were made on the server but from now on, on my Android devices al contacts and appointment disappeared. Mail sync seems to be in a loop and deletion or sending is no longer working.
From the webmail (SOGO) everything is working properly.
I also tried to increase vmem, timeouts, ecc without success.

I got this from sogo logs:
Dec 01 04:29:43 sogod [1504]: [ERROR] <0x0x55f418345480[WOHttpTransaction]> client disconnected during delivery of response for <WORequest[0x0x55f4186135f0]: method=POST uri=/SOGo/Microsoft-Server-ActiveSync?Cmd=Ping&User=XXXXX%40XXXXXXX.it&DeviceId=YYYYYY&DeviceType=Android app=SOGo rqKey=Microsoft-Server-ActiveSync rqPath=(null)> (len=101): the socket was shutdown
Dec 01 04:29:43 sogod [1504]: localhost "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Ping&User=XXXXX%40XXXXX.it&DeviceId=YYYYYY&DeviceType=Android HTTP/1.0" 200 101/125 0.084 - - 0 - 14
Dec 01 04:29:43 sogod [1504]: <0x0x55f4180c3820[SOGoActiveSyncDispatcher]> Change detected using Ping, we let the EAS client know to send a Sync.
Dec 01 04:29:43 sogod [1504]: localhost "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Ping&User=XXXXX%40XXXXX.it&DeviceId=YYYYYY&DeviceType=Android HTTP/1.0" 200 101/125 0.103 - - 0 - 14
Dec 01 04:31:59 sogod [1504]: localhost "OPTIONS /SOGo/Microsoft-Server-ActiveSync HTTP/1.0" 200 0/0 0.014 - - 0 - 14
Dec 01 04:31:59 sogod [1504]: localhost "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=FolderSync&User=XXXXX%40XXXXX.it&DeviceId=YYYYYY&DeviceType=Android HTTP/1.0" 200 5263/13 0.153 - - 0 - 14
Dec 01 04:32:01 sogod [1504]: <0x0x55f41839f690[SOGoActiveSyncDispatcher]> Change detected during Sync, we push the content.
Dec 01 04:32:01 sogod [1504]: localhost "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Sync&User=XXXXX%40XXXXX.it&DeviceId=YYYYYY&DeviceType=Android HTTP/1.0" 200 73/58 0.058 - - 0 - 14
Dec 01 04:32:01 sogod [1504]: <0x0x55f417fa2120[NGImap4Client]> Note: no key found for sorting, using 'DATE': (null)
Dec 01 04:32:02 sogod [1504]: <0x0x55f4183a1d80[NGImap4ResponseParser]> ERROR(-[NGImap4ResponseParser _parseData]): got content size '0'!
Dec 01 04:32:02 sogod [1504]: <0x0x55f4183a1d80[NGImap4ResponseParser]> ERROR(-[NGImap4ResponseParser _parseBodyContent]): got no data.
Dec 01 04:32:02 sogod [1504]: <0x0x55f4183a1d80[NGImap4ResponseParser]> ERROR: got no body content for key: 'body[1.1.1]'
Dec 01 04:32:02 sogod [1504]: [ERROR] <0x55f417f9b840[SOGoMailObject]:20457> got no data for key: body[1.1.1]
Dec 01 04:32:02 sogod [1504]: <0x0x55f4183a1d80[NGImap4ResponseParser]> ERROR(-[NGImap4ResponseParser _parseData]): got content size '0'!
Dec 01 04:32:02 sogod [1504]: <0x0x55f4183a1d80[NGImap4ResponseParser]> ERROR(-[NGImap4ResponseParser _parseBodyContent]): got no data.
Dec 01 04:32:02 sogod [1504]: <0x0x55f4183a1d80[NGImap4ResponseParser]> ERROR: got no body content for key: 'body[1.1.1]'
Dec 01 04:32:02 sogod [1504]: [ERROR] <0x55f417f9b840[SOGoMailObject]:20457> got no data for key: body[1.1.1]
Dec 01 04:32:02 sogod [1504]: <0x0x55f4183a1d80[NGImap4ResponseParser]> ERROR(-[NGImap4ResponseParser _parseData]): got content size '0'!
Dec 01 04:32:02 sogod [1504]: <0x0x55f4183a1d80[NGImap4ResponseParser]> ERROR(-[NGImap4ResponseParser _parseBodyContent]): got no data.
Dec 01 04:32:02 sogod [1504]: <0x0x55f4183a1d80[NGImap4ResponseParser]> ERROR: got no body content for key: 'body[1.1.1]'
Dec 01 04:32:02 sogod [1504]: [ERROR] <0x55f41882b000[SOGoMailObject]:20458> got no data for key: body[1.1.1]
Dec 01 04:32:02 sogod [1504]: <0x0x55f4183a1d80[NGImap4ResponseParser]> ERROR(-[NGImap4ResponseParser _parseData]): got content size '0'!
Dec 01 04:32:02 sogod [1504]: <0x0x55f4183a1d80[NGImap4ResponseParser]> ERROR(-[NGImap4ResponseParser _parseBodyContent]): got no data.
Dec 01 04:32:02 sogod [1504]: <0x0x55f4183a1d80[NGImap4ResponseParser]> ERROR: got no body content for key: 'body[1.1.1]'
Dec 01 04:32:02 sogod [1504]: [ERROR] <0x55f41882b000[SOGoMailObject]:20458> got no data for key: body[1.1.1]
Dec 01 04:32:02 sogod [1504]: <0x0x55f417d9cd90[SOGoActiveSyncDispatcher]> Change detected during Sync, we push the content.
Dec 01 04:32:02 sogod [1504]: localhost "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Sync&User=XXXXX%40XXXXX.it&DeviceId=YYYYYY&DeviceType=Android HTTP/1.0" 200 997799/97 1.114 - - 7M - 14
Dec 01 04:32:04 sogod [1504]: <0x0x55f417fa2120[NGImap4Client]> Note: no key found for sorting, using 'DATE': (null)
Dec 01 04:32:04 sogod [1504]: <0x0x55f418387590[SOGoActiveSyncDispatcher]> Change detected during Sync, we push the content.
Dec 01 04:32:04 sogod [1504]: localhost "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Sync&User=XXXXX%40XXXXX.it&DeviceId=YYYYYY&DeviceType=Android HTTP/1.0" 200 213389/106 0.231 - - 1M - 14
Dec 01 04:32:04 sogod [1504]: <0x0x55f4181d2f00[SOGoActiveSyncDispatcher]> Change detected during Sync, we push the content.
Dec 01 04:32:04 sogod [1504]: localhost "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Sync&User=XXXXX%40XXXXX.it&DeviceId=YYYYYY&DeviceType=Android HTTP/1.0" 200 73/58 0.044 - - 0 - 14
Dec 01 04:32:05 sogod [1504]: <0x0x55f417fa2120[NGImap4Client]> Note: no key found for sorting, using 'DATE': (null)
Dec 01 04:32:05 sogod [1504]: <0x0x55f417f0f360[SOGoActiveSyncDispatcher]> Change detected during Sync, we push the content.
Dec 01 04:32:05 sogod [1504]: localhost "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Sync&User=XXXXX%40XXXXX.it&DeviceId=YYYYYY&DeviceType=Android HTTP/1.0" 200 634/97 0.104 - - 0 - 14
Dec 01 04:32:05 sogod [1504]: <0x0x55f41834e670[SOGoActiveSyncDispatcher]> Change detected using Ping, we let the EAS client know to send a Sync.
Dec 01 04:32:05 sogod [1504]: [ERROR] <0x0x55f418314ef0[WOHttpTransaction]> client disconnected during delivery of response for <WORequest[0x0x55f41841e1b0]: method=POST uri=/SOGo/Microsoft-Server-ActiveSync?Cmd=Ping&User=XXXXX%40XXXXX.it&DeviceId=YYYYYY&DeviceType=Android app=SOGo rqKey=Microsoft-Server-ActiveSync rqPath=(null)> (len=101): the socket was shutdown
Dec 01 04:32:05 sogod [1504]: localhost "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Ping&User=XXXXX%40XXXXX.it&DeviceId=YYYYYY&DeviceType=Android HTTP/1.0" 200 101/125 0.081 - - 0 - 14
Dec 01 04:32:05 sogod [1504]: <0x0x55f418430310[SOGoActiveSyncDispatcher]> Change detected using Ping, we let the EAS client know to send a Sync.
Dec 01 04:32:05 sogod [1504]: localhost "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Ping&User=XXXXX%40XXXXX.it&DeviceId=YYYYYY&DeviceType=Android HTTP/1.0" 200 101/125 0.071 - - 0 - 14
Dec 01 04:32:07 sogod [1504]: localhost "OPTIONS /SOGo/Microsoft-Server-ActiveSync HTTP/1.0" 200 0/0 0.005 - - 0 - 14

----

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

2

Re: Exchange sync fails

ERROR: got no body content for key: 'body[1.1.1]'
Dec 01 04:32:02 sogod [1504]: [ERROR] <0x55f417f9b840[SOGoMailObject]:20457> got no data for key: body[1.1.1]
Dec 01 04:32:02 sogod [1504]: <0x0x55f4183a1d80[NGImap4ResponseParser]> ERROR(-[NGImap4ResponseParser _parseData]): got content size '0'!
Dec 01 04:32:02 sogod [1504]: <0x0x55f4183a1d80[NGImap4ResponseParser]> ERROR(-[NGImap4ResponseParser _parseBodyContent]): got no data.

My best guess: broken index

try:

doveadm index -u user@example.com '*'
doveadm force-resync -u user@example.com '*'

systemctl restart dovecot

3

Re: Exchange sync fails

Cthulhu wrote:
ERROR: got no body content for key: 'body[1.1.1]'
Dec 01 04:32:02 sogod [1504]: [ERROR] <0x55f417f9b840[SOGoMailObject]:20457> got no data for key: body[1.1.1]
Dec 01 04:32:02 sogod [1504]: <0x0x55f4183a1d80[NGImap4ResponseParser]> ERROR(-[NGImap4ResponseParser _parseData]): got content size '0'!
Dec 01 04:32:02 sogod [1504]: <0x0x55f4183a1d80[NGImap4ResponseParser]> ERROR(-[NGImap4ResponseParser _parseBodyContent]): got no data.

My best guess: broken index

try:

doveadm index -u user@example.com '*'
doveadm force-resync -u user@example.com '*'

systemctl restart dovecot

I did it but the situation is exactly the same.
Contacts gets synced for a while, emails are not updated and the Gmail app starts an infinite loop...

4 (edited by Cthulhu 2025-12-02 01:30:31)

Re: Exchange sync fails

Well, then the app has hit it's limitations and can't handle the sheer amount of messages, considering that sogo itself works fine

Exchange ActiveSync loops with large Gmail inboxes, and that seems to happen

I guess you need to thin out your mailbox, i don't think that those 13k mails are all legit, most comes from spam anyway



you can try this:

doveadm fetch -u user@example.com 'body[]' mailbox '*' 2>&1 | grep -i "Error"

this will take long, as it fetches EVERY mail, but if it finds a mail with an empty body, you will get an error

5

Re: Exchange sync fails

Cthulhu wrote:

Well, then the app has hit it's limitations and can't handle the sheer amount of messages, considering that sogo itself works fine

Exchange ActiveSync loops with large Gmail inboxes, and that seems to happen

I guess you need to thin out your mailbox, i don't think that those 13k mails are all legit, most comes from spam anyway



you can try this:

doveadm fetch -u user@example.com 'body[]' mailbox '*' 2>&1 | grep -i "Error"

this will take long, as it fetches EVERY mail, but if it finds a mail with an empty body, you will get an error


I have also a gmail account with almost the same number of emails but works fine with the same app.
I deleted tons of old emails on the other account but the same happens.

Any ideas?

6

Re: Exchange sync fails

Most probably I found the issue: https:// support.google.com /mail/thread/389037416/exchange-activesync-does-not-work-anymore-after-the-latest-gmail-app-update?hl=en

Cthulhu wrote:

Well, then the app has hit it's limitations and can't handle the sheer amount of messages, considering that sogo itself works fine

Exchange ActiveSync loops with large Gmail inboxes, and that seems to happen

I guess you need to thin out your mailbox, i don't think that those 13k mails are all legit, most comes from spam anyway



you can try this:

doveadm fetch -u user@example.com 'body[]' mailbox '*' 2>&1 | grep -i "Error"

this will take long, as it fetches EVERY mail, but if it finds a mail with an empty body, you will get an error

7

Re: Exchange sync fails

I confirm: the issue is related to the latest update of the GMAIL app.
I downgraded it by removing all updates and the sync magically started to work again.

Lets wait for a new update of the app...

8

Re: Exchange sync fails

Thanks for sharing. smile