1 |
.Dd October 3, 2001 |
2 |
.Dt IMAPFILTERRC 5 |
3 |
.Os |
4 |
.Sh NAME |
5 |
.Nm imapfilterrc |
6 |
.Nd imapfilter configuration file |
7 |
.Sh SYNOPSIS |
8 |
.Pa $HOME/.imapfilterrc |
9 |
.Sh DESCRIPTION |
10 |
The |
11 |
.Nm |
12 |
configuration file consists of a series of commands and variable settings, |
13 |
every one of which must be contained in a separate line. |
14 |
.Pp |
15 |
Empty lines and lines beginning with the number sign |
16 |
.Sq # |
17 |
character, |
18 |
which |
19 |
are considered comments, are ignored. |
20 |
.Sh COMMANDS |
21 |
.Bl -tag -width Ds |
22 |
.It Cm account Ar username:password@hostname[:host] |
23 |
Defines a user account, using the |
24 |
.Ar username |
25 |
as user identification and |
26 |
.Ar password |
27 |
as the secret word, connecting to the |
28 |
.Ar hostname |
29 |
mail server, at the specified |
30 |
.Ar port |
31 |
(if not specified the default IMAP protocol port (ie. 143) is used). |
32 |
.Pp |
33 |
The |
34 |
.Ar username |
35 |
and |
36 |
.Ar password |
37 |
strings can be given in a URL encoding like scheme, that is the |
38 |
.Sq % |
39 |
character followed by two hexadecimal digits representing the encoded |
40 |
character's |
41 |
.Xr ascii 7 |
42 |
code. Within the |
43 |
.Ar username |
44 |
and |
45 |
.Ar password |
46 |
field, any |
47 |
.Sq \&: , |
48 |
.Sq @ |
49 |
or |
50 |
.Sq % |
51 |
characters must be encoded in the above way. |
52 |
.It Cm folder Ar alias folder[,...] |
53 |
Defines folders (mailboxes) and groups them under the |
54 |
.Ar alias |
55 |
name. The mailboxes are associated with the last preceding |
56 |
.Ar account |
57 |
setting. More than one |
58 |
.Ar folder |
59 |
can be declared, separating them with a comma |
60 |
.Sq \&, . |
61 |
The |
62 |
.Ar alias |
63 |
is comprised by alphanumeric, underscore |
64 |
.Sq _ |
65 |
and minus |
66 |
.Sq - |
67 |
characters. |
68 |
.It Cm filter Ar alias [or|and] |
69 |
Starts the declaration of a filter with the name |
70 |
.Ar alias . |
71 |
Optionally the |
72 |
.Ar and |
73 |
or |
74 |
.Ar or |
75 |
flag can be set, in order to set the mode in which filter's masks will be |
76 |
combined (default is |
77 |
.Ar and |
78 |
mode). |
79 |
.It Cm [mask] Ar [or|and] [not] searchkey |
80 |
A |
81 |
.Ar filter |
82 |
entry contains one or more mask entries which are defined with the optional |
83 |
.Ar mask |
84 |
command, the |
85 |
.Ar or |
86 |
or |
87 |
.Ar and |
88 |
flag, the |
89 |
.Ar not |
90 |
flag and the searching criteria, based on which matching of a filter is done. |
91 |
.Pp |
92 |
The |
93 |
.Ar or |
94 |
and |
95 |
.Ar and |
96 |
flags are used to define in which way the current |
97 |
.Ar mask |
98 |
is combined with it's previous |
99 |
.Ar mask . |
100 |
The |
101 |
.Ar not |
102 |
flag is used to revert the functionality of the specified |
103 |
.Ar searchkey . |
104 |
.Pp |
105 |
A |
106 |
.Ar string |
107 |
can be a word, or a phrase enclosed in |
108 |
.Sq \&" . |
109 |
The matching of the |
110 |
.Ar string |
111 |
is case-insensitive. |
112 |
.Pp |
113 |
The available searching criteria are: |
114 |
.Bl -tag -width Ds |
115 |
.It Cm answered |
116 |
Messages that have been answered. |
117 |
.It Cm bcc Ar string |
118 |
Messages that contain the specified |
119 |
.Ar string |
120 |
in the envelope structure's |
121 |
.Dq Bcc |
122 |
field. |
123 |
.It Cm cc Ar string |
124 |
Messages that contain the specified |
125 |
.Ar string |
126 |
in the envelope structure's |
127 |
.Dq Cc |
128 |
field. |
129 |
.It Cm deleted |
130 |
Messages that are marked for deletion. |
131 |
.It Cm draft |
132 |
Messages that have not completed composition. |
133 |
.It Cm flagged |
134 |
Messages marked for urgent/special attention. |
135 |
.It Cm from Ar string |
136 |
Messages that contain the specified |
137 |
.Ar string |
138 |
in the envelope structure's |
139 |
.Dq From |
140 |
field. |
141 |
.It Cm header Ar fieldname string |
142 |
Messages that have a header with the specified |
143 |
.Ar fieldname , |
144 |
and contain the specified |
145 |
.Ar string |
146 |
in the field body. |
147 |
.It Cm larger Ar number |
148 |
Messages with size larger than the specified |
149 |
.Ar number |
150 |
in octets (bytes). |
151 |
.It Cm new |
152 |
Messages that have |
153 |
.Qq recently |
154 |
arrived in the mailbox (this session is the |
155 |
first, to have been notified about the messages) and have not been read. |
156 |
.It Cm old |
157 |
Messages that have not |
158 |
.Qq recently |
159 |
arrived in the mailbox and have not been |
160 |
read. |
161 |
.It Cm recent |
162 |
Messages that have |
163 |
.Qq recently |
164 |
arrived in the mailbox (this session is the |
165 |
first, to have been notified about the messages). |
166 |
.It Cm seen |
167 |
Messages that have been read. |
168 |
.It Cm smaller Ar number |
169 |
Messages with size smaller than the specified |
170 |
.Ar number |
171 |
in octets (bytes). |
172 |
.It Cm subject Ar string |
173 |
Messages that contain the specified string in the envelope structure's |
174 |
.Dq Subject |
175 |
field. |
176 |
.It Cm unanswered |
177 |
Messages that have not been answered. |
178 |
.It Cm undeleted |
179 |
Messages that are not marked for deletion. |
180 |
.It Cm undraft |
181 |
Messages that have completed composition. |
182 |
.It Cm unflagged |
183 |
Messages that are not marked for urgent/special attention. |
184 |
.It Cm unseen |
185 |
Messages that have not been read. |
186 |
.El |
187 |
.It Cm action Ar type |
188 |
The |
189 |
.Cm action |
190 |
command is used to end the filter entry started with the |
191 |
.Ar filter |
192 |
command. It assigns an action to be done when the |
193 |
.Ar filter |
194 |
is matched. |
195 |
.Pp |
196 |
The available |
197 |
.Ar type |
198 |
of actions are: |
199 |
.Bl -tag -width Ds |
200 |
.It Cm copy Ar mailbox [header,...] |
201 |
Copies the messages to the specified |
202 |
.Ar mailbox . |
203 |
If the |
204 |
.Ar mailbox |
205 |
does not exist, then it is created. Optionally, fetches and displays the |
206 |
.Ar header |
207 |
of the messages that were copied. |
208 |
.It Cm delete Ar [header,...] |
209 |
Deletes the messages. User can also, optionally, define the |
210 |
.Ar header |
211 |
of the deleted messages to be displayed. More than one |
212 |
.Ar header |
213 |
can be declared and fetched, by separating them with a comma |
214 |
.Sq \&, |
215 |
character. |
216 |
.It Cm list Ar [header,...] |
217 |
Just displays the |
218 |
.Ar header |
219 |
of the messages. |
220 |
.It Cm move Ar mailbox [header,...] |
221 |
Moves the messages to the specified |
222 |
.Ar mailbox . |
223 |
If the |
224 |
.Ar mailbox |
225 |
does not exist, then it is created. Optionally, fetches and displays the |
226 |
.Ar header |
227 |
of the messages that were moved. |
228 |
.El |
229 |
.It Cm job Ar filter[,...] folder[,...] |
230 |
This command is used to define which |
231 |
.Ar filter |
232 |
must be applied to which |
233 |
.Ar folder . |
234 |
More than one |
235 |
.Ar filter |
236 |
and/or |
237 |
.Ar folder |
238 |
can be declared, by separating them with a comma |
239 |
.Sq \&, |
240 |
character. |
241 |
.El |
242 |
.Sh VARIABLES |
243 |
.Bl -tag -width Ds |
244 |
.It Va headers |
245 |
By enabling this variable, message headers (if requested) are displayed, |
246 |
besides being written to the log file. The argument must be |
247 |
.Dq yes |
248 |
or |
249 |
.Dq no . |
250 |
Default is |
251 |
.Dq no . |
252 |
.It Va logfile |
253 |
Full path to log file where filtering information and possible error |
254 |
messages are saved to. The command line |
255 |
.Fl l |
256 |
option overrides this setting. |
257 |
.El |
258 |
.Sh EXAMPLES |
259 |
See |
260 |
.Pa sample.imapfilterrc . |
261 |
.Sh ENVIROMENT |
262 |
.Bl -tag -width Ds |
263 |
.Ev HOME |
264 |
User's home directory. |
265 |
.El |
266 |
.Sh SEE ALSO |
267 |
.Xr imapfilter 1 |
268 |
.Sh AUTHORS |
269 |
.An Lefteris Chatzibarbas Aq lefcha@users.sourceforge.net |