This repository has been archived and is no longer maintained.
Development for this IMAP-to-JMAP proxy has been moved to the Stalwart Mail Server repository, where ongoing updates and improvements will take place.
Thank you for your interest and contributions!
Stalwart IMAP is an open-source Internet Message Access Protocol server designed to be secure, fast, robust and scalable. A JSON Meta Application Protocol (JMAP) backend such as Stalwart JMAP is required to use Stalwart IMAP (in other words, Stalwart IMAP is an imap4-to-jmap proxy).
Key features:
- IMAP4 and ManageSieve server:
- IMAP4rev2 (RFC 9051) full compliance.
- IMAP4rev1 (RFC 3501) backwards compatible.
- ManageSieve (RFC 5804) server with support for all extensions.
- Support for multiple IMAP extensions:
- Access Control Lists (ACL) (RFC 4314)
- Conditional Store and Quick Resynchronization (RFC 7162)
- SORT and THREAD (RFC 5256)
- Message Preview Generation (RFC 8970)
- And many other extensions...
- JMAP proxy features:
- Proxies IMAP4 and ManageSieve requests to JMAP requests.
- High-availability and fault-tolerance support when using a Stalwart JMAP backend.
- Full support for JMAP Core, JMAP Mail and JMAP for Sieve Scripts.
- Secure:
- OAuth 2.0 authorization code and device authorization flows.
- Rate limiting.
- Memory safe (thanks to Rust).
If you are having problems running Stalwart IMAP, you found a bug or just have a question, do not hesitate to reach us on Github Discussions, Reddit or Discord. Additionally you may become a sponsor to obtain priority support from Stalwart Labs Ltd.
The base tests perform protocol compliance tests as well as basic functionality testing on different functions across the Stalwart IMAP code base. To run the base test suite execute:
cargo test
The IMAP test suite performs a full server functionaly test including compliance to the IMAP4rev2/rev1
protocols and its extensions. To run these tests a blank Stalwart JMAP installation is required to be running at
http://127.0.0.1:8080
.
To run the IMAP test suite execute:
cargo test imap_tests -- --ignored
Stalwart IMAP's protocol compliance may be also tested with Dovecot's ImapTest:
- Download ImapTest.
- Start a blank Stalwart JMAP instance on
http://127.0.0.1:8080
. - Create a test account.
- Run the compliance tests as follows:
./imaptest host=<IMAP_HOSTNAME> port=<IMAP_PORT> \ user=<JMAP_ACCOUNT> pass=<JMAP_ACCOUNT_SECRET> auth=100 \ test=<PATH_TO_REPO>/src/tests/resources/imap-test/
Note: The tests distributed with ImapTest were slightly modified to support the IMAP4rev2 specification.
Stress testing Stalwart IMAP can be done with Dovecot's ImapTest:
- Download ImapTest.
- Start a blank Stalwart JMAP instance on
http://127.0.0.1:8080
. - Create at least 3 test accounts, all using the same password. Store the account names in a file, one account per line.
- Run the stress tests as follows:
./imaptest host=<IMAP_HOSTNAME> port=<IMAP_PORT> \ userfile=<PATH_TO_ACCOUNT_NAMES_FILE> \ pass=<JMAP_ACCOUNT_SECRET> \ mbox=<PATH_TO_TEST_MBOX> \ auth=100
To fuzz Stalwart IMAP server with cargo-fuzz
execute:
$ cargo +nightly fuzz run imap_server
Licensed under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See LICENSE for more details.
You can be released from the requirements of the AGPLv3 license by purchasing a commercial license. Please contact [email protected] for more details.
Copyright (C) 2020-2022, Stalwart Labs Ltd.