Module 6 · Lesson 12 of 25

Sieve basics and Dovecot extensions

Part of Dovecot: IMAP/POP3 at Production Scale — Sieve Filtering & Server-Side Rules.

Sieve (RFC 5228) is a small declarative language for mail filtering. Dovecot's Pigeonhole interpreter supports the full standard plus useful extensions.

Example: file by sender + tag urgent:

require ["fileinto", "imap4flags"];

if header :contains "from" "alerts@stripe.com" {
  fileinto "INBOX/Finance";
  setflag "\\Flagged";
  stop;
}

if header :contains "subject" "[URGENT]" {
  setflag "\\Flagged";
}

if address :is "to" "newsletter@example.com" {
  fileinto "INBOX/Newsletters";
}

Useful Dovecot Sieve extensions:

Extension Purpose
fileinto Move to specific folder
imap4flags Set/unset flags
vacation Auto-responder
mailbox Auto-create destination folders
spamtest / spamtestplus Read Rspamd score
editheader Add/remove headers
extprograms Pipe to external scripts

Sign in to keep track of what you have read.

Pulse · self-hosted sending

Own the infrastructure your pipeline depends on.

One install script on your own server. Pulse sets up the MTA, mailboxes, certificates and dashboard; you add domains and start sending.

# on a fresh Ubuntu server
$ cd pulse && sudo ./install.sh
→ docker compose up · kumomta · stalwart · caddy
→ dashboard ready on https://pulse.yourdomain.com
$

Also from us:Beat — monitoring that tells you the fixConsulting — $65/hr, no retainer