Email filtering (Sieve)
Sieve is a language for filtering email on the server. Its rules run on the mail server before mail reaches your email app, so they work even when your device is offline.
Most people should use inbox rules in the dashboard, API, or MCP. Use Sieve when you want to write the filter script yourself.
Last updated
Which automation to use
- Out of office for vacation and out-of-office replies.
- Inbox rules for sorting, marking, and starring by fixed conditions, through the dashboard, API, or MCP.
- AI assistant automations for AI workflows you create in the AI assistant or the Automations tab.
- Sieve for server-side filter scripts you write yourself.
ManageSieve connection
Use a ManageSieve client to upload and manage filter scripts.
| Server | mx1.shipmail.to |
| Port | 4190 |
| Security | SSL/TLS |
| Username | Your full email address |
ManageSieve clients
- Thunderbird. Install the Sieve Message Filter add-on. It connects to ManageSieve with your account settings.
- Roundcube. The ManageSieve plugin is included. Go to Settings > Filters.
- sieve-connect (CLI). Install it with your package manager on Linux or macOS.
Example filters
Move newsletters to a folder
require ["fileinto"];
if header :contains "List-Unsubscribe" "" {
fileinto "Newsletters";
}Vacation reply
require ["vacation"];
vacation :days 7
:subject "Out of office"
"I am currently out of the office.
I will reply when I return.";Discard email from a specific sender
if address :is "from" "spam@example.com" {
discard;
}Sort subaddressed email into folders
require ["fileinto", "envelope", "subaddress"];
if envelope :detail "to" "github" {
fileinto "GitHub";
}
if envelope :detail "to" "newsletters" {
fileinto "Newsletters";
}Supported extensions
Shipmail supports these Sieve extensions: fileinto, reject, vacation, envelope, subaddress, body, regex, copy, imap4flags, variables, include, and editheader. The ManageSieve server lists every capability it supports when you connect.