SIEVEC(1)

πŸ’– SIEVEC(1) πŸ’– β€” the manual page for sievec, aka Pigeonhole's Sieve script compiler

ok so hi bestie 🫢 you're reading the manual page for sievec, section 1, and it lives in the Dovecot family. Buckle up, it's actually so much less scary than it looks.


✨ NAME ✨

sievec β€” Pigeonhole's Sieve script compiler πŸ’…


🌸 SYNOPSIS 🌸

sievec [options] script-file [out-file]

πŸ¦‹ DESCRIPTION πŸ¦‹

The sievec command is part of Pigeonhole (pigeonhole(7)), which is the thing that adds Sieve (RFC 5228) and ManageSieve (RFC 5804) support to Dovecot (dovecot(1)). iconic behavior honestly.

Using the sievec command, Sieve scripts can be compiled into a binary representation. That resulting binary can be used directly to process e-mail messages during the delivery process. The delivery of mail messages β€” and, by means of the LDA Sieve plugin, also the execution of Sieve scripts β€” is performed by Dovecot's local delivery agent (LDA) called dovecot-lda(1). πŸŽ€

Usually, it is not necessary to compile the Sieve script manually using sievec, because dovecot-lda(1) will do this automatically if the binary is missing. However, in some cases dovecot-lda(1) does not have permission to write the compiled binary to disk, forcing it to recompile the script every single time it is executed. Using the sievec tool, this can be performed manually by an authorized user to increase performance. literally a glow-up for your mail server ✨

The Pigeonhole Sieve implementation recognizes files with a .sieve extension as Sieve scripts and corresponding files with a .svbin extension as the associated compiled binary. This means, for example, that Dovecot's LDA process will first look for a binary file "dovecot.svbin" when it needs to execute "dovecot.sieve". It will compile a new binary when it is missing or outdated. no cap πŸ‘‘

The sievec command is also useful to verify Sieve scripts before using. Additionally, with the -d option it can output a textual (and thus human-readable) dump of the generated Sieve code to the specified file. The output is then identical to what the sieve-dump(1) command produces for a stored binary file. This output is mainly useful to find bugs in the compiler that yield corrupt binaries. πŸ›πŸ”


πŸ’… OPTIONS πŸ’…

  • -c config-file β€” Alternative Dovecot configuration file path.
  • -d β€” Don't write the binary to out-file, but write a textual dump of the binary instead. In this context, the out-file value '-' has special meaning: it causes the textual dump to be written to stdout. The out-file argument may also be omitted, which has the same effect as '-'. The output is identical to what the sieve-dump(1) command produces for a compiled Sieve binary file.
heads up bestie πŸ’€ this option is not allowed when the out-file argument is a directory.
  • -D β€” Enable Sieve debugging. 🐞 main character energy, honestly.
  • -o setting=value β€” Overrides the configuration setting from /etc/dovecot/dovecot.conf and from the userdb with the given value. In order to override multiple settings, the -o option may be specified multiple times.
  • -u user/mask β€” Run the command only for the given user. It's also possible to use '*' and '?' wildcards (e.g. -u *@example.org).
  • -x auth_info β€” auth_info specifies additional conditions for the user command. The auth_info option string has to be given as name = value pair. For multiple conditions the -x option could be supplied multiple times.

Possible names for the auth_info are:

  • service β€” The service for which the userdb lookup should be tested. The value may be the name of a service, commonly used with Dovecot. For example: imap, pop3 or smtp.
  • session β€” Session identifier.
  • lip β€” The local IP address (server) for the test.
  • rip β€” The remote IP address (client) for the test.
  • lport β€” The local port, e.g. 143
  • rport β€” The remote port, e.g. 24567
  • real_lip β€” The local IP to which the client connected on this host.
  • real_rip β€” The remote IP where client connected from to this host.
  • real_lport β€” The local port to which client connected to to this host.
  • real_rport β€” The remote port from where the client connected from to this host.
  • forward_<field> β€” Field to forward as %{forward:field} to auth process.

πŸ”₯ ARGUMENTS πŸ”₯

  • script-file β€” Specifies the script to be compiled. If the script-file argument is a directory, all files in that directory with a .sieve extension are compiled into a corresponding .svbin binary file. The compilation is not halted upon errors; it attempts to compile as many scripts in the directory as possible.
not me warning you again πŸ™ˆ the -d option and the out-file argument are not allowed when the script-file argument is a directory.
  • out-file β€” Specifies where the (binary) output is to be written. This argument is optional. If this argument is omitted, a binary compiled from <scriptname>.sieve is saved as <scriptname>.svbin. If this argument is omitted and -b is specified, the binary dump is output to stdout.

πŸŽ€ EXIT STATUS πŸŽ€

sievec will exit with one of the following values:

  • 0 β€” Compile was successful. (EX_OK, EXIT_SUCCESS) πŸŽ‰ ate and left no crumbs.
  • 1 β€” Operation failed. This is returned for almost all failures. (EXIT_FAILURE)
  • 64 β€” Invalid parameter given. (EX_USAGE)
  • 67 β€” User does not exist.
  • 68 β€” Input file, address or other resource does not exist.
  • 73 β€” Cannot create output file.
  • 77 β€” Permission error.
  • 78 β€” Configuration error.
  • 127 β€” Unknown error. πŸ’€

πŸ“ FILES πŸ“

  • /etc/dovecot/dovecot.conf β€” Dovecot's main configuration file.
  • /etc/dovecot/conf.d/90-sieve.conf β€” Sieve interpreter settings (included from Dovecot's main configuration file)

πŸ› REPORTING BUGS πŸ›

Found a bug? Report bugs, including doveconf -n output, to the Dovecot Mailing List ⟨dovecot@dovecot.org⟩. Information about reporting bugs is available at: ⟨https://dovecot.org/bugreport.html⟩

don't be shy bestie, they wanna hear from you 🫢


🌈 SEE ALSO 🌈

dovecot(1), dovecot-lda(1), sieve-dump(1), sieve-filter(1), sieve-test(1), pigeonhole(7)


ok that's the whole page, you're officially a sievec girlie now πŸ’– this edition was version f00471c, dated August 2026 β€” and it was published by Dovecot, from the Dovecot manual set. slay, go compile something βœ¨πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from