CLI to spawn pre-authenticated IMAP/SMTP sessions and expose them via Unix sockets
- IMAP support (requires
imapcargo features) - SMTP support (requires
smtpcargo features) - TLS support:
- Native TLS support via native-tls crate (requires
native-tlsfeature) - Rust TLS support via rustls crate with:
- AWS crypto support (requires
rustls-awsfeature) - Ring crypto support (requires
rustls-ringfeature)
- AWS crypto support (requires
- Native TLS support via native-tls crate (requires
- SASL support:
- Pre-authenticated IMAP/SMTP session redirected to Unix sockets via
sirup start - REPL that can interact with the Unix socket-based IMAP/SMTP session via
sirup repl - Partial JSON support with
--json
Sirup CLI is written in Rust, and relies on cargo features to enable or disable functionalities. Default features can be found in the features section of the Cargo.toml, or on docs.rs.
Sirup CLI can be installed with the installer:
As root:
curl -sSL https://raw.githubusercontent.com/pimalaya/sirup/master/install.sh | sudo sh
As a regular user:
curl -sSL https://raw.githubusercontent.com/pimalaya/sirup/master/install.sh | PREFIX=~/.local sh
These commands install the latest binary from the GitHub releases section.
If you want a more up-to-date version than the latest release, check out the releases GitHub workflow and look for the Artifacts section. You should find a pre-built binary matching your OS. These pre-built binaries are built from the master branch, using default features.
Sirup CLI can be installed with cargo:
cargo install sirup
You can also use the git repository for a more up-to-date (but less stable) version:
cargo install --locked --git https://github.com/pimalaya/sirup.git
Sirup CLI can be installed with Nix:
nix-env -i sirup
You can also use the git repository for a more up-to-date (but less stable) version:
nix-env -if https://github.com/pimalaya/sirup/archive/master.tar.gz
Or, from within the source tree checkout:
nix-env -if .
If you have the Flakes feature enabled:
nix profile install sirup
Or, from within the source tree checkout:
nix profile install
You can also run Sirup directly without installing it:
nix run sirup
The wizard is not yet available (it should come soon), meanwhile you can manually edit your own configuration from scratch:
- Copy the content of the documented
./config.sample.toml - Paste it into a new file
~/.config/sirup/config.toml - Edit, then comment or uncomment the options you want
$ sirup start
This command spawns a blocking daemon than connects to your IMAP server, performs the TLS negociations if necessary, authenticates yourself, then exposes this session via a Unix socket.
Any client that can connect to, read IMAP response from and write IMAP commands into Unix sockets can interact with your session.
The greeting is replaced by a * PREAUTH [CAPABILITY…] Sirup IMAP pre-auth session ready.
$ sirup repl
S: * PREAUTH [CAPABILITY…] Sirup IMAP pre-auth session ready
C: <Enter your IMAP raw command>
The REPL is just a simple client that connects to the Unix socket and allows you to send raw IMAP commands. It mostly stands for testing purpose, and as a demonstration on how to implement clients.
The simplest way is to use --debug and/or --trace arguments.
The advanced way is based on environment variables:
RUST_LOG=<level>: determines the log level filter, can be one ofoff,error,warn,info,debugandtrace.RUST_BACKTRACE=1: enables the full error backtrace, which include source lines where the error originated from.
Logs are written to the stderr, which means that you can redirect them easily to a file:
sirup start example --debug 2>/tmp/sirup.log
- Chat on Matrix
- News on Mastodon or RSS
- Mail at pimalaya.org@posteo.net
Special thanks to the NLnet foundation and the European Commission that have been financially supporting the project for years:
- 2022: NGI Assure
- 2023: NGI Zero Entrust
- 2024: NGI Zero Core (still ongoing in 2026)
If you appreciate the project, feel free to donate using one of the following providers:
