~ubuntu-branches/ubuntu/trusty/dovecot/trusty-updates

« back to all changes in this revision

Viewing changes to pigeonhole/INSTALL

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-01-08 09:35:49 UTC
  • mfrom: (1.15.3) (96.1.1 trusty-proposed)
  • Revision ID: package-import@ubuntu.com-20140108093549-814nkqdcxfbvgktg
Tags: 1:2.2.9-1ubuntu1
* Merge from Debian unstable, remaining changes:
  + Add mail-stack-delivery package:
    - Update d/rules
    - d/control: convert existing dovecot-postfix package to a dummy
      package and add new mail-stack-delivery package.
    - Update maintainer scripts.
    - Rename d/dovecot-postfix.* to debian/mail-stack-delivery.*
    - d/mail-stack-delivery.preinst: Move previously installed backups and
      config files to a new package namespace.
    - d/mail-stack-delivery.prerm: Added to handle downgrades.
  + Use Snakeoil SSL certificates by default:
    - d/control: Depend on ssl-cert.
    - d/dovecot-core.postinst: Relax grep for SSL_* a bit.
  + Add autopkgtest to debian/tests/*.
  + Add ufw integration:
    - d/dovecot-core.ufw.profile: new ufw profile.
    - d/rules: install profile in dovecot-core.
    - d/control: dovecot-core - suggest ufw.
  + d/dovecot-core.dirs: Added usr/share/doc/dovecot-core
  + Add apport hook:
    - d/rules, d/source_dovecot.py
  + Add upstart job:
    - d/rules, d/dovecot-core.dovecot.upstart, d/control,
      d/dovecot-core.dirs, dovecot-imapd.{postrm, postinst, prerm},
      d/dovecot-pop3d.{postinst, postrm, prerm}.
      d/mail-stack-deliver.postinst: Convert init script to upstart.
  + Use the autotools-dev dh addon to update config.guess/config.sub for
    arm64.
* Dropped changes, included in Debian:
  - Update Dovecot name to reflect distribution in login greeting.
  - Update Drac plugin for >= 2.0.0 support.
* d/control: Drop dovecot-postfix package as its no longer required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
Compiling
2
2
=========
3
3
 
4
 
If you downloaded the sources using Mercurial, you will need to execute 
 
4
If you downloaded the sources using Mercurial, you will need to execute
5
5
./autogen.sh first to build the automake structure in your source tree. This
6
6
process requires autotools and libtool to be installed.
7
7
 
12
12
make
13
13
sudo make install
14
14
 
15
 
If your system uses a $prefix different than the default /usr/local, the 
 
15
If your system uses a $prefix different than the default /usr/local, the
16
16
configure script can still find the installed dovecot-config automatically when
17
17
supplied with the proper --prefix argument:
18
18
 
44
44
 --with-unfinished-features=no
45
45
   Controls whether unfinished features and extensions are built. Enabling this
46
46
   will enable the compilation of code that is considered unfinished and highly
47
 
   experimental and may therefore introduce bugs and unexpected behavior. 
 
47
   experimental and may therefore introduce bugs and unexpected behavior.
48
48
   In fact, it may not compile at all. Enable this only when you are eager to
49
49
   test some of the new development functionality.
50
50
 
57
57
    facilitates the actual Sieve filtering upon delivery.
58
58
 
59
59
  - The ManageSieve Service: This implements the ManageSieve protocol through
60
 
    which users can remotely manage Sieve scripts on the server. 
 
60
    which users can remotely manage Sieve scripts on the server.
61
61
 
62
 
The functionality of these items is described in more detail in the README file. 
 
62
The functionality of these items is described in more detail in the README file.
63
63
In this file and in this section their configuration is described. Example
64
64
configuration files are provided in the doc/example-config directory of this
65
 
package. 
 
65
package.
66
66
 
67
67
Sieve Interpreter - Basic Configuration
68
68
---------------------------------------
85
85
plugin section of the config file (default values are shown if applicable):
86
86
 
87
87
 sieve = ~/.dovecot.sieve
88
 
   The location of the user's main active script. 
89
 
 
90
 
 sieve_default = 
 
88
   The location of the user's main active script.
 
89
 
 
90
 sieve_default =
91
91
   The location of the default personal sieve script file, which gets executed
92
92
   ONLY if user's private Sieve script does no exist, e.g.
93
93
   /var/lib/dovecot/default.sieve. This is usually a global script, so be sure
96
96
   `sieve_global_path', but that name is now deprecated.
97
97
 
98
98
 sieve_global_dir =
99
 
   Location for :global include scripts for the Sieve include extension. 
 
99
   Location for :global include scripts for the Sieve include extension.
100
100
 
101
101
 sieve_dir = ~/sieve
102
 
   Location for :personal include scripts for the Sieve include extension. 
 
102
   Location for :personal include scripts for the Sieve include extension.
103
103
 
104
104
 sieve_extensions =
105
 
   Which Sieve language extensions are available to users. By default, all 
106
 
   supported extensions are available, except for deprecated extensions or those 
107
 
   that are still under development. Some system administrators may want to 
108
 
   disable certain Sieve extensions or enable those that are not available by 
 
105
   Which Sieve language extensions are available to users. By default, all
 
106
   supported extensions are available, except for deprecated extensions or those
 
107
   that are still under development. Some system administrators may want to
 
108
   disable certain Sieve extensions or enable those that are not available by
109
109
   default. This setting can use '+' and '-' to specify differences relative to
110
110
   the default. For example `sieve_extensions = +imapflags' will enable the
111
111
   deprecated imapflags extension in addition to all extensions were already
112
 
   enabled by default. 
 
112
   enabled by default.
113
113
 
114
114
 sieve_global_extensions =
115
115
   Which Sieve language extensions are ONLY avalable in global scripts. This can
117
117
   control, for instance when these extensions can cause security concerns. This
118
118
   setting has higher precedence than the `sieve_extensions' setting (above),
119
119
   meaning that the extensions enabled with this setting are never available to
120
 
   the user's personal script no matter what is specified for the 
 
120
   the user's personal script no matter what is specified for the
121
121
   `sieve_extensions' setting. The syntax of this setting is similar to
122
122
   the `sieve_extensions' setting, with the difference that extensions are
123
123
   enabled or disabled for exclusive use in global scripts. Currently, no
127
127
   The Pigeonhole Sieve interpreter can have plugins of its own. Using this
128
128
   setting, the used plugins can be specified. Check the Dovecot wiki
129
129
   (wiki2.dovecot.org) or the pigeonhole website (http://pigeonhole.dovecot.org)
130
 
   for available plugins. 
 
130
   for available plugins. The sieve_extprograms plugin is included in this
 
131
   release.
131
132
 
132
133
 sieve_user_log =
133
134
   The path to the file where the user log file is written. If not configured, a
134
135
   default location is used. If the main user's personal Sieve (as configured
135
136
   with sieve=) is a file, the logfile is set to <filename>.log by default. If
136
 
   it is not a file, the default user log file is ~/.dovecot.sieve.log. 
 
137
   it is not a file, the default user log file is ~/.dovecot.sieve.log.
137
138
 
138
139
 recipient_delimiter = +
139
 
   The separator that is expected between the :user and :detail address parts 
 
140
   The separator that is expected between the :user and :detail address parts
140
141
   introduced by the subaddress extension. This may also be a sequence of
141
142
   characters (e.g. '--'). The current implementation looks for the separator
142
143
   from the left of the localpart and uses the first one encountered. The :user
150
151
  # The location of the user's active script:
151
152
  sieve = ~/.dovecot.sieve
152
153
 
153
 
  # If the user has no personal active script (i.e. if the file 
 
154
  # If the user has no personal active script (i.e. if the file
154
155
  # indicated in sieve= does not exist), use this one:
155
156
  sieve_default = /var/lib/dovecot/sieve/default.sieve
156
157
 
157
 
  # The include extension fetches the :personal scripts from this 
158
 
  # directory. When ManageSieve is used, this is also where scripts 
 
158
  # The include extension fetches the :personal scripts from this
 
159
  # directory. When ManageSieve is used, this is also where scripts
159
160
  # are uploaded.
160
161
  sieve_dir = ~/sieve
161
162
 
162
 
  # The include extension fetches the :global scripts from this 
 
163
  # The include extension fetches the :global scripts from this
163
164
  # directory.
164
165
  sieve_global_dir = /var/lib/dovecot/sieve/global/
165
166
}
197
198
            or a directory containing script files with names structured as
198
199
            `<script-name>.sieve'.
199
200
        dict    - Dovecot dict lookup. The location path is a dict uri. Read
200
 
            doc/scipt-location-dict.txt for more information and examples. 
 
201
            doc/scipt-location-dict.txt for more information and examples.
201
202
 
202
203
If the type prefix is omitted, the script location type is 'file'.
203
204
 
219
220
    directory as where the script file was found if possible. For `dict' type
220
221
    locations, the binary is not stored at all in that case. Don't specify the
221
222
    same directory for different script locations, as this will result in
222
 
    undefined behavior. 
223
 
        
 
223
    undefined behavior.
 
224
 
224
225
Sieve Interpreter - Per-user Sieve Script Location
225
226
--------------------------------------------------
226
227
 
228
229
file in the user's home directory (~/.dovecot.sieve). This requires that the
229
230
home directory is set for the user.
230
231
 
231
 
If you want to store the script elsewhere, you can override the default using 
 
232
If you want to store the script elsewhere, you can override the default using
232
233
the sieve= setting, which specifies the location of the user's script file. This
233
234
can be done in two ways:
234
235
 
235
236
 1. Define the sieve setting in the plugin section of dovecot.conf.
236
 
 2. Return sieve extra field from userdb extra fields. 
 
237
 2. Return sieve extra field from userdb extra fields.
237
238
 
238
 
For example, to use a Sieve script file named <username>.sieve in 
 
239
For example, to use a Sieve script file named <username>.sieve in
239
240
/var/sieve-scripts, use:
240
241
 
241
242
plugin {
244
245
 sieve = /var/sieve-scripts/%u.sieve
245
246
}
246
247
 
247
 
You may use templates like %u, as shown in the example. Refer to 
 
248
You may use templates like %u, as shown in the example. Refer to
248
249
http://wiki.dovecot.org/Variables for more information.
249
250
 
250
 
A relative path (or just a filename) will be interpreted to point under the 
 
251
A relative path (or just a filename) will be interpreted to point under the
251
252
user's home directory.
252
253
 
253
254
Sieve Interpreter - Executing Multiple Scripts Sequentially
254
255
-----------------------------------------------------------
255
256
 
256
 
Pigeonhole's Sieve interpreter allows executing multiple Sieve scripts 
 
257
Pigeonhole's Sieve interpreter allows executing multiple Sieve scripts
257
258
sequentially. The extra scripts can be executed before and after the user's
258
259
private script. For example, this allows executing global Sieve policies before
259
260
the user's script. The following settings in the plugin section of the Dovecot
267
268
   directory, all the Sieve scripts contained therein (with the proper .sieve
268
269
   extension) are executed. The order of execution within that directory is
269
270
   determined by the file names, using a normal 8bit per-character comparison.
270
 
   
 
271
 
271
272
   Multiple script file or directory paths can be specified by appending an
272
273
   increasing number. The Sieve scripts found from these paths are added to the
273
274
   script execution sequence in the specified order. Reading the numbered
278
279
 sieve_after2 =
279
280
 sieve_after3 = (etc..)
280
281
   Identical to sieve_before, but the specified scripts are executed after the
281
 
   user's script (only when keep is still in effect, as explained below). 
 
282
   user's script (only when keep is still in effect, as explained below).
282
283
 
283
284
The script execution ends when the currently executing script in the sequence
284
 
does not yield a "keep" result: when the script terminates, the next script is 
 
285
does not yield a "keep" result: when the script terminates, the next script is
285
286
only executed if an implicit or explicit "keep" is in effect. Thus, to end all
286
287
script execution, a script must not execute keep and it must cancel the implicit
287
 
keep, e.g. by executing "discard; stop;". This means that the command "keep;" 
288
 
has different semantics when used in a sequence of scripts. For normal Sieve 
 
288
keep, e.g. by executing "discard; stop;". This means that the command "keep;"
 
289
has different semantics when used in a sequence of scripts. For normal Sieve
289
290
execution, "keep;" is equivalent to "fileinto "INBOX";", because both cause the
290
291
message to be stored in INBOX. However, in sequential script execution, it only
291
292
controls whether the next script is executed. Storing the message into INBOX
304
305
 
305
306
Just as for executing a single script the normal way, the Pigeonhole LDA Sieve
306
307
plugin takes care never to duplicate deliveries, forwards or responses. When
307
 
vacation actions are executed multiple times in different scripts, the usual 
 
308
vacation actions are executed multiple times in different scripts, the usual
308
309
error is not triggered: the subsequent duplicate vacation actions are simply
309
310
discarded.
310
311
 
325
326
   #   E.g. user-specific default mail filing rules
326
327
   sieve_after = /var/vmail/%d/%n/sieve-after
327
328
 
328
 
   # Global scripts executed after the user's personal script 
 
329
   # Global scripts executed after the user's personal script
329
330
   # (if keep is still in effect)
330
331
   #   E.g. default mail filing rules.
331
332
   sieve_after2 = /var/lib/dovecot/sieve/after.d/
367
368
  configuration options. Refer to doc/extensions/include.txt for settings
368
369
  specific to the include extension.
369
370
 
370
 
- Spamtest and Virustest extensions:
 
371
- Spamtest and virustest extensions:
371
372
 
372
373
  Using the spamtest and virustest extensions (RFC 5235), the Sieve language
373
374
  provides a uniform and standardized command interface for evaluating spam and
382
383
  configuration and are not enabled for use by default. Refer to
383
384
  doc/extensions/spamtest-virustest.txt for configuration information.
384
385
 
 
386
- Vnd.dovecot.duplicate extension:
 
387
 
 
388
  The vnd.dovecot.duplicate extension augments the Sieve filtering
 
389
  implementation with a test that allows detecting and handling duplicate
 
390
  message deliveries, e.g. as caused by mailinglists when people reply both to
 
391
  the mailinglist and the user directly.
 
392
 
 
393
  The vnd.dovecot.duplicate extension requires explicit configuration and is not
 
394
  enabled for use by default. Refer to doc/extensions/vnd.dovecot.duplicate.txt
 
395
  for configuration information.
 
396
 
 
397
- Extprograms plugin;
 
398
    vnd.dovovecot.pipe, vnd.dovecot.filter, vnd.dovecot.execute extensions:
 
399
 
 
400
  The "sieve_extprograms" plugin provides extensions to the Sieve filtering
 
401
  language adding new action commands for invoking a predefined set of external
 
402
  programs. Messages can be piped to or filtered through those programs and
 
403
  string data can be input to and retrieved from those programs.
 
404
 
 
405
  This plugin and the extensions it provides require explicit configuration and
 
406
  are not enabled for use by default. Refer to doc/plugins/sieve_extprograms.txt
 
407
        for more information.
 
408
 
385
409
Sieve Interpreter - Migration from CMUSieve (Dovecot v1.0/v1.1)
386
410
---------------------------------------------------------------
387
411
 
388
 
For the most part, migration from CMUSieve to the Pigeonhole LDA Sieve plugin is 
 
412
For the most part, migration from CMUSieve to the Pigeonhole LDA Sieve plugin is
389
413
just a matter of changing the used plugin name from 'cmusieve' to 'sieve' in the
390
414
mail_plugins option in the protocol lda section of the config file (as explained
391
415
above). However, there are a few important differences:
406
430
 
407
431
 * The include extension now requires your script file names to end with
408
432
   ".sieve". This means that ` include :personal "myscript"; ' won't work unless
409
 
   you rename "myscript" to "myscript.sieve" 
 
433
   you rename "myscript" to "myscript.sieve"
410
434
 
411
435
Sieve Interpreter - Migration from Dovecot Sieve v0.1.x (Dovecot v1.2)
412
436
----------------------------------------------------------------------
413
437
 
414
 
 * Dovecot v2.0 adds support for LMTP. Much like the Dovecot LDA, it can make 
415
 
   use of the Pigeonhole Sieve plugin. Since the LMTP service has its own 
416
 
   prototocol lmtp section in the config file, you need to add the Sieve plugin 
 
438
 * Dovecot v2.0 adds support for LMTP. Much like the Dovecot LDA, it can make
 
439
   use of the Pigeonhole Sieve plugin. Since the LMTP service has its own
 
440
   prototocol lmtp section in the config file, you need to add the Sieve plugin
417
441
   to the mail_plugins setting there too when you decide to use LMTP.
418
 
 * The 'sieve_subaddress_sep' setting for the Sieve subaddress extension is now 
 
442
 * The 'sieve_subaddress_sep' setting for the Sieve subaddress extension is now
419
443
   known as 'recipient_delimiter'. Although sieve_subaddress_sep is still
420
444
   recognized for backwards compatibility, it is recommended to update the
421
445
   setting to the new name, since the LMTP service also uses the
422
 
   recipient_delimiter setting. 
 
446
   recipient_delimiter setting.
423
447
 
424
448
ManageSieve Service - Basic Configuration
425
449
-----------------------------------------
426
450
 
427
451
IMPORTANT:
428
452
 
429
 
  If you have used the LDA Sieve plugin without ManageSieve before and you have 
 
453
  If you have used the LDA Sieve plugin without ManageSieve before and you have
430
454
  .dovecot.sieve files in user directories, you are advised to make a backup
431
455
  before installing ManageSieve. Although the ManageSieve service takes care to
432
 
  move these files to the Sieve directory before it is substituted with a 
 
456
  move these files to the Sieve directory before it is substituted with a
433
457
  symbolic link, this is not a very well tested operation, meaning that there is
434
458
  a slim possibility that existing Sieve scripts get lost.
435
459
 
436
 
Just like all other binaries that Dovecot uses, the managesieve and 
 
460
Just like all other binaries that Dovecot uses, the managesieve and
437
461
managesieve-login binaries are installed during make install.
438
462
 
439
463
There are two things that have be done to activate the ManageSieve support in
440
464
Dovecot:
441
465
 
442
 
 * The first step is to add `sieve' to the protocols= configuration line in 
 
466
 * The first step is to add `sieve' to the protocols= configuration line in
443
467
   your dovecot.conf.
444
468
 
445
469
 * The next step is specifying an additional service type for the ManageSieve
446
 
   service. This could be done in Dovecot's conf.d/master.conf or you can use 
 
470
   service. This could be done in Dovecot's conf.d/master.conf or you can use
447
471
   the 20-managesieve.conf file from the doc/example-config/conf.d directory of
448
 
   this package. 
 
472
   this package.
449
473
 
450
474
   For example:
451
475
 
456
480
    }
457
481
 
458
482
Because the implementation of the ManageSieve daemon is largely based on the
459
 
original IMAP implementation, it is very similar in terms of configuration. The 
 
483
original IMAP implementation, it is very similar in terms of configuration. The
460
484
following settings can be configured in the 'protocol sieve' section:
461
485
 
462
486
 managesieve_max_line_length = 65536
466
490
 
467
491
 managesieve_logout_format = bytes=%i/%o
468
492
   Specifies the string pattern used to compose the logout message of an
469
 
   authenticated session. The following substitutions are available: 
 
493
   authenticated session. The following substitutions are available:
470
494
 
471
495
     %i - total number of bytes read from client
472
496
     %o - total number of bytes sent to client
473
497
 
474
498
 managesieve_implementation_string = Dovecot Pigeonhole
475
 
   To fool ManageSieve clients that are focused on CMU's timesieved you can 
476
 
   specify the IMPLEMENTATION capability that the Dovecot reports to clients 
 
499
   To fool ManageSieve clients that are focused on CMU's timesieved you can
 
500
   specify the IMPLEMENTATION capability that the Dovecot reports to clients
477
501
   (e.g. 'Cyrus timsieved v2.2.13').
478
502
 
479
503
 managesieve_max_compile_errors = 5
480
 
   The maximum number of compile errors that are returned to the client upon 
 
504
   The maximum number of compile errors that are returned to the client upon
481
505
   script upload or script verification.
482
506
 
483
507
 managesieve_sieve_capability =
512
536
   already exists at the location specified by the sieve setting, it is moved to
513
537
   the sieve_dir location before the symbolic link is installed. It is renamed
514
538
   to dovecot.orig.sieve and therefore listed as `dovecot.orig' by a ManageSieve
515
 
   client. 
 
539
   client.
516
540
 
517
541
The following provides an example configuration for Sieve and ManageSieve. Only
518
 
sections and settings relevant to ManageSieve are shown. Refer to 
519
 
20-managesieve.conf in the doc/example-config/conf.d directory for a full 
520
 
example with comments, but don't forget to configure Sieve and add sieve to the 
 
542
sections and settings relevant to ManageSieve are shown. Refer to
 
543
20-managesieve.conf in the doc/example-config/conf.d directory for a full
 
544
example with comments, but don't forget to configure Sieve and add sieve to the
521
545
'protocols = ...' setting if you use it.
522
546
 
523
547
# *** conf.d/20-managesieve.conf ***
594
618
The following has changed since the ManageSieve releases for Dovecot v1.x:
595
619
 
596
620
 * For Dovecot v1.0 and v1.1, the sieve_dir setting used by ManageSieve was
597
 
   called sieve_storage. Also, the sieve and sieve_storage settings were located 
 
621
   called sieve_storage. Also, the sieve and sieve_storage settings were located
598
622
   inside the 'protocol managesieve' section of the configuration. As per
599
623
   Dovecot v1.2, these settings are shared with the Sieve plugin and located in
600
624
   the 'plugin' section of the configuration. Make sure you have updated the
611
635
 * The Dovecot configuration now calls the ManageSieve protocol 'sieve' instead
612
636
   of 'managesieve' because it is registered as such with IANA. The binaries and
613
637
   the services are still called 'managesieve' and 'managesieve-login'. The
614
 
   example above demonstrates how this affects the configuration. 
 
638
   example above demonstrates how this affects the configuration.
615
639
 
616
640
Test Suite
617
641
==========
618
642
 
619
643
This package includes a test suite to verify the basic processing of the Sieve
620
 
interpreter on your particular platform. Note that the test suite is not 
621
 
available when this package is compiled against the Dovecot headers only. The 
622
 
test suite executes a list of test cases and halts when one of them fails. If it 
623
 
executes all test cases successfully, the test suite finishes. You can execute 
624
 
the test suite using `make test`. 
 
644
interpreter on your particular platform. Note that the test suite is not
 
645
available when this package is compiled against the Dovecot headers only. The
 
646
test suite executes a list of test cases and halts when one of them fails. If it
 
647
executes all test cases successfully, the test suite finishes. You can execute
 
648
the basic test suite using `make test`, which does not include the plugins. You
 
649
can test the plugins using `make test-plugins`.
625
650
 
626
651
A failing test case is always a bug and a report is greatly appreciated.
627
652