Installing Sieve

Installing Sieve

This section assumes that you compiled Cyrus with sieve support. If you specified --disable-sieve when running ./configure, you did NOT compile the server with sieve support.

A brief introduction to Sieve at is available from Cyrusoft International.

Configure outgoing mail

Some Sieve actions (redirect, vacation) can send outgoing mail.

You'll need to make sure that "lmtpd" can send outgoing messages. Currently, it invokes "/usr/lib/sendmail" by default to send messages. Change this by adding a line like:

   sendmail: /usr/sbin/sendmail
in your "/etc/imapd.conf". If you're using Postfix or another MTA, make sure that the sendmail referenced in "/etc/imapd.conf" is Sendmail-compatible.

Managing Sieve Scripts

Since Cyrus is based around the concept of a sealed-server, the normal way for users to manipulate Sieve scripts is through the "sieveshell" utility.

If, for some reason, you do have user home directories on the server, you can use the "sieveusehomedir" option and have the sieve script stored in the home directory of the user as "~/.sieve".

Testing the sieve server

  1. The Sieve server, "timsieved", is used for transporting user Sieve scripts to the sealed IMAP server. It is incompatible with the "sieveusehomedir" option. It is named after the principal author, Tim Martin, who desperately wanted something named after him in the Cyrus distribution.

  2. From your normal account, telnet to the sieve port on the server you're setting up:
       telnet foobar sieve
    
    If your server is running, you'll get a message similar to the following one:
       Trying 128.2.10.192...
       Connected to foobar.andrew.cmu.edu.
       Escape character is '^]'.
       "IMPLEMENTATION" "Cyrus timsieved v1.1.0"
       "SASL" "ANONYMOUS PLAIN KERBEROS_V4 GSSAPI"
       "SIEVE" "fileinto reject envelope vacation imapflags notify subaddress regex"
       OK
    

    Any message other than one similar to the one above means there is a problem. Make sure all of authentication methods you wish to support are listed. This list should be identical to the one listed by "imapd" earlier. Next terminate the connection, by typing "logout".

  3. Next test authenticating to the sieve server. To do this run the "sieveshell" utility. You must specify the server. If you run this utility from a different machine without the "sieve" entry in "/etc/services", port 2000 will be used.
      "sieveshell foobar"
        Please enter your password: ******
        > quit
    
    This should produce the message "Authentication failed" with a description of the failure if there was a problem.

  4. Next you should attempt to place a sieve script on the server. To do this create a file named "myscript.script" with the following lines. Replace "foo@example.org" with an email address you can send mail from, but that is not the one you are working on now.
      require ["reject","fileinto"];
    
      if address :is :all "From" "foo@example.org"
      {
        reject "testing";
      }
    
    To place this script on the server run the following command:
      "sieveshell foobar"
        Please enter your password: ******
        > put myscript.script
        > activate myscript
        > quit
    
    This should place your script on the server and make it the active script.

  5. Test that the sieve script is actually run from deliver. Send a message to the address you're working on from the address mentioned in the sieve script. The message should be rejected.


last modified: $Date: 2001/10/23 18:14:48 $