-
Notifications
You must be signed in to change notification settings - Fork 0
Fix Stalwart mail server compatibility for IMAP, CalDAV, and CardDAV #1
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
base: master
Are you sure you want to change the base?
Conversation
Use SASL PLAIN authentication when LOGINDISABLED capability is present. Stalwart mail server may disable the LOGIN command and require AUTHENTICATE PLAIN instead. Co-authored-by: GrassBlock1 <46253950+GrassBlock1@users.noreply.github.com>
Add fallback logic to handle cases where WebDAV discovery fails. When FindCalendars or FindAddressBooks fails with the discovered home set, try using the base URL path directly as a fallback. This fixes compatibility with Stalwart mail server and other servers that may not fully implement WebDAV principal/home-set discovery. Co-authored-by: GrassBlock1 <46253950+GrassBlock1@users.noreply.github.com>
Co-authored-by: GrassBlock1 <46253950+GrassBlock1@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds compatibility fixes for Stalwart mail server by addressing authentication and service discovery issues across IMAP, CalDAV, and CardDAV protocols.
Changes:
- Add SASL PLAIN authentication fallback for IMAP when LOGIN command is disabled
- Add CalDAV calendar discovery fallback to base URL path when standard discovery fails
- Add CardDAV address book discovery fallback to base URL path when standard discovery fails
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| session.go | Adds capability check for LOGINDISABLED and uses SASL PLAIN authentication when LOGIN is unavailable |
| plugins/caldav/caldav.go | Adds fallback to base URL path when FindCalendars fails with calendar home set |
| plugins/carddav/plugin.go | Adds fallback to base URL path when FindAddressBooks fails with address book home set |
| .gitignore | Adds alps binary to ignored files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Stalwart mail server fails with authentication errors on IMAP and returns 500 errors on CalDAV/CardDAV endpoints due to protocol implementation differences.
Changes
IMAP authentication: Check
LOGINDISABLEDcapability and use SASL PLAIN authentication when LOGIN command is unavailableCalDAV/CardDAV discovery: Add fallback to base URL path when WebDAV principal/home-set discovery fails
All changes activate only when needed, maintaining compatibility with existing mail servers.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
git.sr.ht/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(dns block)https://api.github.com/repos/stalwartlabs/mail-server/issues/usr/bin/curl curl -s REDACTED(http block)todo.sr.ht/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.