Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

stalwartlabs/imap-to-jmap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

⚠️ Repository Archived ⚠️

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!


IMAP to JMAP Proxy Server

Test Build License: AGPL v3

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:

Support

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.

Testing

Base tests

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

IMAP4 tests

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

Third-party tests

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 tests

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
    

Fuzz

To fuzz Stalwart IMAP server with cargo-fuzz execute:

 $ cargo +nightly fuzz run imap_server

License

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 licensing@stalw.art for more details.

Copyright

Copyright (C) 2020-2022, Stalwart Labs Ltd.