install-sieve.html   [plain text]

<!-- $Id: install-sieve.html,v 1.5 2005/03/05 00:36:23 dasenbro Exp $ -->
<TITLE>Installing Sieve
<h1>Installing Sieve

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

<p>A <a href="">brief introduction</a> to
Sieve at is available from <a href="">Cyrusoft

<h3>Configure outgoing mail</h3>

<p>Some Sieve actions (redirect, vacation) can send outgoing mail.</p>

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

   sendmail: /usr/sbin/sendmail

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

<h3>Managing Sieve Scripts</h3>

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

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

<h3>Testing the sieve server</h3>

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

<li>From your normal account, telnet to the sieve port on the
server you're setting up:

<kbd>   telnet foobar sieve

If your server is running, you'll get a message similar to the following one:

   Connected to
   Escape character is '^]'.
   "IMPLEMENTATION" "Cyrus timsieved v1.1.0"
   "SIEVE" "fileinto reject envelope vacation imapflags notify subaddress regex"

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
"<tt>imapd</tt>" earlier. Next terminate the connection, by typing

<li>Next test authenticating to the sieve server. To do this run the
"<tt>sieveshell</tt>" 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.

  "<kbd>sieveshell foobar</kbd>"
    Please enter your password: ******
    > quit

This should produce the message "<tt>Authentication failed</tt>" with
a description of the failure if there was a problem.

<p><li>Next you should attempt to place a sieve script on the
server. To do this create a file named "<tt>myscript.script</tt>" with
the following lines. Replace "<tt></tt>" 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" ""
    reject "testing";

To place this script on the server run the following command:

  "<kbd>sieveshell foobar</kbd>"
    Please enter your password: ******
    > put myscript.script
    > activate myscript
    > quit

This should place your script on the server and make it the active script.

<li>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: 2005/03/05 00:36:23 $