~ubuntu-branches/ubuntu/quantal/dovecot/quantal

« back to all changes in this revision

Viewing changes to sieve/doc/man/sieve-filter.1

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short, Scott Kitterman
  • Date: 2010-06-22 10:33:51 UTC
  • mfrom: (1.13.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100622103351-ifbmnklp8kxrhb30
Tags: 1:1.2.12-0ubuntu1
* New upstream release:
  - deliver: Don't crash when a message with Auto-submitted: header gets
   rejected.
  - lib-storage: Fixed header searches to work correctly when there are
    multiple headers with same name.
  - dict client: Disconnect from dict server after 1 second of idling.
  - dict: If process crashed, it wasn't automatically restarted
  - dict file: If dict file's group permissions equal world permissions,
    don't try to change its gid.
  - maildir: Fixed a memory leak when copying with hardlinks.
  - maildir: Expunging last messages may have assert-crashed if their
    filenames had just changed.
 * Update sieve patch to 0.1.17
 * debian/dovecot-common.postinst: Add warning about expired certificate.
   (Debian Bug: #576455)
 * Silence lintian warnings.

 [Scott Kitterman]
 * Rename dovecot-postfix to mail-stack-delivery per server-maverick-mail-
   integration spec.
   - Update debian/rules
   - Convert existing package to a dummy package and add new binary in debian/control
   - Update maintainer scripts.
   - Move previously installed backups and config files to new package name
     space in preinst
   - Add new debian/mail-stack-delivery.prerm to handle downgrades
   - Rename debian/dovecot-postfix.* to debian/mail-stack-delivery.*

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 
16
16
.SH DESCRIPTION
17
17
.PP
18
 
The \fBsieve\-filter\fP command is part of the Sieve implementation for the Dovecot secure
19
 
IMAP server. Sieve (RFC 5228) is a simple and highly extensible language for filtering
20
 
e\-mail messages. It can be implemented for any type of mail access protocol, mail
21
 
architecture and operating system. The language cannot execute external programs and in
22
 
its basic form it does not provide the means to cause infinite loops, making it suitable
 
18
The \fBsieve\-filter\fP command is part of the Sieve implementation for the Dovecot secure 
 
19
IMAP server. Sieve (RFC 5228) is a simple and highly extensible language for filtering 
 
20
e\-mail messages. It can be implemented for any type of mail access protocol, mail 
 
21
architecture and operating system. The language cannot execute external programs and in 
 
22
its basic form it does not provide the means to cause infinite loops, making it suitable 
23
23
for running securely on mail servers where mail users have no permission run arbitrary programs.
24
24
.PP
25
25
The Sieve language was originally meant for filtering messages upon delivery. However, there are
29
29
mailbox, making it possible to delete messages, to store them in a different folder and to change
30
30
the assigned IMAP flags and keywords. Attempts to send messages to the outside world are ignored by default
31
31
for obvious reasons, but, using the proper command line options, it is possible to capture outgoing
32
 
mail as well.
 
32
mail as well. 
33
33
.PP
34
34
The command has three mandatory arguments: the \fIscript\-file\fP argument, which specifies the path of the
35
 
Sieve script, the \fIsource\-location\fP argument, which specifies the mail storage of the source mailbox
36
 
(e.g. `maildir:~/Maildir'), and the \fIsource\-mailbox\fP argument, which specifies the name of the source
37
 
mailbox within the specified mail storage (e.g. `INBOX.Spam').
 
35
Sieve script, the \fIsource\-location\fP argument, which specifies the mail storage of the source mailbox 
 
36
(e.g. `maildir:~/Maildir'), and the \fIsource\-mailbox\fP argument, which specifies the name of the source 
 
37
mailbox within the specified mail storage (e.g. `INBOX.Spam'). 
38
38
.PP
39
39
This tool does not (yet) use Dovecot's configuration file to obtain information on namespaces and the
40
40
location of mailboxes. Therefore, any used namespaces need to be specified on the command line. These
44
44
If no namespaces are defined on the commandline, the source\-location is used as the default mail store
45
45
where the INBOX is located. This means that the keep action could operate on the folder the message
46
46
originates from. In this case the message remains untouched and it is not duplicated, but IMAP flags and
47
 
keywords can be evaluated and changed with the imap4flags extension . If namespaces are defined explicitly,
48
 
the source location is available as a namespace with prefix `#src/'.
 
47
keywords can be evaluated and changed with the imap4flags extension . If namespaces are defined explicitly, 
 
48
the source location is available as a namespace with prefix `#src/'. 
49
49
.PP
50
 
If no options are specified, the sieve\-filter command runs in a simulation mode in which it only
 
50
If no options are specified, the sieve\-filter command runs in a simulation mode in which it only 
51
51
prints what would be performed, without actually doing anything. Use the \fB\-e\fP option to activate
52
52
true script execution. Also, the source mailbox is opened read\-only by default, so that the source mailbox
53
 
remains unchanged. Use the \fB\-W\fP to allow changes in the source mailbox.
 
53
remains unchanged. Use the \fB\-W\fP to allow changes in the source mailbox. 
54
54
 
55
55
.SH CAUTION
56
 
Although this is a very useful tool, it can also be very destructive when used improperly. A small
57
 
bug in your Sieve script in combination with the wrong command line options could cause it to
 
56
Although this is a very useful tool, it can also be very destructive when used improperly. A small 
 
57
bug in your Sieve script in combination with the wrong command line options could cause it to 
58
58
discard (many) more e\-mails than it was supposed to. Therefore, users are advised to read this manual
59
 
carefully and to use the simulation mode first to check what the script will do.
 
59
carefully and to use the simulation mode first to check what the script will do. 
60
60
.PP
61
61
\fBMAKING A BACKUP IS IMPERATIVE FOR ANY IMPORTANT MAIL!\fP
62
62
.PP
65
65
Sieve script decides to do so.
66
66
 
67
67
.SH OPTIONS
68
 
.TP
 
68
.TP 
69
69
\fB\-D\fP \fIsource\-action\fP
70
70
By default, the sieve\-filter command does not delete the messages from the source mailbox. This means that
71
71
a copy operation is executed by default and the source mailbox is not altered. The \fIsource\-action\fP
72
72
parameter of the \fB\-D\fP option can take four different values:
73
73
.RS 7
74
 
.TP
 
74
.TP 
75
75
\fBkeep\fP (default)
76
76
Keep messages in source folder. If \fB\-W\fR is specified and the source mailbox is the destination of
77
77
a keep or fileinto action, flags can be changed by the Sieve script. Messages are never duplicated in the
78
78
source mailbox.
79
 
.TP
 
79
.TP 
80
80
\fBflag\fP
81
81
Flag messages as \\DELETED.
82
 
.TP
 
82
.TP 
83
83
\fBmove\fP [\fIfolder\fP]
84
84
Move messages to the indicated \fIfolder\fP.
85
 
.TP
 
85
.TP 
86
86
\fBexpunge\fP
87
87
Expunge messages, meaning that these are removed irreversibly when the tool finishes filtering.
88
88
.PP
90
90
.RE
91
91
.TP
92
92
\fB\-e\fP
93
 
Turns on execution mode. By default, the sieve\-filter command runs in simulation mode in which it
 
93
Turns on execution mode. By default, the sieve\-filter command runs in simulation mode in which it 
94
94
changes nothing, meaning that no mailbox is altered in any way and no actions are performed. It only
95
 
prints what would be done. Using this option the sieve\-filter command becomes active and performs the
 
95
prints what would be done. Using this option the sieve\-filter command becomes active and performs the 
96
96
requested actions.
97
97
.TP
98
98
\fB\-f\fP \fIenvelope\-sender\fP
99
 
The envelope sender or return path. This is what Sieve's envelope test will compare to when the
100
 
"from" envelope part is requested. Also, this is where response messages are sent to.
 
99
The envelope sender or return path. This is what Sieve's envelope test will compare to when the 
 
100
"from" envelope part is requested. Also, this is where response messages are sent to. 
101
101
.TP
102
102
\fB\-m\fP \fIdefault\-mailbox\fP
103
103
The mailbox within the default namespace where the keep action stores the message. This is "INBOX"
104
104
by default.
105
105
.TP
106
106
\fB\-Q\fP \fImail\-command\fP
107
 
Send outgoing e\-mail through the specified program. By default, the sieve\-filter command ignores
 
107
Send outgoing e\-mail through the specified program. By default, the sieve\-filter command ignores 
108
108
Sieve actions such as redirect, reject, vacation and notify, but using this option outgoing messages
109
109
can be fed to the \fBstdin\fP of an external shell command. This option has no effect in simulation
110
110
mode, Unless you really know what you are doing, \fBDO NOT USE THIS TO FEED MAIL TO SENDMAIL!\f.
120
120
.TP
121
121
\fB\-W\fP
122
122
Enables write access to the source mailbox. This allows deleting the messages from the source mailbox
123
 
and changing the assigned IMAP flags and keywords.
 
123
and changing the assigned IMAP flags and keywords. 
124
124
.TP
125
125
\fB\-x\fP "\fIextension extension ...\fP"
126
126
Set the available extensions. The parameter is a space\-separated list of the active extensions. By
127
127
prepending the extension identifiers with \fB+\fP or \fB\-\fP, extensions can be included or excluded
128
 
relative to the default set of extensions. If no extensions have a \fB+\fP or \fB\-\fP prefix, only
129
 
those extensions that are explicitly listed will be enabled. Unknown extensions are ignored and a
130
 
warning is produced. By default, all supported extensions are available, except for deprecated extensions
 
128
relative to the default set of extensions. If no extensions have a \fB+\fP or \fB\-\fP prefix, only 
 
129
those extensions that are explicitly listed will be enabled. Unknown extensions are ignored and a 
 
130
warning is produced. By default, all supported extensions are available, except for deprecated extensions 
131
131
or those that are still under development.
132
132
 
133
133
For example \fB\-x\fP "+imapflags \-enotify" will enable the deprecated imapflags extension along with all