Commit 4d8a689e 4d8a689e9f6dd9c8b2e8fdbbc91e4c520f009098 by Wojciech Polak

Reorganized. Added initial movemail, mail.remote, and MH.

1 parent 8e54c4dd
...@@ -9,16 +9,24 @@ ...@@ -9,16 +9,24 @@
9 * configuration:: Common Configuration File. 9 * configuration:: Common Configuration File.
10 * authentication:: Authorization and Authentication Principles. 10 * authentication:: Authorization and Authentication Principles.
11 11
12 * imap4d:: IMAP4 Daemon.
13 * pop3d:: POP3 Daemon.
14 * frm:: List Headers from a Mailbox. 12 * frm:: List Headers from a Mailbox.
15 * mail:: Send and Receive Mail. 13 * mail:: Send and Receive Mail.
16 * mail.local:: Deliver Mail to the Local Mailbox.
17 * messages:: Count the Number of Messages in a Mailbox. 14 * messages:: Count the Number of Messages in a Mailbox.
15 * movemail:: Moves Mail from the User Maildrop to the Local File.
18 * readmsg:: Extract Messages from a Folder. 16 * readmsg:: Extract Messages from a Folder.
17
19 * sieve:: Mail Filtering Utility. 18 * sieve:: Mail Filtering Utility.
20 * guimb:: Mailbox Scanning and Processing Language. 19 * guimb:: Mailbox Scanning and Processing Language.
20
21 * mail.local:: Deliver Mail to the Local Mailbox.
22 * mail.remote:: Pseudo-Sendmail Interface for Mail Delivery.
23
24 * pop3d:: POP3 Daemon.
25 * imap4d:: IMAP4 Daemon.
21 * comsatd:: Comsat Daemon. 26 * comsatd:: Comsat Daemon.
27
28 * mh:: The MH Message Handling System.
29
22 * mailutils-config:: Get the Information about the Mailutils Build. 30 * mailutils-config:: Get the Information about the Mailutils Build.
23 @end menu 31 @end menu
24 32
...@@ -452,201 +460,6 @@ system:sql:virtdomains ...@@ -452,201 +460,6 @@ system:sql:virtdomains
452 @end smallexample 460 @end smallexample
453 461
454 @page 462 @page
455 @node imap4d
456 @section IMAP4 Daemon
457 @pindex imap4d
458
459 @sc{gnu} @command{imap4d} is a daemon implementing @sc{imap4} rev1 protocol
460 for accessing and handling electronic mail messages on a server. It can
461 be run either as a standalone program or from @file{inetd.conf} file.
462
463 @menu
464 * Namespace:: Namespace.
465 * Starting imap4d:: Invocation Options.
466 @end menu
467
468 @node Namespace
469 @subsection Namespace
470 @cindex namespace
471 @cindex IMAP4 namespace
472
473 @sc{gnu} @command{imap4d} supports a notion of @dfn{namespaces} defined
474 in RFC 2342. A namespace is a set of directories upon which the user
475 has certain permissions. It should be understood that these permissions
476 apply only if the underlying filesystem allows them.
477
478 The three namespaces supported by @command{imap4d} are:
479
480 @table @asis
481 @item Personal Namespace
482 A namespace that is within the personal scope of the authenticated user
483 on a particular connection. The user has all permissions on this namespace.
484
485 @item Other Users' Namespace
486 A namespace that consists of mailboxes from the ``Personal Namespaces''
487 of other users. The user can read and list mailboxes from this
488 namespace. However, he is not allowed to use @samp{%} and @samp{*}
489 wildcards with @command{LIST} command, that is he can access a
490 mailbox only if he knows exactly its location.
491
492 @item Shared Namespace
493 A namespace that consists of mailboxes that are intended to be shared
494 amongst users and do not exist within a user's Personal Namespace.
495 The user has all permissions on this namespace.
496 @end table
497
498 @noindent
499 By default, @command{imap4d} starts with the following namespaces:
500
501 @table @asis
502 @item Personal Namespace
503 The home directory of the user, if exists.
504
505 @item Other Users' Namespace
506 Empty
507
508 @item Shared Namespace
509 Empty
510 @end table
511
512 @emph{Note}, that this means that by default, a user won't be able to
513 see or otherwise access mailboxes residing in the directories other than
514 his own home.
515
516 To change these defaults, use @option{--shared-namespace} and
517 @option{--other-namespace} options.
518
519 @node Starting imap4d
520 @subsection Starting @command{imap4d}
521
522 @command{imap4d} may run either in @dfn{standalone} or in @dfn{inetd}
523 operation modes. When run in ``standalone'' mode, the server disconnects
524 from the terminal and runs as a daemon, forking a child for each new
525 connection.
526
527 The ``inetd'' mode allows to start the server from
528 @file{/etc/inetd.conf} file. This is the default operation mode.
529
530 @smallexample
531 imap4 stream tcp nowait root /usr/local/sbin/imap4d imap4d
532 @end smallexample
533
534 The program uses following option groups: @xref{mailbox},
535 @xref{daemon}, @xref{logging}, @xref{auth}.
536
537 @subheading Command Line Options
538
539 @table @option
540 @item -d[@var{number}]
541 @itemx --daemon[=@var{number}]
542 Run in standalone mode. An optional @var{number} specifies the maximum number
543 of child processes the daemon is allowed to fork. When it is omitted,
544 it defaults to 20 processes.
545 @emph{Please note}, that there should be no whitespace between the
546 @option{-d} and its parameter.
547 @item -h
548 @itemx --help
549 Display short help message and exit.
550 @item -i
551 @itemx --inetd
552 Run in inetd mode.
553 @item -m @var{path}
554 @itemx --mail-spool=@var{path}
555 Set path to the mailspool directory
556 @item -O @var{pathlist}
557 @itemx --other-namespace=@var{pathlist}
558 Set the list of directories forming the ``Other User's'' namespace.
559 @var{pathlist} is a list of directory names separated by colons.
560 @item -p @var{number}
561 @itemx --port @var{number}
562 Listen on given port @var{number}. This option is meaningful only in
563 standalone mode. It defaults to port 143.
564 @item -S @var{pathlist}
565 @itemx --shared-namespace=@var{pathlist}
566 Set the list of directories, forming the ``Shared''
567 namespace. @var{pathlist} is a list of directory names separated by colons.
568 @item -t @var{number}
569 @itemx --timeout @var{number}
570 Set idle timeout to given @var{number} of seconds. Default is 1800 seconds (30
571 minutes). The daemon breaks the connection if it receives no commands
572 from the client within that number of seconds.
573 @item -v
574 @itemx --version
575 Display program version and exit.
576 @end table
577
578 @page
579 @node pop3d
580 @section POP3 Daemon
581 @pindex pop3d
582
583 The @command{pop3d} daemon implements the Post Office Protocol
584 Version 3 server.
585
586 @command{pop3d} has two operation modes:
587
588 @table @asis
589 @item Inetd
590 The server is started from @file{/etc/inetd.conf} file:
591
592 @smallexample
593 pop3 stream tcp nowait root /usr/local/sbin/pop3d pop3d
594 @end smallexample
595
596 This is the default operation mode.
597
598 @item Standalone
599 The server runs as daemon, forking a child for each new connection. This
600 mode is triggered by @option{-d} command line switch.
601 @end table
602
603 The program uses following option groups: @xref{mailbox},
604 @xref{daemon}, @xref{logging}, @xref{auth}.
605
606 @subheading Command line options
607
608 @table @option
609 @item -d[@var{number}]
610 @itemx --daemon[=@var{number}]
611 Run in standalone mode. An optional @var{number} specifies the maximum number
612 of child processes the daemon is allowed to fork. When it is omitted,
613 it defaults to 10 processes.
614 @emph{Please note}, that there should be no whitespace between the
615 @option{-d} and its parameter.
616 @item -h
617 @itemx --help
618 Display short help message and exit.
619 @item -i
620 @itemx --inetd
621 Run in inetd mode.
622 @item -m @var{path}
623 @itemx --mail-spool=@var{path}
624 Set path to the mailspool directory
625 @item -p @var{number}
626 @itemx --port @var{number}
627 Listen on given port @var{number}. This option is meaningful only in
628 standalone mode. It defaults to port 110.
629 @item -t @var{number}
630 @itemx --timeout @var{number}
631 Set idle timeout to given @var{number} of seconds. Default is 600 seconds (10
632 minutes). The daemon breaks the connection if it receives no commands
633 from the client within that number of seconds.
634 @item -v
635 @itemx --version
636 Display program version and exit.
637 @item --undelete
638 Remove all deletion marks from the messages after opening the mailbox.
639 @item --login-delay=@var{seconds}
640 Sets the minimum allowed delay between closing a pop3d session and
641 opening it again with the same user name.
642 @item --stat-file=@var{filename}
643 Sets the name of the login timestamp database, used with
644 @option{--login-delay}. By default, these data are kept in
645 @file{/var/run/pop3-login}. Be sure to specify the file name
646 @emph{without} DBM-specific suffix.
647 @end table
648
649 @page
650 @node frm 463 @node frm
651 @section @command{frm} --- List Headers from a Mailbox 464 @section @command{frm} --- List Headers from a Mailbox
652 @pindex frm 465 @pindex frm
...@@ -2016,232 +1829,34 @@ package via @option{--with-mail-rc} option. It defaults to ...@@ -2016,232 +1829,34 @@ package via @option{--with-mail-rc} option. It defaults to
2016 @file{@var{sysconfdir}/mail.rc}. 1829 @file{@var{sysconfdir}/mail.rc}.
2017 1830
2018 @page 1831 @page
2019 @node mail.local 1832 @node messages
2020 @section @command{mail.local} --- Deliver Mail to the Local Mailbox 1833 @section @command{messages} --- Count the Number of Messages in a Mailbox
2021 @pindex mail.local 1834 @pindex messages
2022
2023 @command{mail.local} reads the standard input up to an end-of-file
2024 and appends the received data to the local mailboxes.
2025
2026 @menu
2027 * Invocation:: Mail.local options
2028 * MTA:: Using mail.local with various MTAs
2029 * Mailbox Quotas:: Setting up mailbox quotas.
2030 * Sieve Filters:: Implementing user-defined Sieve mail filters.
2031 * Scheme Filters:: Implementing user-defined Scheme mail filters.
2032 @end menu
2033
2034 @node Invocation
2035 @subsection Invoking @command{mail.local}
2036 1835
2037 General usage of @command{mail.local} program is: 1836 @command{Messages} prints on standard output the number of messages
1837 contained in each folder specified in command line. If no folders
1838 are specified, it operates upon user's system mailbox. For each
1839 folder, the following output line is produced:
2038 1840
2039 @smallexample 1841 @smallexample
2040 mail.local [OPTION...] recipient [recipient ...] 1842 Number of messages in @var{folder}: @var{number}
2041 @end smallexample 1843 @end smallexample
2042 1844
2043 @noindent 1845 @noindent
2044 If recipient part is present is a FQDN, @command{mail.local} 1846 where @var{folder} represents the folder name, @var{number} represents
2045 will attempt to deliver to a virtual host. 1847 the number of messages.
2046 1848
1849 The program uses following option groups: @xref{mailbox}.
2047 1850
2048 The program uses following option groups: @xref{mailbox}, @xref{auth}, 1851 The program accepts following command line options:
2049 @xref{logging}, @xref{sieve}.
2050 1852
2051 @table @option 1853 @table @option
2052 @item -f @var{addr} 1854 @item -q
2053 @itemx --from @var{addr} 1855 @itemx --quite
2054 Specify the sender's name. This option forces @command{mail.local} to 1856 @itemx -s
2055 add @samp{From } envelope to the beginning of the message. If it is 1857 @itemx --silent
2056 not specified, @command{mail.local} first looks into the first line 1858 Be quiet. Display only number of messages per mailbox, without leading text.
2057 from the standard input. If it starts with @samp{From }, it is assumed 1859 @item -?
2058 to contain a valid envelope. If it does not, @command{mail.local}
2059 creates the envelope by using current user name and date.
2060 @item -h
2061 @itemx --help
2062 Display this help and exit.
2063 @item -L
2064 @itemx --license
2065 Display @sc{gnu} General Public License and exit.
2066 @item -m @var{path}
2067 @itemx --mail-spool @var{path}
2068 Specify path to mailspool directory.
2069 @item -q
2070 @itemx --quota-db @var{file}
2071 Specify path to mailbox quota database (@pxref{Mailbox Quotas}).
2072 @item -s @var{pattern}
2073 @itemx --source @var{pattern}
2074 Set name pattern for user-defined mail filters written in Scheme
2075 (@pxref{Scheme Filters}). The
2076 metacharacters @samp{%u} and @samp{%h} in the pattern are expanded to
2077 the current recipient user name and home directory correspondingly.
2078
2079 This option is available only if the package has been configured to
2080 use Guile extension language.
2081 @item -S @var{pattern}
2082 @itemx --sieve @var{pattern}
2083 Set name pattern for user-defined mail filters written is Sieve
2084 (@pxref{Sieve Filters}). The
2085 metacharacters @samp{%u} and @samp{%h} in the pattern are expanded to
2086 the current recipient user name and home directory correspondingly.
2087 @item -t @var{number}
2088 @itemx --timeout @var{number}
2089 Wait @var{number} seconds for acquiring the lockfile. If it doesn't
2090 become available after that amount of time, return failure. The timeout
2091 defaults to 5 minutes.
2092 @item -x @var{flags}
2093 @itemx --debug @var{flags}
2094 Enable debugging. The debugging information will be output using syslog.
2095 The @var{flags} is a string consisting of the following flags:
2096 Debug flags are:
2097
2098 @table @samp
2099 @item g
2100 Start with guile debugging evaluator and backtraces. This is convenient
2101 for debugging user-defined filters (@pxref{Scheme Filters}).
2102
2103 @item T
2104 Enable libmailutil traces (MU_DEBUG_TRACE).
2105
2106 @item P
2107 Enable network protocol traces (MU_DEBUG_PROT)
2108
2109 @item t
2110 Enable sieve trace (MU_SIEVE_DEBUG_TRACE)
2111
2112 @item l
2113 Enable sieve action logs
2114 @end table
2115
2116 The digits in the range @samp{0} -- @samp{9} used in @var{flags} set
2117 @command{mail.local} debugging level.
2118 @item -v
2119 @itemx --version
2120 Display program version and exit.
2121 @item --ex-multiple-delivery-success
2122 Don't return errors when delivering to multiple recipients.
2123 @item --ex-quota-tempfail
2124 Return temporary failure if disk or mailbox quota is exceeded. By
2125 default, 'service unavailable' is returned if the message exceeds
2126 the mailbox quota.
2127 @end table
2128
2129 @node MTA
2130 @subsection Using @command{mail.local} with Various MTAs
2131
2132 This section explains how to invoke @command{mail.local} from
2133 configuration files of various Mail Transport Agents.
2134
2135 All examples in this section suppose that @command{mail.local}
2136 must receive following command line switches:
2137
2138 @smallexample
2139 -s %h/.filter.scm -q /etc/mail/userquota
2140 @end smallexample
2141
2142 @menu
2143 * Sendmail:: Using @command{mail.local} with Sendmail.
2144 * Exim:: Using @command{mail.local} with Exim.
2145 @end menu
2146
2147 @node Sendmail
2148 @subsubheading Using @command{mail.local} with Sendmail
2149
2150 The @command{mail.local} must be invoked from the local mailer
2151 definition in the @file{sendmail.cf} file. It must have the
2152 following flags set @samp{lswS}, meaning the mailer is local,
2153 the quote characters should be stripped off the address before
2154 invoking the mailer, the user must have a valid account on this
2155 machine and the userid should not be reset before calling the
2156 mailer. Additionally, @samp{fn} flags may be specified to allow
2157 @command{mail.local} to generate usual @samp{From } envelope
2158 instead of the one supplied by sendmail.
2159
2160 If you wish to use mail.local with SQL authentication, you may
2161 wish to remove the @samp{w} flag, since in that case the user is
2162 not required to have a valid account on the machine that runs
2163 @command{sendmail}.
2164
2165 Here is an example of mailer definition in @file{sendmail.cf}
2166
2167 @smallexample
2168 Mlocal, P=/usr/local/libexec/mail.local,
2169 F=lsDFMAw5:/|@@qSPfhn9,
2170 S=EnvFromL/HdrFromL, R=EnvToL/HdrToL,
2171 T=DNS/RFC822/X-Unix,
2172 A=mail -s %h/.filter.scm -q /etc/mail/userquota $u
2173 @end smallexample
2174
2175 To define local mailer in @samp{mc} source file, it will suffice to
2176 set:
2177
2178 @smallexample
2179 define(`LOCAL_MAILER_PATH', `/usr/local/libexec/mail.local')
2180 define(`LOCAL_MAILER_ARGS',
2181 `mail -s %h/.filter.scm -q /etc/mail/userquota $u')
2182 @end smallexample
2183
2184 @node Exim
2185 @subsubheading Using @command{mail.local} with Exim
2186
2187 Using @command{mail.local} with Exim is quite straightforward. The
2188 following example illustrates the definition of appropriate transport
2189 and director in @file{exim.conf}:
2190
2191 @smallexample
2192 # transport
2193 mail_local_pipe:
2194 driver = pipe
2195 command = /usr/local/libexec/mail.local -s %h/.filter.scm \
2196 -q /etc/mail/userquota $local_part
2197 return_path_add
2198 delivery_date_add
2199 envelope_to_add
2200
2201 # director
2202 mail_local:
2203 driver = localuser
2204 transport = mail_local_pipe
2205 @end smallexample
2206
2207 @node Mailbox Quotas
2208 @subsection Setting up Mailbox Quotas
2209
2210 @node Sieve Filters
2211 @subsection Implementing User-defined Sieve Mail Filters
2212
2213 @node Scheme Filters
2214 @subsection Implementing User-defined Scheme Mail Filters
2215
2216 @page
2217 @node messages
2218 @section @command{messages} --- Count the Number of Messages in a Mailbox
2219 @pindex messages
2220
2221 @command{Messages} prints on standard output the number of messages
2222 contained in each folder specified in command line. If no folders
2223 are specified, it operates upon user's system mailbox. For each
2224 folder, the following output line is produced:
2225
2226 @smallexample
2227 Number of messages in @var{folder}: @var{number}
2228 @end smallexample
2229
2230 @noindent
2231 where @var{folder} represents the folder name, @var{number} represents
2232 the number of messages.
2233
2234 The program uses following option groups: @xref{mailbox}.
2235
2236 The program accepts following command line options:
2237
2238 @table @option
2239 @item -q
2240 @itemx --quite
2241 @itemx -s
2242 @itemx --silent
2243 Be quiet. Display only number of messages per mailbox, without leading text.
2244 @item -?
2245 @itemx --help 1860 @itemx --help
2246 Output help message and exit. 1861 Output help message and exit.
2247 @item --usage 1862 @item --usage
...@@ -2252,6 +1867,13 @@ Output program version and exit. ...@@ -2252,6 +1867,13 @@ Output program version and exit.
2252 @end table 1867 @end table
2253 1868
2254 @page 1869 @page
1870 @node movemail
1871 @section @command{movemail} --- Moves Mail from the User Maildrop to the Local File
1872 @pindex movemail
1873
1874 [FIXME]
1875
1876 @page
2255 @node readmsg 1877 @node readmsg
2256 @section @command{readmsg} --- Extract Messages from a Folder 1878 @section @command{readmsg} --- Extract Messages from a Folder
2257 @pindex readmsg 1879 @pindex readmsg
...@@ -2260,7 +1882,6 @@ The program, readmsg, extracts with the selection argument messages from ...@@ -2260,7 +1882,6 @@ The program, readmsg, extracts with the selection argument messages from
2260 a mailbox. Selection can be specify by: 1882 a mailbox. Selection can be specify by:
2261 1883
2262 @enumerate 1884 @enumerate
2263
2264 @item A lone ``*'' means select all messages in the mailbox. 1885 @item A lone ``*'' means select all messages in the mailbox.
2265 1886
2266 @item 1887 @item
...@@ -2317,7 +1938,6 @@ Put form-feed (Control-L) between messages instead of newline. ...@@ -2317,7 +1938,6 @@ Put form-feed (Control-L) between messages instead of newline.
2317 @itemx --weedlist=@var{weedlist} 1938 @itemx --weedlist=@var{weedlist}
2318 A whitespace or coma separated list of header names to show per message. 1939 A whitespace or coma separated list of header names to show per message.
2319 Default is --weedlist=''From Subject Date To CC Apparently-'' 1940 Default is --weedlist=''From Subject Date To CC Apparently-''
2320
2321 @end table 1941 @end table
2322 1942
2323 @page 1943 @page
...@@ -2738,66 +2358,466 @@ Display program version. ...@@ -2738,66 +2358,466 @@ Display program version.
2738 @end table 2358 @end table
2739 2359
2740 @page 2360 @page
2741 @node comsatd 2361 @node mail.local
2742 @section Comsat Daemon 2362 @section @command{mail.local} --- Deliver Mail to the Local Mailbox
2743 @pindex comsatd 2363 @pindex mail.local
2744 2364
2745 Comsatd is the server which receives reports of incoming mail and 2365 @command{mail.local} reads the standard input up to an end-of-file
2746 notifies users, wishing to get this service. It can be started 2366 and appends the received data to the local mailboxes.
2747 either from @file{inetd.conf} or as a standalone daemon.
2748 2367
2749 @menu 2368 @menu
2750 * Starting comsatd:: Invocation. 2369 * Invocation:: Mail.local options
2751 * Configuring comsatd:: Configuration of @command{comsatd}. 2370 * MTA:: Using mail.local with various MTAs
2752 * dot.biffrc:: A per-user configuration file. 2371 * Mailbox Quotas:: Setting up mailbox quotas.
2372 * Sieve Filters:: Implementing user-defined Sieve mail filters.
2373 * Scheme Filters:: Implementing user-defined Scheme mail filters.
2753 @end menu 2374 @end menu
2754 2375
2755 @node Starting comsatd 2376 @node Invocation
2756 @subsection Starting @command{comsatd} 2377 @subsection Invoking @command{mail.local}
2757
2758 @command{Comsatd} uses following option groups: @xref{mailbox},
2759 @xref{daemon}, @xref{logging}.
2760 2378
2761 @table @option 2379 General usage of @command{mail.local} program is:
2762 @item -c @var{file}
2763 @itemx --config @var{file}
2764 Read configuration from given @var{file}. For more information about
2765 comsatd configuration files, see @ref{Configuring comsatd}.
2766 @item -d
2767 @itemx --daemon
2768 Run as a standalone daemon.
2769 @item -i
2770 @itemx --inetd
2771 The server is started from @file{/etc/inetd.conf} file:
2772 2380
2773 @smallexample 2381 @smallexample
2774 comsat dgram udp wait root /usr/sbin/comsatd \ 2382 mail.local [OPTION...] recipient [recipient ...]
2775 comsatd -c /etc/comsat.conf
2776 @end smallexample 2383 @end smallexample
2777 2384
2778 This is the default operation mode. 2385 @noindent
2779 @item -m @var{path} 2386 If recipient part is present is a FQDN, @command{mail.local}
2780 @itemx --mail-spool=@var{path} 2387 will attempt to deliver to a virtual host.
2781 Set path to the mailspool directory
2782 @item -p @var{number}
2783 @itemx --port @var{number}
2784 Specify the port number to listen on. Default is 512.
2785 @item -v
2786 @itemx --version
2787 Output version and exit successfully.
2788 @item -h
2789 @itemx --help
2790 Display short help message and exit.
2791 @end table
2792 2388
2793 @node Configuring comsatd
2794 @subsection Configuring @command{comsatd}
2795 2389
2796 The configuration parameters for @command{comsatd} are kept in a single 2390 The program uses following option groups: @xref{mailbox}, @xref{auth},
2797 configuration file. The file uses line-oriented format: each line 2391 @xref{logging}, @xref{sieve}.
2798 contains a single statement. Comments are introduced with the @samp{#} 2392
2799 sign and empty lines are ignored. You can specify the configuration 2393 @table @option
2800 file to use by using @option{-c} or @option{--config} command line switch. 2394 @item -f @var{addr}
2395 @itemx --from @var{addr}
2396 Specify the sender's name. This option forces @command{mail.local} to
2397 add @samp{From } envelope to the beginning of the message. If it is
2398 not specified, @command{mail.local} first looks into the first line
2399 from the standard input. If it starts with @samp{From }, it is assumed
2400 to contain a valid envelope. If it does not, @command{mail.local}
2401 creates the envelope by using current user name and date.
2402 @item -h
2403 @itemx --help
2404 Display this help and exit.
2405 @item -L
2406 @itemx --license
2407 Display @sc{gnu} General Public License and exit.
2408 @item -m @var{path}
2409 @itemx --mail-spool @var{path}
2410 Specify path to mailspool directory.
2411 @item -q
2412 @itemx --quota-db @var{file}
2413 Specify path to mailbox quota database (@pxref{Mailbox Quotas}).
2414 @item -s @var{pattern}
2415 @itemx --source @var{pattern}
2416 Set name pattern for user-defined mail filters written in Scheme
2417 (@pxref{Scheme Filters}). The
2418 metacharacters @samp{%u} and @samp{%h} in the pattern are expanded to
2419 the current recipient user name and home directory correspondingly.
2420
2421 This option is available only if the package has been configured to
2422 use Guile extension language.
2423 @item -S @var{pattern}
2424 @itemx --sieve @var{pattern}
2425 Set name pattern for user-defined mail filters written is Sieve
2426 (@pxref{Sieve Filters}). The
2427 metacharacters @samp{%u} and @samp{%h} in the pattern are expanded to
2428 the current recipient user name and home directory correspondingly.
2429 @item -t @var{number}
2430 @itemx --timeout @var{number}
2431 Wait @var{number} seconds for acquiring the lockfile. If it doesn't
2432 become available after that amount of time, return failure. The timeout
2433 defaults to 5 minutes.
2434 @item -x @var{flags}
2435 @itemx --debug @var{flags}
2436 Enable debugging. The debugging information will be output using syslog.
2437 The @var{flags} is a string consisting of the following flags:
2438 Debug flags are:
2439
2440 @table @samp
2441 @item g
2442 Start with guile debugging evaluator and backtraces. This is convenient
2443 for debugging user-defined filters (@pxref{Scheme Filters}).
2444
2445 @item T
2446 Enable libmailutil traces (MU_DEBUG_TRACE).
2447
2448 @item P
2449 Enable network protocol traces (MU_DEBUG_PROT)
2450
2451 @item t
2452 Enable sieve trace (MU_SIEVE_DEBUG_TRACE)
2453
2454 @item l
2455 Enable sieve action logs
2456 @end table
2457
2458 The digits in the range @samp{0} -- @samp{9} used in @var{flags} set
2459 @command{mail.local} debugging level.
2460 @item -v
2461 @itemx --version
2462 Display program version and exit.
2463 @item --ex-multiple-delivery-success
2464 Don't return errors when delivering to multiple recipients.
2465 @item --ex-quota-tempfail
2466 Return temporary failure if disk or mailbox quota is exceeded. By
2467 default, 'service unavailable' is returned if the message exceeds
2468 the mailbox quota.
2469 @end table
2470
2471 @node MTA
2472 @subsection Using @command{mail.local} with Various MTAs
2473
2474 This section explains how to invoke @command{mail.local} from
2475 configuration files of various Mail Transport Agents.
2476
2477 All examples in this section suppose that @command{mail.local}
2478 must receive following command line switches:
2479
2480 @smallexample
2481 -s %h/.filter.scm -q /etc/mail/userquota
2482 @end smallexample
2483
2484 @menu
2485 * Sendmail:: Using @command{mail.local} with Sendmail.
2486 * Exim:: Using @command{mail.local} with Exim.
2487 @end menu
2488
2489 @node Sendmail
2490 @subsubheading Using @command{mail.local} with Sendmail
2491
2492 The @command{mail.local} must be invoked from the local mailer
2493 definition in the @file{sendmail.cf} file. It must have the
2494 following flags set @samp{lswS}, meaning the mailer is local,
2495 the quote characters should be stripped off the address before
2496 invoking the mailer, the user must have a valid account on this
2497 machine and the userid should not be reset before calling the
2498 mailer. Additionally, @samp{fn} flags may be specified to allow
2499 @command{mail.local} to generate usual @samp{From } envelope
2500 instead of the one supplied by sendmail.
2501
2502 If you wish to use mail.local with SQL authentication, you may
2503 wish to remove the @samp{w} flag, since in that case the user is
2504 not required to have a valid account on the machine that runs
2505 @command{sendmail}.
2506
2507 Here is an example of mailer definition in @file{sendmail.cf}
2508
2509 @smallexample
2510 Mlocal, P=/usr/local/libexec/mail.local,
2511 F=lsDFMAw5:/|@@qSPfhn9,
2512 S=EnvFromL/HdrFromL, R=EnvToL/HdrToL,
2513 T=DNS/RFC822/X-Unix,
2514 A=mail -s %h/.filter.scm -q /etc/mail/userquota $u
2515 @end smallexample
2516
2517 To define local mailer in @samp{mc} source file, it will suffice to
2518 set:
2519
2520 @smallexample
2521 define(`LOCAL_MAILER_PATH', `/usr/local/libexec/mail.local')
2522 define(`LOCAL_MAILER_ARGS',
2523 `mail -s %h/.filter.scm -q /etc/mail/userquota $u')
2524 @end smallexample
2525
2526 @node Exim
2527 @subsubheading Using @command{mail.local} with Exim
2528
2529 Using @command{mail.local} with Exim is quite straightforward. The
2530 following example illustrates the definition of appropriate transport
2531 and director in @file{exim.conf}:
2532
2533 @smallexample
2534 # transport
2535 mail_local_pipe:
2536 driver = pipe
2537 command = /usr/local/libexec/mail.local -s %h/.filter.scm \
2538 -q /etc/mail/userquota $local_part
2539 return_path_add
2540 delivery_date_add
2541 envelope_to_add
2542
2543 # director
2544 mail_local:
2545 driver = localuser
2546 transport = mail_local_pipe
2547 @end smallexample
2548
2549 @node Mailbox Quotas
2550 @subsection Setting up Mailbox Quotas
2551
2552 @node Sieve Filters
2553 @subsection Implementing User-defined Sieve Mail Filters
2554
2555 @node Scheme Filters
2556 @subsection Implementing User-defined Scheme Mail Filters
2557
2558 @page
2559 @node mail.remote
2560 @section @command{mail.remote} --- Pseudo-Sendmail Interface for Mail Delivery
2561 @pindex mail.remote
2562
2563 [FIXME]
2564
2565 @page
2566 @node pop3d
2567 @section POP3 Daemon
2568 @pindex pop3d
2569
2570 The @command{pop3d} daemon implements the Post Office Protocol
2571 Version 3 server.
2572
2573 @command{pop3d} has two operation modes:
2574
2575 @table @asis
2576 @item Inetd
2577 The server is started from @file{/etc/inetd.conf} file:
2578
2579 @smallexample
2580 pop3 stream tcp nowait root /usr/local/sbin/pop3d pop3d
2581 @end smallexample
2582
2583 This is the default operation mode.
2584
2585 @item Standalone
2586 The server runs as daemon, forking a child for each new connection. This
2587 mode is triggered by @option{-d} command line switch.
2588 @end table
2589
2590 The program uses following option groups: @xref{mailbox},
2591 @xref{daemon}, @xref{logging}, @xref{auth}.
2592
2593 @subheading Command line options
2594
2595 @table @option
2596 @item -d[@var{number}]
2597 @itemx --daemon[=@var{number}]
2598 Run in standalone mode. An optional @var{number} specifies the maximum number
2599 of child processes the daemon is allowed to fork. When it is omitted,
2600 it defaults to 10 processes.
2601 @emph{Please note}, that there should be no whitespace between the
2602 @option{-d} and its parameter.
2603 @item -h
2604 @itemx --help
2605 Display short help message and exit.
2606 @item -i
2607 @itemx --inetd
2608 Run in inetd mode.
2609 @item -m @var{path}
2610 @itemx --mail-spool=@var{path}
2611 Set path to the mailspool directory
2612 @item -p @var{number}
2613 @itemx --port @var{number}
2614 Listen on given port @var{number}. This option is meaningful only in
2615 standalone mode. It defaults to port 110.
2616 @item -t @var{number}
2617 @itemx --timeout @var{number}
2618 Set idle timeout to given @var{number} of seconds. Default is 600 seconds (10
2619 minutes). The daemon breaks the connection if it receives no commands
2620 from the client within that number of seconds.
2621 @item -v
2622 @itemx --version
2623 Display program version and exit.
2624 @item --undelete
2625 Remove all deletion marks from the messages after opening the mailbox.
2626 @item --login-delay=@var{seconds}
2627 Sets the minimum allowed delay between closing a pop3d session and
2628 opening it again with the same user name.
2629 @item --stat-file=@var{filename}
2630 Sets the name of the login timestamp database, used with
2631 @option{--login-delay}. By default, these data are kept in
2632 @file{/var/run/pop3-login}. Be sure to specify the file name
2633 @emph{without} DBM-specific suffix.
2634 @end table
2635
2636 @page
2637 @node imap4d
2638 @section IMAP4 Daemon
2639 @pindex imap4d
2640
2641 @sc{gnu} @command{imap4d} is a daemon implementing @sc{imap4} rev1 protocol
2642 for accessing and handling electronic mail messages on a server. It can
2643 be run either as a standalone program or from @file{inetd.conf} file.
2644
2645 @menu
2646 * Namespace:: Namespace.
2647 * Starting imap4d:: Invocation Options.
2648 @end menu
2649
2650 @node Namespace
2651 @subsection Namespace
2652 @cindex namespace
2653 @cindex IMAP4 namespace
2654
2655 @sc{gnu} @command{imap4d} supports a notion of @dfn{namespaces} defined
2656 in RFC 2342. A namespace is a set of directories upon which the user
2657 has certain permissions. It should be understood that these permissions
2658 apply only if the underlying filesystem allows them.
2659
2660 The three namespaces supported by @command{imap4d} are:
2661
2662 @table @asis
2663 @item Personal Namespace
2664 A namespace that is within the personal scope of the authenticated user
2665 on a particular connection. The user has all permissions on this namespace.
2666
2667 @item Other Users' Namespace
2668 A namespace that consists of mailboxes from the ``Personal Namespaces''
2669 of other users. The user can read and list mailboxes from this
2670 namespace. However, he is not allowed to use @samp{%} and @samp{*}
2671 wildcards with @command{LIST} command, that is he can access a
2672 mailbox only if he knows exactly its location.
2673
2674 @item Shared Namespace
2675 A namespace that consists of mailboxes that are intended to be shared
2676 amongst users and do not exist within a user's Personal Namespace.
2677 The user has all permissions on this namespace.
2678 @end table
2679
2680 @noindent
2681 By default, @command{imap4d} starts with the following namespaces:
2682
2683 @table @asis
2684 @item Personal Namespace
2685 The home directory of the user, if exists.
2686
2687 @item Other Users' Namespace
2688 Empty
2689
2690 @item Shared Namespace
2691 Empty
2692 @end table
2693
2694 @emph{Note}, that this means that by default, a user won't be able to
2695 see or otherwise access mailboxes residing in the directories other than
2696 his own home.
2697
2698 To change these defaults, use @option{--shared-namespace} and
2699 @option{--other-namespace} options.
2700
2701 @node Starting imap4d
2702 @subsection Starting @command{imap4d}
2703
2704 @command{imap4d} may run either in @dfn{standalone} or in @dfn{inetd}
2705 operation modes. When run in ``standalone'' mode, the server disconnects
2706 from the terminal and runs as a daemon, forking a child for each new
2707 connection.
2708
2709 The ``inetd'' mode allows to start the server from
2710 @file{/etc/inetd.conf} file. This is the default operation mode.
2711
2712 @smallexample
2713 imap4 stream tcp nowait root /usr/local/sbin/imap4d imap4d
2714 @end smallexample
2715
2716 The program uses following option groups: @xref{mailbox},
2717 @xref{daemon}, @xref{logging}, @xref{auth}.
2718
2719 @subheading Command Line Options
2720
2721 @table @option
2722 @item -d[@var{number}]
2723 @itemx --daemon[=@var{number}]
2724 Run in standalone mode. An optional @var{number} specifies the maximum number
2725 of child processes the daemon is allowed to fork. When it is omitted,
2726 it defaults to 20 processes.
2727 @emph{Please note}, that there should be no whitespace between the
2728 @option{-d} and its parameter.
2729 @item -h
2730 @itemx --help
2731 Display short help message and exit.
2732 @item -i
2733 @itemx --inetd
2734 Run in inetd mode.
2735 @item -m @var{path}
2736 @itemx --mail-spool=@var{path}
2737 Set path to the mailspool directory
2738 @item -O @var{pathlist}
2739 @itemx --other-namespace=@var{pathlist}
2740 Set the list of directories forming the ``Other User's'' namespace.
2741 @var{pathlist} is a list of directory names separated by colons.
2742 @item -p @var{number}
2743 @itemx --port @var{number}
2744 Listen on given port @var{number}. This option is meaningful only in
2745 standalone mode. It defaults to port 143.
2746 @item -S @var{pathlist}
2747 @itemx --shared-namespace=@var{pathlist}
2748 Set the list of directories, forming the ``Shared''
2749 namespace. @var{pathlist} is a list of directory names separated by colons.
2750 @item -t @var{number}
2751 @itemx --timeout @var{number}
2752 Set idle timeout to given @var{number} of seconds. Default is 1800 seconds (30
2753 minutes). The daemon breaks the connection if it receives no commands
2754 from the client within that number of seconds.
2755 @item -v
2756 @itemx --version
2757 Display program version and exit.
2758 @end table
2759
2760 @page
2761 @node comsatd
2762 @section Comsat Daemon
2763 @pindex comsatd
2764
2765 Comsatd is the server which receives reports of incoming mail and
2766 notifies users, wishing to get this service. It can be started
2767 either from @file{inetd.conf} or as a standalone daemon.
2768
2769 @menu
2770 * Starting comsatd:: Invocation.
2771 * Configuring comsatd:: Configuration of @command{comsatd}.
2772 * dot.biffrc:: A per-user configuration file.
2773 @end menu
2774
2775 @node Starting comsatd
2776 @subsection Starting @command{comsatd}
2777
2778 @command{Comsatd} uses following option groups: @xref{mailbox},
2779 @xref{daemon}, @xref{logging}.
2780
2781 @table @option
2782 @item -c @var{file}
2783 @itemx --config @var{file}
2784 Read configuration from given @var{file}. For more information about
2785 comsatd configuration files, see @ref{Configuring comsatd}.
2786 @item -d
2787 @itemx --daemon
2788 Run as a standalone daemon.
2789 @item -i
2790 @itemx --inetd
2791 The server is started from @file{/etc/inetd.conf} file:
2792
2793 @smallexample
2794 comsat dgram udp wait root /usr/sbin/comsatd \
2795 comsatd -c /etc/comsat.conf
2796 @end smallexample
2797
2798 This is the default operation mode.
2799 @item -m @var{path}
2800 @itemx --mail-spool=@var{path}
2801 Set path to the mailspool directory
2802 @item -p @var{number}
2803 @itemx --port @var{number}
2804 Specify the port number to listen on. Default is 512.
2805 @item -v
2806 @itemx --version
2807 Output version and exit successfully.
2808 @item -h
2809 @itemx --help
2810 Display short help message and exit.
2811 @end table
2812
2813 @node Configuring comsatd
2814 @subsection Configuring @command{comsatd}
2815
2816 The configuration parameters for @command{comsatd} are kept in a single
2817 configuration file. The file uses line-oriented format: each line
2818 contains a single statement. Comments are introduced with the @samp{#}
2819 sign and empty lines are ignored. You can specify the configuration
2820 file to use by using @option{-c} or @option{--config} command line switch.
2801 2821
2802 The configuration file statements can logically be subdivided into 2822 The configuration file statements can logically be subdivided into
2803 @dfn{General Settings}, @dfn{Security Settings} and @dfn{Access Control 2823 @dfn{General Settings}, @dfn{Security Settings} and @dfn{Access Control
...@@ -2982,6 +3002,12 @@ $B(,5)\ ...@@ -2982,6 +3002,12 @@ $B(,5)\
2982 @end smallexample 3002 @end smallexample
2983 3003
2984 @page 3004 @page
3005 @node mh
3006 @section @acronym{MH} --- The MH Message Handling System
3007
3008 [FIXME]
3009
3010 @page
2985 @node mailutils-config 3011 @node mailutils-config
2986 @section @command{mailutils-config} --- Get the Information about the Mailutils Build 3012 @section @command{mailutils-config} --- Get the Information about the Mailutils Build
2987 @pindex mailutils-config 3013 @pindex mailutils-config
......