File: INSTALL

package info (click to toggle)
dovecot 1%3A1.2.15-7%2Bdeb6u1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze-lts
  • size: 30,340 kB
  • ctags: 20,012
  • sloc: ansic: 191,443; sh: 21,091; makefile: 3,330; cpp: 526; perl: 108; xml: 44
file content (201 lines) | stat: -rw-r--r-- 8,199 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
For the most up-to-date information you are referred to the Dovecot wiki:

http://wiki.dovecot.org/ManageSieve

Compile
-------

Prerequisites:

  * A patched and compiled dovecot-1.2 tree:

    To enable support for the new managesieve service, Dovecot needs to be
    patched. The patch is available from the same source as this package.

    Package and patch are named as follows:

      Patch: dovecot-1.2.X-managesieve-<managesieve version>.diff.gz
      Package: dovecot-1.2-managesieve-<managesieve version>.tar.gz

    Nothing special needs to be done to compile the patched tree. You can use:

      ./configure
      make
      sudo make install

    as usual.

    Note that this package will compile against an unpatched dovecot tree, but
    keep in mind that dovecot will not know about managesieve without the patch.

  * A compiled dovecot-1.2-sieve tree

    Currently, no special version dependencies are known to compile against the
    sieve plugin, but of course the most recent version is recommended.

    NOTE: dovecot-sieve-1.1 can still be used if you do not want to use the new
    Sieve implementation.

If you downloaded this package using Mercurial, you have a script called
autogen.sh in your source tree. You should execute that first:

./autogen.sh

After this executed successfully or when you downloaded the tarball,
configure needs to be executed with the following parameters:

  --with-dovecot=<path>
    Path to the patched and compiled dovecot-1.w source tree
  --with-dovecot-sieve=<path>
    Path to the compiled dovecot-1.2-sieve or dovecot-sieve-1.1 source tree

For example:

./configure --with-dovecot=../dovecot-1.2 \
  --with-dovecot-sieve=../dovecot-1.2-sieve

As usual, to compile and install, execute the following:

make
sudo make install

Configuration
-------------

IMPORTANT:
    If you have used the Sieve plugin before and you have .dovecot.sieve files
    in user directories, you are advised to make a backup first. Although the
    ManageSieve daemon takes care to move these files to the Sieve directory
    before it is substituted with a symbolic link, this is not a very well
    tested operation, meaning that there is a possibility that existing Sieve
    scripts get lost.

Along with all other binaries that Dovecot uses, the managesieve and
managesieve-login binaries are installed during make install. The only thing you
need to do to activate the ManageSieve support in Dovecot is to add managesieve
to the protocols= configuration line in your dovecot.conf.

The ManageSieve daemon will listen on all interfaces at port 2000 by default.
Because the implementation of the ManageSieve daemon is largely based on the
original IMAP implementation, it is very similar in terms of configuration.
The following settings can be configured in the 'protocol managesieve' section:

listen = *:2000
  Interface and port on which the daemon listens for incoming connections.

login_executable = /usr/libexec/dovecot/managesieve-login
  Login executable location.

mail_executable = /usr/libexec/dovecot/managesieve
  The managesieve executable location. For examples how this could be applied,
  refer to the explanation of the mail_executable setting for IMAP.

managesieve_max_line_length = 65536
  The maximum managesieve command line length in bytes. This setting is
  directly borrowed from IMAP. But, since long command lines are very unlikely
  with ManageSieve, changing this will not be very useful.

managesieve_logout_format = bytes=%i/%o
  Specifies the string pattern used to compose the logout message of an
  authenticated session. The following substitutions are available:
    %i - total number of bytes read from client
    %o - total number of bytes sent to client

managesieve_implementation_string = dovecot
  To fool ManageSieve clients that are focused on CMU's timesieved you can
  specify the IMPLEMENTATION capability that the Dovecot reports to clients
  (e.g. 'Cyrus timsieved v2.2.13').

Additionally, the ManageSieve service uses the following settings from the
plugin section of the config file. These settings are the ones used by the Sieve
plugin.

sieve_dir =
  This specifies the path to the directory where the uploaded scripts are
  stored. Scripts are stored as separate files with extension '.sieve'. All
  other files are ignored when scripts are listed by a ManageSieve client. If
  this setting remains unspecified, the mail_location setting is used as
  explained above. The now deprecated sieve_storage setting is still accepted.

sieve = ~/.dovecot.sieve
  Specifies the location of the symbolic link pointing to the active script in
  the Sieve storage directory. If a regular file exists at this location, it is
  moved to the sieve_dir location before the symbolic link is installed. It is
  renamed to dovecot.orig.sieve and therefore listed as dovecot.orig by a
  ManageSieve client.

Scripts are stored in a special directory at the location specified by the
sieve_dir setting. The active Sieve script is managed as a symbolic link
pointing to the active script in the script directory. The location of this
symlink is specified with the 'sieve' setting. The default location is
~/.dovecot.sieve. Note that if a file starting with '.' is placed inside a
Maildir, it will be recognized as a folder, so try to avoid that.

If no 'sieve_dir' is specified, the ManageSieve daemon expects the script
directory to reside in the mail folder as specified by the 'mail_location'
setting. More precisely, it is placed in the CONTROL= directory of
'mail_location' if specified, otherwise the script directory is placed in the
root of the mail location. In such a mail or mail control directory, scripts are
always stored in a sub-directory called 'sieve'. Using this implicit manner to
specify the Sieve script directory is depricated. Also note that for some mail
storage types (e.g. mbox) the 'sieve' sub-directory is listed as a mail folder,
so be sure to put the Sieve scripts somewhere else if you can.

A storage location specified by 'sieve_dir' is always generated automatically
if it does not exist (as far as the system permits the user to do so; no root
privileges are used). This is similar to the behaviour of the mail daemons. Note
that when 'mail_location' is used to specify the script storage location, only
the 'sieve' subdirectory is generated automatically.

The following provides an example configuration for ManageSieve in dovecot.conf.
Only sections relevant to ManageSieve are shown. Refer to dovecot-example.conf
in your patched Dovecot tree for a full example with comments, but don't forget
to add managesieve to the 'protocols = ...' setting if you use it.

# Start imap, pop3 and managesieve services
protocols = imap pop3 managesieve

protocol managesieve {
  # Specify an alternative address:port the daemon must listen on
  # (default: *:2000)
  #listen = localhost:2000
}

plugin {
  sieve=~/.dovecot.sieve
  sieve_dir=~/sieve
}

Quota Support
-------------

By default, users can manage an unlimited number of Sieve scripts on the server
through ManageSieve. However, ManageSieve can be configured to enforce limits on
the number of personal Sieve scripts per user and/or the amount of disk storage
used by these scripts. The maximum size of individual uploaded scripts is
dictated by the configuration of the Sieve plugin. The limits are configured in
the plugin section of the Dovecot configuration as follows:

sieve_max_script_size = 1M
  The maximum size of a Sieve script.

sieve_quota_max_scripts = 0
  The maximum number of personal Sieve scripts a single user can have.

sieve_quota_max_storage = 0
  The maximum amount of disk storage a single user's scripts may occupy.

A value of 0 for these settings means that no limit is enforced.

Proxying
--------

Like Dovecot's imapd, the ManageSieve login daemon supports proxying to multiple
backend servers. Although the underlying code is copied from the imapd sources
for the most part, it has some ManageSieve-specifics that have not seen much
testing.

The proxy configuration wiki page for POP3 and IMAP should apply to ManageSieve
as well:

http://wiki.dovecot.org/PasswordDatabase/ExtraFields/Proxy