stalwartlabs / mail-server

Secure & Modern All-in-One Mail Server (IMAP, JMAP, POP3, SMTP)
https://stalw.art
4.56k stars 175 forks source link

[bug]: Fix IMAP4rev1 compatibility issues with certain clients #76

Closed 33KK closed 8 months ago

33KK commented 1 year ago

What happened?

I can't receive any new emails after importing a maildir exported using mbsync from a https://maddy.email server

How can we reproduce the problem?

I exported my emails from maddy using mbsync with this config:

CopyArrivalDate yes
Sync Pull
Create Near
Remove Near
Expunge Near

IMAPAccount maddy
Host uwu.kkx.one
User test@kkx.one
Pass test69420
SSLType IMAPS

IMAPStore maddy-remote
Account maddy

MaildirStore maddy-local
Path ~/mail/test/
Inbox ~/mail/test/INBOX
SubFolders Verbatim

Channel maddy
Far :maddy-remote:
Near :maddy-local:
Patterns *
SyncState *

This is the exported maildir: test.zip

Then I imported this into an empty account using stalwart-cli -u https://jmap.kkx.one import messages --format maildir-nested test ~/mail/test.

This created a bunch of conflicting mailboxes, like "Junk" and "Junk Mail", though I wouldn't really expect this to break something.

Then I tried sending myself an email both from GMail and ProtonMail, none of them appeared in my inbox either using Thunderbird or K-9 Mail.

When I did this with my main account and more emails, Thunderbird seemed to work just fine, while K-9 Mail didn't see any new emails.

This feels like an issue with either mailbox IDs or message IDs, mbsync did complain that UIDVALIDITY was missing on every folder, and it created a .uidvalidity file in every mailbox.

Version

v0.3.x

What database are you using?

SQLite

What blob storage are you using?

Local

Where is your directory located?

PostgreSQL

What operating system are you using?

Docker

Relevant log output

Didn't manage to see anything relevant amidst all the bot login attempts spam in the logs, other than the messages I tried sending myself being "delivered successfully".

Code of Conduct

johansmitsnl commented 8 months ago

@mdecimus Nextcloud now consistently shows the e-mails in the inbox. But... and this is still the same on the mobile app. When you send a new e-mail it does not appear on inbox refresh (not a browser refresh). On the mobile it shows an unread count but not the e-mail. In Nextcloud you need to switch folders for it to appear and not though the in mail client refresh button.

Hope this feedback is clear, if not you know how to reach me, but it is a step forward!