📄️ Overview
Sieve is a scripting language used to filter and modify email messages. It provides a flexible and powerful way to manage email messages by automatically filtering, sorting, and transforming them based on a wide range of criteria. Rather than relying on a proprietary DSL, Stalwart Mail Server uses Sieve as its default scripting language primarily because it is sufficiently powerful to handle most filtering tasks and is an established internet standard.
🗃️ Settings
3 items
📄️ Variables
Sieve scripts have access to a number of variables that can be used to obtain information about the current SMTP session, the message being processed and the environment in which the script is executed.
📄️ Expressions
The expression extension introduces the ability to evaluate arithmetical and logical operations within Sieve scripts. This is particularly useful for performing calculations on variables or determining the flow based on specific logical conditions.
📄️ LLM Integration
Stalwart extends the functionality of the Sieve scripting language by introducing the llm_prompt function, enabling seamless integration of AI-powered analysis into email processing rules. This new function allows administrators and users to access any of the LLM AI models configured in Stalwart directly from a Sieve script.
📄️ ManageSieve
ManageSieve is a protocol designed for remotely managing Sieve scripts on a mail server. Sieve scripts are used to filter and sort incoming emails based on custom rules set by the user or the administrator. The ManageSieve protocol enables users to upload, download, edit, and delete their Sieve scripts from a remote location, typically through a supported email client or a dedicated web interface.
📄️ Reference
This section contains the reference documentation for the functions available from Sieve expressions in the trusted interpreter. Currently not all functions are documented, but the list will be expanded over time.
📄️ Examples
This section contains a collection of example Sieve scripts that can be used as a starting point for your own scripts.