This documentation is for Dovecot v2.x, see wiki1 for v1.x documentation.

Pigeonhole Sieve Usage

Mailbox Names

Regarding separators, you need to specify mailbox names in Sieve scripts the same way as IMAP clients see them. For example if you want to deliver mail to the "Customers" mailbox which exists under "Work" mailbox:

require "fileinto";
fileinto "Work.Customers";

require "fileinto";
fileinto "INBOX.Work.Customers";

require "fileinto";
fileinto "Work/Customers";

However, Sieve uses UTF8 encoding for mailbox names, while IMAP uses modified UTF7. This means that non-ASCII characters contained in mailbox names are represented differently between IMAP and Sieve scripts.

Vacation auto-reply

Vacation uses envelope sender and envelope recipient. They're taken from:

The vacation replies are sent to the envelope sender.

List of autoreplied senders is stored in .dovecot.lda-dupes file in user's home directory. When you're testing the vacation feature, it's easy to forget that the reply is sent only once in the number of configured days. If you've problems getting the vacation reply, try deleting this file. If that didn't help, make sure the problem isn't related to sending mails in general by trying the "reject" Sieve command.

The automatic replies aren't sent if any of the following is true:

Manually Compiling Sieve Scripts

When the Sieve plugin executes a script for the first time (or after it has been changed), it is compiled and stored in binary form (byte code) to avoid compiling the script again for each subsequent mail delivery. The Pigeonhole Sieve implementation uses the .svbin extension to store compiled Sieve scripts (e.g. .dovecot.svbin). To store the binary, the plugin needs write access in the directory in which the script is located.

A problem occurs when a global script is encountered by the plugin. For security reasons, global script directories are not supposed to be writable by the user. Therefore, the plugin cannot store the binary when the script is first compiled. Note that this doesn't mean that the old compiled version of the script is used when the binary cannot be written: it compiles and uses the current script version. The only real problem is that the plugin will not be able to update the binary on disk, meaning that the global script needs to be recompiled each time it needs to be executed, i.e. for every incoming message, which is inefficient.

To mitigate this problem, the administrator must manually pre-compile global scripts using the sievec command line tool. For example:

sievec /var/lib/dovecot/sieve/global/

This is necessary for scripts listed in the sieve_global_path, sieve_before and sieve_after settings. For global scripts that are only included in other scripts using the Sieve include extension, this step is not necessary, since included scripts are incorporated into the binary produced for the main script.

Compile and Runtime Logging

Log messages produced during script compilation or during script execution are written to two locations by the LDA Sieve plugin:

Pigeonhole/Sieve/Usage (last edited 2012-03-06 12:27:32 by klara)