Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: mailsync reports error in what should be a trivial case #1064

Open
1 task done
rcfa opened this issue Jan 8, 2025 · 0 comments
Open
1 task done

[bug]: mailsync reports error in what should be a trivial case #1064

rcfa opened this issue Jan 8, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@rcfa
Copy link

rcfa commented Jan 8, 2025

What happened?

I was testing mailsync in preparation of eventually moving my user mailboxes from a dovecot server to stalwart.
The following setup (with obvious substitutions) works fine with the remote (dovecot) system, but throws an error with the local (stalwart) system. The following is the mailsync config...

cat .mailsync
store remote {
	server {imap.remote.com/ssl/novalidate-cert/user=user}
	ref {imap.remote.com}
	pat *
	passwd	xxxxxxxxxxxx
}

store local {
        server {localhost/ssl/novalidate-cert/user=user}
        ref {localhost}
        pat *
        passwd xxxxxxxxxxxx
}

... and session:

mailsync local
Listing store “local”
Error: IMAP SERVER BUG (invalid challenge): “”
Error: Can not authenticate to IMAP server: [CLOSED] IMAP connection broken (server response)
Error: Can’t contact server {localhost/ssl/novalidate-cert/user=user}
Error: Could not open a half open, read only connection to store local

and here’s the corresponding log at trace level:

2025-01-08T03:45:49Z DEBUG TLS certificate not found (tls.certificate-not-found)
hostname = “localhost”
2025-01-08T03:45:49Z DEBUG IMAP connection started (imap.connection-start)
listenerId = “imaptls”
localPort = 993
remoteIp = ::1
remotePort = 47690
2025-01-08T03:45:49Z TRACE Raw IMAP input received (imap.raw-input)
listenerId = “imaptls”
localPort = 993
remoteIp = ::1
remotePort = 47690
size = 29
contents = “00000000 AUTHENTICATE PLAIN\r\n”
2025-01-08T03:45:49Z TRACE Raw IMAP output sent (imap.raw-output)
listenerId = “imaptls”
localPort = 993
remoteIp = ::1
remotePort = 47690
size = 6
contents = “+ “”\r\n”
2025-01-08T03:46:49Z DEBUG Network timeout (network.timeout)
listenerId = “imaptls”
localPort = 993
remoteIp = ::1
remotePort = 47690
causedBy = crates/imap/src/core/session.rs:95
2025-01-08T03:46:49Z TRACE Raw IMAP output sent (imap.raw-output)
listenerId = “imaptls”
localPort = 993
remoteIp = ::1
remotePort = 47690
size = 29
contents = “* BYE Connection timed out.\r\n”
2025-01-08T03:46:49Z DEBUG IMAP connection ended (imap.connection-end)
listenerId = “imaptls”
localPort = 993
remoteIp = ::1
remotePort = 47690
elapsed = 60015ms

To avoid any issues in that regards, plain text authentication is (temporarily) enabled.

Note the matching up of the contents = “+ “”\r\n” and the error message Error: IMAP SERVER BUG (invalid challenge): “”

Any idea what’s going on here?
Thanks for any pointers…

How can we reproduce the problem?

I can reproduce the problem by doing the following steps: See above

Version

v0.11.x

What database are you using?

RocksDB

What blob storage are you using?

Filesystem

Where is your directory located?

Internal

What operating system are you using?

Linux

Relevant log output

2025-01-08T03:45:49Z DEBUG TLS certificate not found (tls.certificate-not-found)
hostname = "localhost"
2025-01-08T03:45:49Z DEBUG IMAP connection started (imap.connection-start)
listenerId = "imaptls"
localPort = 993
remoteIp = ::1
remotePort = 47690
2025-01-08T03:45:49Z TRACE Raw IMAP input received (imap.raw-input)
listenerId = "imaptls"
localPort = 993
remoteIp = ::1
remotePort = 47690
size = 29
contents = "00000000 AUTHENTICATE PLAIN\r\n"
2025-01-08T03:45:49Z TRACE Raw IMAP output sent (imap.raw-output)
listenerId = "imaptls"
localPort = 993
remoteIp = ::1
remotePort = 47690
size = 6
contents = "+ ""\r\n"
2025-01-08T03:46:49Z DEBUG Network timeout (network.timeout)
listenerId = "imaptls"
localPort = 993
remoteIp = ::1
remotePort = 47690
causedBy = crates/imap/src/core/session.rs:95
2025-01-08T03:46:49Z TRACE Raw IMAP output sent (imap.raw-output)
listenerId = "imaptls"
localPort = 993
remoteIp = ::1
remotePort = 47690
size = 29
contents = "* BYE Connection timed out.\r\n"
2025-01-08T03:46:49Z DEBUG IMAP connection ended (imap.connection-end)
listenerId = "imaptls"
localPort = 993
remoteIp = ::1
remotePort = 47690
elapsed = 60015ms

Code of Conduct

  • I agree to follow this project's Code of Conduct
@rcfa rcfa added the bug Something isn't working label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant