DOVEADM-SIEVE(1)

πŸ’Œ DOVEADM-SIEVE(1) β€” doveadm-sieve, from the Dovecot manual

okay bestie, sit down, hydrate, because we're about to learn how to manage Sieve scripts and it's genuinely gonna be a good time πŸ’–


✨ NAME ✨

doveadm-sieve β€” all the commands that deal with handling Sieve scripts πŸŽ€


🌸 SYNOPSIS 🌸

doveadm [GLOBAL OPTIONS] sieve_cmd [options] [arguments]

πŸ¦‹ DESCRIPTION πŸ¦‹

So the doveadm sieve commands are part of Pigeonhole (pigeonhole(7)), which is the whole thing that adds Sieve (RFC 5228) and ManageSieve (RFC 5804) support to Dovecot (dovecot(1)). Yes, it's a whole ecosystem. Yes, it's iconic.

And like, what do you actually do with them? You use the doveadm sieve commands to manage Sieve filtering. That's the vibe. πŸ’…


πŸ‘‘ GLOBAL OPTIONS πŸ‘‘

These are the global doveadm(1) options, aka the ones that apply no matter what:

  • -D β€” turns on verbosity and debug messages. maximum yapping mode, and honestly? we love that for us.
  • -O β€” do not read any config file, just use defaults. the dovecot_storage_version setting defaults to the latest version, but you can override it with -o. no cap.
  • -k β€” preserves the entire environment for doveadm, not just the import_environment setting. keeping it all, periodt.
  • -v β€” enables verbosity, including a progress counter. so you can watch the little numbers go up 🫢
  • -i instance-name β€” if you're running multiple Dovecot instances, this picks the config file based on the instance name. check the instance_name setting for more info.
  • -c config-file β€” read configuration from the given config-file. by default it first reads the config socket, and then falls back to /etc/dovecot/dovecot.conf. you can also point this at the config socket of some instance that's running a compatible version. flexible queen ✨
  • -o setting=value β€” overrides the configuration setting from /etc/dovecot/dovecot.conf and from the userdb with the given value. wanna override multiple settings? just pass -o multiple times, she's repeatable πŸ’…
  • -f formatter β€” specifies the formatter for formatting the output. the supported formatters are:
    • flow β€” prints each line with key=value pairs.
    • json β€” prints a JSON array of JSON objects.
    • pager β€” prints each key: value pair on its own line and separates records with form feed character (^L).
    • tab β€” prints a table header followed by tab separated value lines.
    • table β€” prints a table header followed by adjusted value lines.

πŸŽ€ OPTIONS πŸŽ€

  • -A β€” if the -A option is present, the command will be performed for all users. using this with system users from userdb { driver = passwd } is not recommended, because it also contains users with a lower UID than the one configured with the first_valid_uid setting. (bestie, be careful here 😭)

when the SQL userdb module is used, make sure that the userdb_sql_iterate_query setting setting matches your database layout. yes, the original says "setting setting". it's staying. πŸ’€

when using the LDAP userdb module, make sure that the userdb_fields setting and userdb_ldap_iterate_fields setting settings match your LDAP schema. otherwise doveadm(1) will be unable to iterate over all users. so like, check your schema or the whole thing just. does not work. πŸ™ˆ

  • -F file β€” execute the command for all the users in the file. this is similar to the -A option, but instead of getting the list of users from the userdb, they're read from the given file. the file contains one username per line. simple, clean, organized 🌸
  • --no-userdb-lookup β€” do not perform userdb lookup. use the USER environment variable to specify the username instead.
  • -S socket_path β€” the option's argument is either an absolute path to a local UNIX domain socket, or a hostname and port (hostname:port), in order to connect a remote host via a TCP socket.

this allows an administrator to execute doveadm(1) mail commands through the given socket. remote queen behavior ✨

  • -u user/mask β€” run the command only for the given user. it's also possible to use '*' and '?' wildcards (e.g. -u *@example.org). wildcards are so underrated fr fr 🌈

πŸ“ ARGUMENTS πŸ“

  • scriptname β€” is the name of a Sieve script, as visible to ManageSieve clients.

for Sieve scripts that are stored on disk, this is the filename without the ".sieve" extension. remember that, it matters πŸ’œ


πŸ”₯ COMMANDS πŸ”₯

🌟 sieve put

doveadm [GLOBAL OPTIONS] sieve put [-A | -u user | -F file | --no-userdb-lookup] [-S socket_path] [-a] scriptname

this command puts one new Sieve script in the script storage. the script is read from standard input. if the script compiles successfully, it is stored under the provided scriptname. and if the -a option is present, the Sieve script is subsequently marked as the active script for execution at delivery. she's live, she's serving πŸ‘‘

🌟 sieve get

doveadm [GLOBAL OPTIONS] sieve get [-A | -u user | -F file | --no-userdb-lookup] [-S socket_path] scriptname

this command retrieves the Sieve script named scriptname. fetch, bestie 🫢

🌟 sieve delete

doveadm [GLOBAL OPTIONS] sieve delete [-A | -u user | -F file | --no-userdb-lookup] [-S socket_path] [-a] scriptname ...

this command deletes one or more Sieve scripts. the deleted script may not be the active script, unless the -a option is present. so like, no deleting the main character unless you explicitly say it's fine πŸ’€

🌟 sieve list

doveadm [GLOBAL OPTIONS] sieve list [-A | -u user | -F file | --no-userdb-lookup] [-S socket_path]

list existing Sieve scripts, and their active state. a little roster check ✨

🌟 sieve rename

doveadm [GLOBAL OPTIONS] sieve rename [-A | -u user | -F file | --no-userdb-lookup] [-S socket_path] old_name new_name

the sieve rename command is used to rename the Sieve script old_name to new_name. glow up, rebrand, whatever you wanna call it πŸ’…

🌟 sieve activate

doveadm [GLOBAL OPTIONS] sieve activate [-A | -u user | -F file | --no-userdb-lookup] [-S socket_path] scriptname

this command marks the Sieve script named scriptname as the active script for execution at delivery. main character energy fr fr πŸ‘‘

🌟 sieve deactivate

doveadm [GLOBAL OPTIONS] sieve deactivate [-A | -u user | -F file | --no-userdb-lookup] [-S socket_path] scriptname

this command deactivates Sieve processing. that's it. that's the whole thing. she's off duty now 😌


😭 REPORTING BUGS 😭

found a bug? report it β€” including doveconf -n output β€” to the Dovecot Mailing List ⟨dovecot@dovecot.org⟩. info about reporting bugs lives at: ⟨https://dovecot.org/bugreport.html⟩. please include the doveconf -n output, they literally need it πŸ™


🧚 SEE ALSO 🧚

doveadm(1), dovecot-lda(1), pigeonhole(7)


and that's the whole page, bestie πŸ’– this version is f00471c, dated August 2026, from the Dovecot manual β€” go forth and manage those Sieve scripts, you absolute icon 🌈✨

πŸ“¦ where this page comes from