Incident Description:
The Problem: A user could not see specific emails in their Sent folder when using the SOGo web interface. Specifically, emails sent to one particular recipient were “invisible,” even though the folder appeared to be working for other recipients.
The Verification: Connecting the account to Thunderbird via IMAP showed all emails perfectly, proving the emails existed on the server and the issue was limited to the SOGo display/cache.
The Root Cause: Likely a synchronization or UID (Unique Identifier) caching error in SOGo’s internal database, causing it to skip certain messages during folder indexing.
The Solution (via Dovecot terminal):
The fix involves moving the affected emails to a temporary folder and back again. This forces Dovecot to assign new UIDs to the messages, which triggers SOGo to “re-discover” them and add them to its web-view database.
Run these commands as root on the Mailcow host:
1. Create a temporary ‘Rescue’ folder for the user
docker exec -it $(docker ps -qf name=dovecot-mailcow) doveadm mailbox create -u user@example.com “TEMP_RECOVERY”
2. Move the invisible emails (filtered by recipient) to the new folder
docker exec -it $(docker ps -qf name=dovecot-mailcow) doveadm move -u user@example.com “TEMP_RECOVERY” mailbox Sent TO “recipient@example.com”
3. Move them back to the original Sent folder
This ‘re-insertion’ assigns the new UIDs that SOGo needs to see them
docker exec -it $(docker ps -qf name=dovecot-mailcow) doveadm move -u user@example.com Sent mailbox “TEMP_RECOVERY” ALL
4. Cleanup: Remove the temporary folder
docker exec -it $(docker ps -qf name=dovecot-mailcow) doveadm mailbox delete -u user@example.com “TEMP_RECOVERY”
If you decide to post this to the Mailcow Community Forums, here is a clear summary of the incident and the exact commands you used. This structure will help other admins who might be searching for the same “invisible email” problem.
Topic Title Suggestion:
[FIX] Specific emails missing in SOGo UI but visible in IMAP (Thunderbird)
Incident Description:
The Problem: A user could not see specific emails in their Sent folder when using the SOGo web interface. Specifically, emails sent to one particular recipient were “invisible,” even though the folder appeared to be working for other recipients.
The Verification: Connecting the account to Thunderbird via IMAP showed all emails perfectly, proving the emails existed on the server and the issue was limited to the SOGo display/cache.
The Root Cause: Likely a synchronization or UID (Unique Identifier) caching error in SOGo’s internal database, causing it to skip certain messages during folder indexing.
The Solution (via Dovecot terminal):
The fix involves moving the affected emails to a temporary folder and back again. This forces Dovecot to assign new UIDs to the messages, which triggers SOGo to “re-discover” them and add them to its web-view database.
Run these commands as root on the Mailcow host:
Bash
1. Create a temporary ‘Rescue’ folder for the user
docker exec -it $(docker ps -qf name=dovecot-mailcow) doveadm mailbox create -u user@example.com “TEMP_RECOVERY”
2. Move the invisible emails (filtered by recipient) to the new folder
docker exec -it $(docker ps -qf name=dovecot-mailcow) doveadm move -u user@example.com “TEMP_RECOVERY” mailbox Sent TO “recipient@example.com”
3. Move them back to the original Sent folder
This ‘re-insertion’ assigns the new UIDs that SOGo needs to see them
docker exec -it $(docker ps -qf name=dovecot-mailcow) doveadm move -u user@example.com Sent mailbox “TEMP_RECOVERY” ALL
4. Cleanup: Remove the temporary folder
docker exec -it $(docker ps -qf name=dovecot-mailcow) doveadm mailbox delete -u user@example.com “TEMP_RECOVERY”
Alternative Troubleshooting (If moving fails):
If the move command doesn’t fix it, a full re-index of the folder sometimes helps:
Bash
docker exec -it $(docker ps -qf name=dovecot-mailcow) doveadm index -u user@example.com Sent
The idea of this post was to document a problem that occurred and a solution for the community if anyone including myself runs into this problem again than I remember the cut chase method to solve it.