407 |
@section IMAP4 daemon |
@section IMAP4 daemon |
408 |
@pindex imap4d |
@pindex imap4d |
409 |
|
|
410 |
@command{imap4d} has two operation modes: |
GNU imap4d is a daemon implementing @sc{imap4} rev1 protocol for |
411 |
|
accessing and handling electronic mail messages on a server. It can |
412 |
|
be run either as a standalone program or from @file{inetd.conf} file. |
413 |
|
|
414 |
|
@menu |
415 |
|
* Namespace:: Imap4d namespace. |
416 |
|
* Starting imap4d:: Invocation options. |
417 |
|
@end menu |
418 |
|
|
419 |
|
@node Namespace |
420 |
|
@subsection Imap4d Namespace |
421 |
|
@cindex namespace |
422 |
|
@cindex IMAP4 namespace |
423 |
|
|
424 |
|
GNU imap4d supports a notion of @dfn{namespaces} defined in RFC 2342. A |
425 |
|
namespace is a set of directories upon which the user has certain |
426 |
|
permissions. It should be understood that these persmissions apply |
427 |
|
only if the underlying filesystem allows them. |
428 |
|
|
429 |
|
The three namespaces supported by @command{imap4d} are: |
430 |
|
|
431 |
@table @asis |
@table @asis |
432 |
@item Inetd |
@item Personal Namespace |
433 |
The server is started from @file{/etc/inetd.conf} file: |
A namespace that is within the personal scope of the authenticated user |
434 |
|
on a particular connection. The user has all permissions on this namespace. |
435 |
|
|
436 |
|
@item Other Users' Namespace |
437 |
|
A namespace that consists of mailboxes from the ``Personal Namespaces'' |
438 |
|
of other users. The user can read and list mailboxes from this |
439 |
|
namespace. However, he is not allowed to use @samp{%} and @samp{*} |
440 |
|
wildcards with @command{LIST} command, that is he can access a |
441 |
|
mailbox only if he knows exactly its location. |
442 |
|
|
443 |
|
@item Shared Namespace |
444 |
|
A namespace that consists of mailboxes that are intended to be shared |
445 |
|
amongst users and do not exist within a user's Personal Namespace. |
446 |
|
The user has all permissions on this namespace. |
447 |
|
|
448 |
|
@end table |
449 |
|
|
450 |
|
@noindent |
451 |
|
By default, @command{imap4d} starts with the following namespaces: |
452 |
|
|
453 |
|
@table @asis |
454 |
|
@item Personal Namespace |
455 |
|
The home directory of the user, if exists. |
456 |
|
|
457 |
|
@item Other Users' Namespace |
458 |
|
Empty |
459 |
|
@item Shared Namespace |
460 |
|
Empty |
461 |
|
@end table |
462 |
|
|
463 |
|
@emph{Note}, that this means that by default, a user won't be able to |
464 |
|
see or otherwise access mailboxes residing in the directories other than |
465 |
|
his own home. |
466 |
|
|
467 |
|
To change these defaults, use @option{--shared-namespace} and |
468 |
|
@option{--other-namespace} options. |
469 |
|
|
470 |
|
@node Starting imap4d |
471 |
|
@subsection Starting imap4d |
472 |
|
|
473 |
|
@command{imap4d} may run either in @dfn{standalone} or in @dfn{inetd} |
474 |
|
operation modes. When run in ``standalone'' mode, the server disconnects |
475 |
|
from the terminal and runs as a daemon, forking a child for each new |
476 |
|
connection. |
477 |
|
|
478 |
|
The ``inetd'' mode allows to start the server from |
479 |
|
@file{/etc/inetd.conf} file. This is the default operation mode. |
480 |
|
|
481 |
@example |
@example |
482 |
imap4 stream tcp nowait root /usr/local/sbin/imap4d imap4d |
imap4 stream tcp nowait root /usr/local/sbin/imap4d imap4d |
483 |
@end example |
@end example |
484 |
|
|
|
This is the default operation mode. |
|
|
|
|
|
@item Standalone |
|
|
The server runs as daemon, forking a child for each new connection. This |
|
|
mode is triggered by @option{-d} command line switch. |
|
|
@end table |
|
485 |
|
|
486 |
The program uses following option groups: @xref{mailbox}, |
The program uses following option groups: @xref{mailbox}, |
487 |
@xref{daemon}, @xref{logging}, @xref{auth}. |
@xref{daemon}, @xref{logging}, @xref{auth}. |
2131 |
@section sieve |
@section sieve |
2132 |
@pindex sieve |
@pindex sieve |
2133 |
|
|
2134 |
The program is currently in development |
Sieve is a language for filtering e-mail messages at time of final |
2135 |
|
delivery, described in RFC 3028. GNU mailutils provides two |
2136 |
|
implementations of this language: a stand-alone @dfn{sieve interpreter} |
2137 |
|
and a @dfn{sieve translator and filter}. The following sections describe these |
2138 |
|
utilities in detail. |
2139 |
|
|
2140 |
|
@menu |
2141 |
|
* sieve interpreter:: A Sieve Interpreter |
2142 |
|
* sieve.scm:: A Sieve to Scheme Translator and Filter |
2143 |
|
@end menu |
2144 |
|
|
2145 |
|
@node sieve interpreter |
2146 |
|
@subsection A Sieve Interpreter |
2147 |
|
|
2148 |
|
Sieve interpreter @command{sieve} allows to apply Sieve scripts to an |
2149 |
|
arbitrary number of mailboxes. Currently @command{sieve} supports the |
2150 |
|
following actions: |
2151 |
|
|
2152 |
|
@itemize |
2153 |
|
@item stop |
2154 |
|
@item keep |
2155 |
|
@item discard |
2156 |
|
@item fileinto |
2157 |
|
@end itemize |
2158 |
|
|
2159 |
|
@subheading Invocation |
2160 |
|
|
2161 |
|
The @command{sieve} invocation syntax is: |
2162 |
|
|
2163 |
|
@example |
2164 |
|
sieve [@var{options}] @var{script} |
2165 |
|
@end example |
2166 |
|
|
2167 |
|
@noindent |
2168 |
|
where @var{script} denotes the filename of the sieve program to parse, |
2169 |
|
and @var{options} is one or more of the following: |
2170 |
|
|
2171 |
|
@table @option |
2172 |
|
@item -c |
2173 |
|
@itemx --compile-only |
2174 |
|
Compile script and exit. |
2175 |
|
|
2176 |
|
@item -d[@var{flags}] |
2177 |
|
@itemx --debug[=@var{flags}] |
2178 |
|
Specify debug flags. The @var{flags} argument is a sequence of one or |
2179 |
|
more of the following letters: |
2180 |
|
|
2181 |
|
@multitable @columnfractions .40 .45 |
2182 |
|
@item @samp{a} @tab Enable address parser traces |
2183 |
|
@item @samp{g} @tab Enable main parser traces |
2184 |
|
@item @samp{T} @tab Enable mailutil traces |
2185 |
|
@item @samp{P} @tab Trace network protocols |
2186 |
|
@item @samp{t} @tab Enable sieve trace |
2187 |
|
@item @samp{h} @tab Debug sieve header filling |
2188 |
|
@item @samp{q} @tab Trace sieve message queries |
2189 |
|
@end multitable |
2190 |
|
|
2191 |
|
When omitted, @var{flags} defaults to @samp{TPt}. |
2192 |
|
|
2193 |
|
@item -f |
2194 |
|
@itemx --mbox-url=@var{mbox} |
2195 |
|
Mailbox to sieve (defaults to user's system mailbox) |
2196 |
|
|
2197 |
|
@item -k |
2198 |
|
@itemx --keep-going |
2199 |
|
Keep on going if execution fails on a message |
2200 |
|
|
2201 |
|
@item -M |
2202 |
|
@itemx --mailer-url=@var{mailer} |
2203 |
|
Override the mailer URL (defaults to "sendmail:") |
2204 |
|
|
2205 |
|
@item -n |
2206 |
|
@itemx --no-actions |
2207 |
|
Dry run: do not execute any actions, just print what would be done. |
2208 |
|
|
2209 |
|
@item -t @var{ticket} |
2210 |
|
@itemx --ticket=@var{ticket} |
2211 |
|
Ticket file for mailbox authentication |
2212 |
|
@end table |
2213 |
|
|
2214 |
|
Apart from these, @command{sieve} understands the options from the |
2215 |
|
@code{mailbox} option group (@pxref{mailbox}). |
2216 |
|
|
2217 |
|
@c *********************************************************************** |
2218 |
|
|
2219 |
|
@page |
2220 |
|
@node sieve.scm |
2221 |
|
@subsection A Sieve to Scheme Translator and Filter |
2222 |
|
|
2223 |
|
A Sieve to Scheme Translator @command{sieve.scm} translates a given |
2224 |
|
Sieve script into an equivalent Scheme program and optionally executes |
2225 |
|
it. The program itself is written in Scheme and requires presence of |
2226 |
|
Guile 1.4 on the system. For more information on Guile refer to |
2227 |
|
@ref{Top,,Overview,guile,The Guile Reference Manual}. |
2228 |
|
|
2229 |
|
@table @option |
2230 |
|
@item -f @var{filename} |
2231 |
|
@itemx --file @var{filename} |
2232 |
|
Set input file name. |
2233 |
|
|
2234 |
|
@item -o @var{filename} |
2235 |
|
@itemx --output @var{filename} |
2236 |
|
Set output file name |
2237 |
|
|
2238 |
|
@item -L @var{dirname} |
2239 |
|
@itemx --lib-dir @var{dirname} |
2240 |
|
Set sieve library directory name |
2241 |
|
|
2242 |
|
@item -d @var{level} |
2243 |
|
@item --debug @var{level} |
2244 |
|
Set debugging level |
2245 |
|
|
2246 |
|
@end table |
2247 |
|
|
2248 |
|
The Scheme programs produced by @command{sieve.scm} can be used with |
2249 |
|
@command{guimb} or @command{mail.local}. |
2250 |
|
|
2251 |
|
@c *********************************************************************** |
2252 |
@page |
@page |
2253 |
@node guimb |
@node guimb |
2254 |
@section guimb --- A mailbox scanning and processing language. |
@section guimb --- A mailbox scanning and processing language. |