Commit dcbf8f35 dcbf8f353e76d506ecf7ae6c48081783166a82ab by Sergey Poznyakoff

Document mailbox types, variable extension, etc.

1 parent ad3cc340
...@@ -29,19 +29,19 @@ ...@@ -29,19 +29,19 @@
29 @end direntry 29 @end direntry
30 @dircategory Individual utilities 30 @dircategory Individual utilities
31 @direntry 31 @direntry
32 * comsatd: (mailutils)comsatd. Comsat Daemon. 32 * comsatd: (mailutils) comsatd. Comsat Daemon.
33 * frm: (mailutils)frm. List Headers from a Mailbox. 33 * frm: (mailutils) frm. List Headers from a Mailbox.
34 * guimb: (mailutils)guimb. Mailbox Processing Language. 34 * guimb: (mailutils) guimb. Mailbox Processing Language.
35 * imap4d: (mailutils)imap4d. IMAP4 Daemon. 35 * imap4d: (mailutils) imap4d. IMAP4 Daemon.
36 * mail: (mailutils)mail. Send and Receive Mail. 36 * mail: (mailutils) mail. Send and Receive Mail.
37 * maidag: (mailutils)maidag. A General-Purpose Mail Delivery Agent. 37 * maidag: (mailutils) maidag. A General-Purpose Mail Delivery Agent.
38 * messages: (mailutils)messages. Count Messages in a Mailbox. 38 * messages: (mailutils) messages. Count Messages in a Mailbox.
39 * movemail: (mailutils)movemail. Move Mail between Mailboxes. 39 * movemail: (mailutils) movemail. Move Mail between Mailboxes.
40 * pop3d: (mailutils)pop3d. POP3 Daemon. 40 * pop3d: (mailutils) pop3d. POP3 Daemon.
41 * readmsg: (mailutils)readmsg. Extract Messages from a Folder. 41 * readmsg: (mailutils) readmsg. Extract Messages from a Folder.
42 * sieve: (mailutils)sieve. Mail Filtering Utility. 42 * sieve: (mailutils) sieve. Mail Filtering Utility.
43 * mimeview: (mailutils)mimeview. View MIME Messages. 43 * mimeview: (mailutils) mimeview. View MIME Messages.
44 * mu: (mailutils)mu. Mailutils Multi-Purpose Tool 44 * mailutils: (mailutils) mailutils. Mailutils Multi-Purpose Tool
45 @end direntry 45 @end direntry
46 @end ifinfo 46 @end ifinfo
47 47
...@@ -87,6 +87,7 @@ This edition of the @cite{GNU Mailutils Manual}, last updated on ...@@ -87,6 +87,7 @@ This edition of the @cite{GNU Mailutils Manual}, last updated on
87 87
88 @menu 88 @menu
89 * Introduction:: Preliminary Information. 89 * Introduction:: Preliminary Information.
90 * Mailbox:: Mailboxes and URLs.
90 * Programs:: Mailutils Programs. 91 * Programs:: Mailutils Programs.
91 * Libraries:: Mailutils Libraries. 92 * Libraries:: Mailutils Libraries.
92 * Sieve Language:: The Sieve Language. 93 * Sieve Language:: The Sieve Language.
...@@ -143,7 +144,7 @@ Mailutils Programs ...@@ -143,7 +144,7 @@ Mailutils Programs
143 144
144 * mh:: The MH Message Handling System. 145 * mh:: The MH Message Handling System.
145 146
146 * mu:: Mailutils Multi-Purpose Tool. 147 * mailutils:: The Mailutils Multi-Purpose Tool.
147 148
148 Command Line 149 Command Line
149 150
...@@ -329,22 +330,24 @@ Major differences between Mailutils MH and other MH implementations ...@@ -329,22 +330,24 @@ Major differences between Mailutils MH and other MH implementations
329 330
330 MU 331 MU
331 332
332 * mu invocation syntax:: 333 * mailutils invocation syntax::
333 * mu help:: 334 * mailutils help::
334 * mu info:: 335 * mailutils info::
335 * mu cflags:: 336 * mailutils cflags::
336 * mu ldflags:: 337 * mailutils ldflags::
337 * mu query:: 338 * mailutils query::
338 * mu 2047:: 339 * mailutils 2047::
339 * mu filter:: 340 * mailutils filter::
340 * mu acl:: 341 * mailutils acl::
341 * mu wicket:: 342 * mailutils wicket::
342 * mu dbm:: 343 * mailutils dbm::
343 * mu logger:: 344 * mailutils logger::
344 * mu pop:: 345 * mailutils pop::
345 * mu imap:: 346 * mailutils imap::
346 347 * mailutils send::
347 mu dbm 348 * mailutils smtp::
349
350 mailutils dbm
348 351
349 * Create a Database:: 352 * Create a Database::
350 * Add Records to a Database:: 353 * Add Records to a Database::
...@@ -530,6 +533,344 @@ if a new format is added at a later date, your program will support ...@@ -530,6 +533,344 @@ if a new format is added at a later date, your program will support
530 that new format automatically as soon as it is compiled against the 533 that new format automatically as soon as it is compiled against the
531 new library. 534 new library.
532 535
536 @node Mailbox
537 @chapter Mailbox
538 @cindex mailbox URL
539 @cindex URL, mailbox
540
541 The principal object Mailutils operates on is @dfn{mailbox} --
542 a collection of mail messages. The two main characteristics of a
543 mailbox are its type and path. The @dfn{type} defines how the
544 messages are stored within a mailbox. The @dfn{path} specifies
545 the location of the mailbox. The two characteristics are usually
546 combined within a @dfn{Uniform Resource Locator} (@acronym{URL}),
547 which uniquely identifies the mailbox. The syntax for @acronym{URL}
548 is:
549
550 @example
551 @var{type}:[//[@var{user}:@var{password}@@]@var{host}[:@var{port}]]@var{path}[?@var{query}][;@var{params}]
552 @end example
553
554 The square brackets do not appear in a @acronym{URL}, instead they are
555 used to denote optional parts.
556
557 Not all parts are meaningful for all types. Their usage and purpose
558 are described in the sections that follow.
559
560 @menu
561 * Local Mailboxes:: Mailboxes stored on the local file system.
562 * Remote Mailboxes:: Mailboxes stored on remote hosts.
563 * SMTP Mailboxes:: Mailboxes that send mail.
564 * Program Mailboxes::
565 @end menu
566
567 @node Local Mailboxes
568 @section Local Mailboxes
569 @cindex local mailbox
570 @cindex mailbox, local
571 @cindex URL, local
572
573 @dfn{Local mailboxes} store mail in files on the local file system. A
574 local mailbox URL is:
575
576 @example
577 @var{type}://@var{path}[;@var{params}]
578 @end example
579
580 The @var{path} defines its location in the file system. For example:
581
582 @example
583 mbox:///var/spool/mail/gray
584 @end example
585
586 Optional @var{params} is a semicolon-separated list of optional
587 arguments that configures indexed directory structure. @xref{local
588 URL parameters}, for a detailed description.
589
590 The local mailbox types are:
591
592 @table @asis
593 @anchor{mbox}
594 @cindex mbox
595 @item mbox
596 A traditional UNIX mailbox format. Messages are stored sequentially
597 in a single file. Each message begins with a @samp{From} line,
598 identifying its sender and date when it was received. A single empty
599 line separates two adjacent messages.
600
601 This is the default format.
602
603 @cindex maildir
604 @item maildir
605 The @dfn{Maildir} mailbox format. Each message is kept in a separate
606 file with a unique name. Each mailbox is therefore a directory. This
607 mailbox format eliminates file locking and makes message access much
608 faster.
609
610 @cindex Bernstein, D. J.
611 This format was originally described by D.@: J.@: Bernstein in
612 @url{http://cr.yp.to/proto/maildir.html}.
613
614 @cindex mh
615 @item mh
616 MH Message Handling System format. Each message is kept in a separate
617 file named after its sequential numeric identifier within the mailbox.
618 Deleted messages are not removed, but instead the corresponding file
619 is renamed by prepending a comma to its original name. Each mailbox
620 is a directory. Mailboxes can be nested.
621
622 @cindex RAND Corporation
623 This format was originally developed by RAND Corporation. Mailutils
624 implementation is compatible both with the original implementation and
625 with its descendant @dfn{nmh}.
626
627 @cindex file, mailbox type
628 @item file
629 This type can be used when accessing an existing mailbox of any of the
630 formats defined above. The actual mailbox format is determined
631 automatically. This type is assumed when a mailbox is referred to by
632 its full pathname.
633 @end table
634
635 @node Remote Mailboxes
636 @section Remote Mailboxes
637 @cindex remote mailbox
638 @cindex mailbox, remote
639 @cindex URL, remote
640
641 @dfn{Remote mailboxes} are accessed via one of the remote message
642 protocols.
643
644 The basic remote mailbox types are:
645
646 @table @asis
647 @cindex pop, mailbox
648 @item pop
649 Remote mailbox accessed using the @dfn{Post Office Protocol}
650 (@acronym{POP3}). Default port number 110.
651
652 The URL is:
653
654 @example
655 pop://[@var{user}[:@var{pass}][;auth=+APOP]@@]@var{host}[:@var{port}][;notls]
656 @end example
657
658 The @var{host} gives the name or IP address of the host running a POP3
659 server. Optional @var{port} can be used to connect to a port other than
660 the default 110.
661
662 The @var{user} and @var{pass} supply authentication credentials. If any
663 of them is missing, Mailtils will first try to obtain it from the ticket
664 file. If that fails, the behavior depends on the type of the controlling
665 terminal. If the terminal is a tty device (i.e. the program accessing
666 the mailbox was started from the command line), it will ask the user
667 to supply the missing credentials. Otherwise it will issue an
668 appropriate error message and refuse to access the mailbox.
669
670 By default, the usual POP3 authentication is used. The @samp{auth=+APOP}
671 authentication parameter instructs Mailutils to use APOP authentication
672 instead.
673
674 If the server offers the STLS capability, Mailutils will attempt to
675 establish encrypted TLS connection. The @samp{notls} parameter
676 disables this behavior.
677
678 @cindex pops, mailbox
679 @item pops
680 Remote mailbox accessed using the @dfn{Post Office Protocol}
681 (@acronym{POP3}). The transmission channel is encrypted using the
682 @dfn{transport layer security} (@acronym{TLS}). The default port is 995.
683
684 The URL is:
685
686 @example
687 pops://[@var{user}[:@var{pass}][;auth=+APOP]@@]@var{host}[:@var{port}]
688 @end example
689
690 The meaning of its components is the same as for @samp{pop} type.
691
692 @cindex imap, mailbox
693 @item imap
694 Remote mailbox accessed via the @dfn{Internet Message Access
695 Protocol}. Default port number is 143.
696
697 The URL is:
698
699 @example
700 imap://[@var{user}[:@var{pass}]@var{host}[:@var{port}][;notls]
701 @end example
702
703 The @var{host} gives the name or IP address of the host running a IMAP4
704 server. Optional @var{port} can be used to connect to a port other than
705 the default 143.
706
707 The @var{user} and @var{pass} supply authentication credentials. If any
708 of them is missing, Mailtils will first try to obtain it from the ticket
709 file. If that fails, the behavior depends on the type of the controlling
710 terminal. If the terminal is a tty device (i.e. the program accessing
711 the mailbox was started from the command line), it will ask the user
712 to supply the missing credentials. Otherwise it will issue an
713 appropriate error message and refuse to access the mailbox.
714
715 If the server offers the STARTTLS capability, Mailutils will attempt to
716 establish encrypted TLS connection. The @samp{notls} parameter
717 disables this behavior.
718
719 @cindex imaps, mailbox
720 @item imaps
721
722 The @samp{imaps} type differs in that its transmission channel is
723 encrypted using the @dfn{transport layer security} (@acronym{TLS}).
724 The default port is 993.
725
726 The URL is:
727
728 @example
729 imaps://[@var{user}[:@var{pass}]@@]@var{host}[:@var{port}]
730 @end example
731
732 The meaning of its components is the same as for @samp{imap} type.
733 @end table
734
735 @node SMTP Mailboxes
736 @section SMTP Mailboxes
737 @cindex mailbox, SMTP
738 @cindex URL, SMTP
739
740 SMTP mailboxes types are special remote mailboxes that allow only
741 append operation. Appending a message is equivalent to sending it to
742 the given recipient or recipients.
743
744 @table @asis
745 @cindex smtp, mailbox
746 @item smtp
747 A remote mailbox accessed using the Simple Message Transfer Protocol.
748
749 The SMTP URL syntax is:
750
751 @example
752 smtp://[@var{user}[:@var{pass}][;auth=@var{mech},...]@@]@var{host}[:@var{port}][;@var{params}]
753 @end example
754
755 The @var{host} gives the name or IP address of the host running SMTP
756 server. Optional @var{port} can be used to connect to a port other than
757 the default 25.
758
759 The @var{user}, @var{pass}, and @samp{auth=} elements supply
760 credentials for ESMTP authentication, if the server supports it.
761
762 If the ESMTP authentication is used, Mailutils will select the best
763 authentication mechanism from the list offered by the server. To force
764 it to use a particular authentication mechanism, use the @samp{auth}
765 authentication parameter. Its value is a comma-separated list of
766 authentication mechanisms, in the order from the most to the least
767 preferred one, e.g.:
768
769 @example
770 smtp://smith:guessme;auth=cram-md5,digest-md5@@localhost
771 @end example
772
773 Optional @var{params} is a semicolon-separated list of additional
774 parameters. Valid parameters are:
775
776 @table @asis
777 @kwindex domain
778 @item domain=@var{string}
779 Append @samp{@@@var{string}} to those recipient addresses that lack
780 the domain part.
781
782 @kwindex from
783 @item from=@var{addr}
784 Use @var{addr} as sender address.
785
786 @kwindex noauth
787 @item noauth
788 Disable ESMTP authentication.
789
790 @kwindex notls
791 @item notls
792 Disable TLS.
793
794 @item recipient-headers[=@var{name}[,@var{name}...]]
795 Use the supplied header names to determine recipient addresses.
796 When no values are supplied, disables header scanning.
797
798 @kwindex strip-domain
799 @item strip-domain
800 Strip domain part from all recipient addresses.
801
802 @kwindex to
803 @item to=@var{addr}[,@var{addr}...]
804 Deliver messages to the supplied email addresses.
805 @end table
806
807 @cindex smtps, mailbox
808 @item smtps
809 A remote mailbox accessed using the Simple Message Transfer Protocol, with
810 the transmission channel encrypted using the @dfn{transport layer
811 security} (@acronym{TLS}). The default port is 465.
812
813 The URL is
814
815 @example
816 smtps://[@var{user}[:@var{pass}][;auth=@var{mech},...]@@]@var{host}[:@var{port}][;@var{params}]
817 @end example
818
819 See the @samp{smtp} type for a detailed description of its types.
820 The only difference from @samp{smtp} is that the @samp{notls}
821 parameter is not used.
822 @end table
823
824 @node Program Mailboxes
825 @section Program Mailboxes
826 @cindex mailbox, program
827 @cindex program mailbox
828
829 Program mailboxes support only append operation. Appending a message
830 is performed by invoking the specified program and passing the message
831 to its standard input stream.
832
833 @cindex URL, sendmail
834 @cindex sendmail, URL
835 A @samp{sendmail} mailbox is identified by the following URL:
836
837 @example
838 sendmail[://@var{path}]
839 @end example
840
841 The messages are sent by invoking @command{sendmail} binary with the
842 @option{-oi -t} options. If the message being appended has the
843 @samp{From:} header, its value is passed to @command{sendmail} using
844 the @option{-f} option.
845
846 The default path to the sendmail binary is system-dependent. The
847 @var{path} part can be used to specify it explicitly.
848
849 @cindex URL, prog
850 @cindex prog, URL
851 The @samp{prog} mailbox URL is:
852
853 @example
854 prog://@var{pathname}[?@var{query}]
855 @end example
856
857 Messages are appended by invoking the program @var{pathname} with the
858 arguments supplied by @var{query}. The latter is a list of words
859 delimited by @samp{&} characters.
860
861 Arguments can contain the following variables (@pxref{Variables}):
862
863 @table @asis
864 @kwindex sender
865 @item sender
866 Expands to the sender email address.
867
868 @kwindex rcpt
869 @item rcpt
870 Expands to comma-separated list of email addresses obtained from
871 @samp{To:}, @samp{Cc:} and @samp{Bcc:} headers of the message.
872 @end table
873
533 @node Programs 874 @node Programs
534 @chapter Mailutils Programs 875 @chapter Mailutils Programs
535 @cindex Programs 876 @cindex Programs
......
...@@ -42,7 +42,7 @@ syntax. ...@@ -42,7 +42,7 @@ syntax.
42 42
43 * mh:: The MH Message Handling System. 43 * mh:: The MH Message Handling System.
44 44
45 * mu:: Mailutils Multi-Purpose Tool. 45 * mailutils:: The Mailutils Multi-Purpose Tool.
46 @end menu 46 @end menu
47 47
48 @node command line 48 @node command line
...@@ -226,7 +226,7 @@ Do not load site-wide configuration file. ...@@ -226,7 +226,7 @@ Do not load site-wide configuration file.
226 Do not load user configuration file. 226 Do not load user configuration file.
227 227
228 @xopindex{set, introduced} 228 @xopindex{set, introduced}
229 @item --set=@var{path} 229 @item --set=@var{path}=@var{value}
230 Set configuration variable. 230 Set configuration variable.
231 @end table 231 @end table
232 232
...@@ -247,7 +247,7 @@ for the system configuration directory set when compiling the package. ...@@ -247,7 +247,7 @@ for the system configuration directory set when compiling the package.
247 You can obtain the value of @var{sysconfdir} by running 247 You can obtain the value of @var{sysconfdir} by running
248 248
249 @example 249 @example
250 $ mailutils-config --info sysconfdir 250 $ mailutils info sysconfdir
251 @end example 251 @end example
252 252
253 @noindent 253 @noindent
...@@ -281,7 +281,7 @@ command line option was given. ...@@ -281,7 +281,7 @@ command line option was given.
281 @end enumerate 281 @end enumerate
282 282
283 The order in which configuration files are loaded defines the 283 The order in which configuration files are loaded defines the
284 precedence of their settings. Thus, the settings from additional 284 precedence of their settings. Thus, settings from additional
285 configuration file override those set in per-user configuration file. 285 configuration file override those set in per-user configuration file.
286 The latter, in their turn, take precedence over the settings from the 286 The latter, in their turn, take precedence over the settings from the
287 site-wide configuration file. 287 site-wide configuration file.
...@@ -345,9 +345,10 @@ and to edit the @file{imap4d.rc} file with your editor of choice. ...@@ -345,9 +345,10 @@ and to edit the @file{imap4d.rc} file with your editor of choice.
345 @xopindex{set, described} 345 @xopindex{set, described}
346 It is also possible to set or override arbitrary configuration 346 It is also possible to set or override arbitrary configuration
347 variables in the command line. It can be done via the @option{--set} 347 variables in the command line. It can be done via the @option{--set}
348 option. Its argument is a @dfn{pathname} of the variable to be set. 348 option. Its argument is a @dfn{pathname} of the variable to be set,
349 For example, to define the variable @samp{syslog} in section 349 followed by an equals sign and value. For example, to define the
350 @samp{logging} to @samp{no}, do the following: 350 variable @samp{syslog} in section @samp{logging} to @samp{no}, do the
351 following:
351 352
352 @example 353 @example
353 $ imap4d --set .logging.syslog=no 354 $ imap4d --set .logging.syslog=no
...@@ -357,6 +358,7 @@ Configuration pathnames are discussed in detail in @ref{Paths}. ...@@ -357,6 +358,7 @@ Configuration pathnames are discussed in detail in @ref{Paths}.
357 358
358 @menu 359 @menu
359 * conf-syntax:: Configuration File Syntax 360 * conf-syntax:: Configuration File Syntax
361 * Variables:: Variable Expansion
360 * Include:: Include Statement 362 * Include:: Include Statement
361 * Logging Statement:: 363 * Logging Statement::
362 * Debug Statement:: 364 * Debug Statement::
...@@ -674,6 +676,52 @@ component separator, e.g.: ...@@ -674,6 +676,52 @@ component separator, e.g.:
674 .program="a.out".bar.baz 676 .program="a.out".bar.baz
675 @end example 677 @end example
676 678
679 @node Variables
680 @subsection Configuration Variables
681 @cindex variable expansion
682 @cindex macro variable
683 Certain configuration statements allow for the use of variable
684 references in their values. A variable reference has the form
685 @samp{$@var{variable}} or @samp{$@{@var{variable}@}}, where
686 @var{variable} is the variable name. It is expanded to the actual
687 value of @var{variable} when Mailutils consults the configuration
688 statement in question.
689
690 The two forms are entirely equivalent. The form with curly braces is
691 normally used if the variable name is immediately followed by an
692 alphanumeric symbol, which will otherwise be considered part of it.
693 This form also allows for specifying the action to take if the
694 variable is undefined or expands to an empty value.
695
696 During variable expansion, the forms below cause Mailutils to test
697 for a variable that is unset or null. Omitting the colon results
698 in a test only for a variable that is unset.
699
700 @table @asis
701 @item $@{@var{variable}:-@var{word}@}
702 @dfn{Use Default Values}. If @var{variable} is unset or null, the expansion
703 of @var{word} is substituted. Otherwise, the value of @var{variable} is
704 substituted.
705
706 @item $@{@var{variable}:=@var{word}@}
707 @dfn{Assign Default Values}. If @var{variable} is unset or null, the
708 expansion of @var{word} is assigned to variable. The value of
709 @var{variable} is then substituted.
710
711 @item $@{@var{variable}:?@var{word}@}
712 @dfn{Display Error if Null or Unset}. If @var{variable} is null or unset,
713 the expansion of @var{word} (or a message to that effect if @var{word} is
714 not present) is output to the current logging channel. Otherwise, the
715 value of @var{variable} is substituted.
716
717 @item $@{@var{variable}:+@var{word}@}
718 @dfn{Use Alternate Value}. If @var{variable} is null or unset, nothing is
719 substituted, otherwise the expansion of @var{word} is substituted.
720 @end table
721
722 The subsections below define variable names that are valid for use in
723 each configuration statement.
724
677 @node Include 725 @node Include
678 @subsection Include Statement 726 @subsection Include Statement
679 @cindex include statement, configuration file 727 @cindex include statement, configuration file
...@@ -710,13 +758,20 @@ file. Thus. @command{imap4d} will read ...@@ -710,13 +758,20 @@ file. Thus. @command{imap4d} will read
710 logging @{ 758 logging @{
711 # @r{Send diagnostics to syslog.} 759 # @r{Send diagnostics to syslog.}
712 syslog @var{boolean}; 760 syslog @var{boolean};
761
713 # @r{Print message severity levels.} 762 # @r{Print message severity levels.}
714 print-severity @var{boolean}; 763 print-severity @var{boolean};
764
715 # @r{Output only messages with a severity equal to or} 765 # @r{Output only messages with a severity equal to or}
716 # @r{greater than this one.} 766 # @r{greater than this one.}
717 severity @var{string}; 767 severity @var{string};
768
718 # @r{Set syslog facility.} 769 # @r{Set syslog facility.}
719 facility @var{name}; 770 facility @var{name};
771
772 # Log session ID
773 session-id @var{boolean};
774
720 # @r{Tag syslog messages with this string.} 775 # @r{Tag syslog messages with this string.}
721 tag @var{text}; 776 tag @var{text};
722 @} 777 @}
...@@ -732,10 +787,10 @@ syslog. Otherwise, it goes to the standard error. ...@@ -732,10 +787,10 @@ syslog. Otherwise, it goes to the standard error.
732 @end deffn 787 @end deffn
733 788
734 The default syslog facility is determined at compile time, it can be inspected 789 The default syslog facility is determined at compile time, it can be inspected
735 using the following command (@pxref{mu info}): 790 using the following command (@pxref{mailutils info}):
736 791
737 @example 792 @example
738 $ mu info log_facility 793 $ mailutils info log_facility
739 @end example 794 @end example
740 795
741 @anchor{syslog facility} 796 @anchor{syslog facility}
...@@ -761,6 +816,12 @@ one. Valid arguments are: @samp{debug}, @samp{info}, @samp{notice}, ...@@ -761,6 +816,12 @@ one. Valid arguments are: @samp{debug}, @samp{info}, @samp{notice},
761 @samp{warning}, @samp{error}, @samp{crit}, @samp{alert}, @samp{emerg}, 816 @samp{warning}, @samp{error}, @samp{crit}, @samp{alert}, @samp{emerg},
762 @end deffn 817 @end deffn
763 818
819 @deffn {Configuration} session-id bool
820 Print session ID with each diagnostic message. This is useful for
821 programs that handle multiple user sessions simultaneously, such as
822 @command{pop3d} and @command{imap4d}.
823 @end deffn
824
764 @node Debug Statement 825 @node Debug Statement
765 @subsection Debug Statement 826 @subsection Debug Statement
766 @kwindex debug 827 @kwindex debug
...@@ -769,18 +830,21 @@ one. Valid arguments are: @samp{debug}, @samp{info}, @samp{notice}, ...@@ -769,18 +830,21 @@ one. Valid arguments are: @samp{debug}, @samp{info}, @samp{notice},
769 debug @{ 830 debug @{
770 # @r{Set Mailutils debugging level.} 831 # @r{Set Mailutils debugging level.}
771 level @var{spec}; 832 level @var{spec};
833
772 # @r{Prefix debug messages with Mailutils source locations.} 834 # @r{Prefix debug messages with Mailutils source locations.}
773 line-info @var{bool}; 835 line-info @var{bool};
774 @} 836 @}
775 @end example 837 @end example
776 838
777 @subheading Description 839 @subheading Description
840 @kwindex level
778 The @samp{debug} statement controls the amount of additional debugging 841 The @samp{debug} statement controls the amount of additional debugging
779 information output by Mailutils programs. The @samp{level} statement 842 information output by Mailutils programs. The @samp{level} statement
780 enables additional debugging information. Its argument (@var{spec}) 843 enables additional debugging information. Its argument (@var{spec})
781 is a Mailutils debugging specification as described in 844 is a Mailutils debugging specification as described in
782 @ref{debugging}. 845 @ref{debugging}.
783 846
847 @kwindex line-info
784 The @samp{line-info} statement, when set to @samp{true} causes 848 The @samp{line-info} statement, when set to @samp{true} causes
785 debugging messages to be prefixed with locations in Mailutils source 849 debugging messages to be prefixed with locations in Mailutils source
786 files where they appear. Normally, only Mailutils developers need 850 files where they appear. Normally, only Mailutils developers need
...@@ -794,10 +858,13 @@ this option. ...@@ -794,10 +858,13 @@ this option.
794 mailbox @{ 858 mailbox @{
795 # @r{Use specified @var{url} as a mailspool.} 859 # @r{Use specified @var{url} as a mailspool.}
796 mail-spool @var{url}; 860 mail-spool @var{url};
861
797 # @r{Create mailbox @var{url} using @var{pattern}.} 862 # @r{Create mailbox @var{url} using @var{pattern}.}
798 mailbox-pattern @var{pattern}; 863 mailbox-pattern @var{pattern};
864
799 # @r{Default mailbox type.} 865 # @r{Default mailbox type.}
800 mailbox-type @var{type}; 866 mailbox-type @var{type};
867
801 # @r{Default user mail folder.} 868 # @r{Default user mail folder.}
802 folder @var{dir}; 869 folder @var{dir};
803 @} 870 @}
...@@ -821,34 +888,18 @@ Historically, @var{path} can contain mailbox type prefix, e.g.: ...@@ -821,34 +888,18 @@ Historically, @var{path} can contain mailbox type prefix, e.g.:
821 favor of @code{mailbox-pattern} statement. 888 favor of @code{mailbox-pattern} statement.
822 @end deffn 889 @end deffn
823 890
824 @deffn {Configuration} mailbox-pattern @var{pattern} 891 @deffn {Configuration} mailbox-pattern @var{url}
825 The @code{mailbox-pattern} statement is a modern way of configuring 892 The @code{mailbox-pattern} statement is a preferred way of configuring
826 mailbox locations. It supersedes @code{mail-spool} statement. 893 mailbox locations. It supersedes @code{mail-spool} statement.
827 894
828 The @var{pattern} is valid @dfn{mailbox URL}, which 895 The @var{url} is valid mailbox URL (@pxref{Mailbox}), which
829 may contain references to @samp{user} macro-variable 896 may contain references to the @samp{user} variable
830 (@FIXME-pxref{macro-variables}). This macro-variable will be expanded 897 (@pxref{Variables}). This variable will be expanded to the actual
831 to the actual user name. The full syntax for @var{pattern} is: 898 user name.
832
833 @example
834 [@var{type}://]@var{path}[;@var{args}]
835 @end example
836
837 @noindent
838 where:
839
840 @table @var
841 @item type
842 Specifies the mailbox type. It must be one of mailbox types,
843 supported by Mailutils. @FIXME-xref{Mailbox URLs}. By default,
844 @samp{local} is assumed. @FIXME{Verify this}.
845
846 @item path
847 The path pattern.
848 899
849 @item args 900 @anchor{local URL parameters}
850 A semicolon-separated list of optional arguments, configuring 901 Optional URL parameters can be used to configure indexed directory
851 indexed directory structure. 902 structure.
852 903
853 @cindex directory indexing 904 @cindex directory indexing
854 An @dfn{indexed directory structure} is a special way of storing 905 An @dfn{indexed directory structure} is a special way of storing
...@@ -930,8 +981,9 @@ Specifies indexing key. The only meaningful value, as of Mailutils ...@@ -930,8 +981,9 @@ Specifies indexing key. The only meaningful value, as of Mailutils
930 version @value{VERSION} is @samp{user=$@{user@}}. 981 version @value{VERSION} is @samp{user=$@{user@}}.
931 @end table 982 @end table
932 983
933 Let's assume the traditional mail layout, in which user incoming 984 Let's assume the traditional mail layout, in which incoming
934 mails are stored in UNIX mailbox format in @file{/var/mail} directory. 985 mails are stored in a UNIX mailbox named after the recipient user name
986 and located in @file{/var/mail} directory.
935 The @code{mailbox-pattern} for this case is: 987 The @code{mailbox-pattern} for this case is:
936 988
937 @example 989 @example
...@@ -948,12 +1000,11 @@ Now, if the layout is the same, but mailboxes are kept in ...@@ -948,12 +1000,11 @@ Now, if the layout is the same, but mailboxes are kept in
948 @end example 1000 @end example
949 1001
950 Finally, if the mailboxes are stored in a directly-indexed directory with 1002 Finally, if the mailboxes are stored in a directly-indexed directory with
951 two levels of indexing, than: 1003 two levels of indexing, the URL is:
952 1004
953 @example 1005 @example
954 mailbox-pattern "maildir:///var/mail;type=index;param=2;user=$@{user@}"; 1006 mailbox-pattern "maildir:///var/mail;type=index;param=2;user=$@{user@}";
955 @end example 1007 @end example
956 @end table
957 @end deffn 1008 @end deffn
958 1009
959 If neither @code{mailbox-pattern} nor @code{mail-spool} are given, the 1010 If neither @code{mailbox-pattern} nor @code{mail-spool} are given, the
...@@ -978,12 +1029,12 @@ time, using @samp{_PATH_MAILDIR} define from the include file ...@@ -978,12 +1029,12 @@ time, using @samp{_PATH_MAILDIR} define from the include file
978 Specifies type of mailboxes. By default, @samp{mbox} (UNIX mailbox) 1029 Specifies type of mailboxes. By default, @samp{mbox} (UNIX mailbox)
979 is assumed. This can be changed while configuring the package by 1030 is assumed. This can be changed while configuring the package by
980 setting @code{MU_DEFAULT_SCHEME} configuration variable. The default 1031 setting @code{MU_DEFAULT_SCHEME} configuration variable. The default
981 value can be verified by running @command{mailutils-config --info scheme}. 1032 value can be verified by running @command{mailutils info scheme}.
982 @end deffn 1033 @end deffn
983 1034
984 @deffn {Configuration} folder @var{dir} 1035 @deffn {Configuration} folder @var{dir}
985 @cindex plus expansion 1036 @cindex plus expansion
986 Sets user mail folder directory. Its value is using when expanding 1037 Sets user mail folder directory. Its value is used when expanding
987 @samp{plus-notation}, i.e. such mailbox names as @file{+inbox}. The 1038 @samp{plus-notation}, i.e. such mailbox names as @file{+inbox}. The
988 @samp{+} sign is replaced by @var{dir}, followed by a directory 1039 @samp{+} sign is replaced by @var{dir}, followed by a directory
989 separator (@samp{/}). 1040 separator (@samp{/}).
...@@ -1002,12 +1053,16 @@ The default folder name is @samp{Mail/}. ...@@ -1002,12 +1053,16 @@ The default folder name is @samp{Mail/}.
1002 locking @{ 1053 locking @{
1003 # @r{Default locker flags.} 1054 # @r{Default locker flags.}
1004 flags @var{arg}; 1055 flags @var{arg};
1056
1005 # @r{Set timeout for acquiring the lock.} 1057 # @r{Set timeout for acquiring the lock.}
1006 retry-timeout @var{arg}; 1058 retry-timeout @var{arg};
1059
1007 # @r{Set the maximum number of times to retry acquiring the lock.} 1060 # @r{Set the maximum number of times to retry acquiring the lock.}
1008 retry-count @var{number}; 1061 retry-count @var{number};
1062
1009 # @r{Expire locks older than this amount of time.} 1063 # @r{Expire locks older than this amount of time.}
1010 expire-timeout @var{number}; 1064 expire-timeout @var{number};
1065
1011 # @r{Use @var{prog} as external locker program.} 1066 # @r{Use @var{prog} as external locker program.}
1012 external-locker @var{prog}; 1067 external-locker @var{prog};
1013 @} 1068 @}
...@@ -1017,8 +1072,9 @@ locking @{ ...@@ -1017,8 +1072,9 @@ locking @{
1017 This block statement configures various parameters used when locking 1072 This block statement configures various parameters used when locking
1018 UNIX mailboxes in order to prevent simultaneous writes. 1073 UNIX mailboxes in order to prevent simultaneous writes.
1019 1074
1020 It is important to note, that locking applies only to maildrops in 1075 It is important to note, that locking applies only to traditional
1021 UNIX mailbox format. All other mailbox types do not require locking. 1076 UNIX mailboxes (@pxref{mbox}). All other
1077 mailbox types don't require locking.
1022 1078
1023 @deffn {Configuration} flags @var{string} 1079 @deffn {Configuration} flags @var{string}
1024 Set locking flags. Argument is a string consisting of one or more of 1080 Set locking flags. Argument is a string consisting of one or more of
...@@ -1086,19 +1142,16 @@ The mailer statement contains a single sub-statement: ...@@ -1086,19 +1142,16 @@ The mailer statement contains a single sub-statement:
1086 Set the mailer @acronym{URL}. 1142 Set the mailer @acronym{URL}.
1087 @end deffn 1143 @end deffn
1088 1144
1089 GNU Mailutils supports two types of mailer @acronym{URL}s, described 1145 GNU Mailutils supports three types of mailer @acronym{URL}s, described
1090 in the table below. As usual, square brackets indicate optional parts: 1146 in the table below:
1091 1147
1092 @table @asis 1148 @table @asis
1093 @item smtp://@var{host}[:@var{port}] 1149 @item smtp://[@var{user}[:@var{pass}][;auth=@var{mech},...]@@]@var{host}[:@var{port}][;@var{params}]
1094 Use an SMTP server @var{host} to send messages. Optional @var{port} 1150 @itemx smtps://[@var{user}[:@var{pass}][;auth=@var{mech},...]@@]@var{host}[:@var{port}][;@var{params}]
1095 specifies port number or symbolic name (as defined in 1151 Send messages using SMTP protocol. @xref{SMTP Mailboxes}, for a
1096 @file{/etc/services}). It defaults to 25. The @var{host} can be 1152 detailed description of the URL and its parts.
1097 specified as either an IP address in dotted-quad notation or as a 1153
1098 symbolic host name. In the latter case, DNS system will be used to 1154 @item sendmail[://@var{progname}]
1099 resolve it.
1100
1101 @item sendmail://@var{progname}
1102 Use sendmail-compatible program 1155 Use sendmail-compatible program
1103 @var{progname}. @dfn{Sendmail-compatible} means that the program must 1156 @var{progname}. @dfn{Sendmail-compatible} means that the program must
1104 support following command line options: 1157 support following command line options:
...@@ -1114,30 +1167,13 @@ Use @var{addr} as the sender address. ...@@ -1114,30 +1167,13 @@ Use @var{addr} as the sender address.
1114 Get recipient addresses from the message. 1167 Get recipient addresses from the message.
1115 @end table 1168 @end table
1116 1169
1117 @item sendmail: 1170 @xref{Program Mailboxes,,sendmail}, for details.
1118 This is a special form of the @samp{sendmail} mailer. It uses the
1119 @command{sendmail} binary from the @code{_PATH_SENDMAIL} macro in your
1120 @file{/usr/include/paths.h}. It is the default mailer.
1121 1171
1122 @item prog://@var{progname}?@var{query} 1172 @item prog://@var{progname}?@var{query}
1123 A @dfn{prog} mailer. This is a generalization of @samp{sendmail} 1173 A @dfn{prog} mailer. This is a generalization of @samp{sendmail}
1124 mailer that allows to use arbitrary external programs as mailers. 1174 mailer that allows to use arbitrary external programs as mailers.
1125 1175
1126 The @var{progname} must be a full pathname of the binary file. When 1176 It is described in detain in @ref{Program Mailboxes,,prog}.
1127 sending message, Mailutils will invoke this file with the arguments
1128 specified by @var{query} and will pipe the message to be sent to its
1129 standard input.
1130
1131 The @var{query} part is a list of arguments, separated by @samp{&}
1132 signs. Arguments may contain the following macro-substitutions:
1133
1134 @table @samp
1135 @item $@{sender@}
1136 Expands to the sender email address.
1137
1138 @item $@{rcpt@}
1139 Expands to the recipient email addresses.
1140 @end table
1141 @end table 1177 @end table
1142 1178
1143 @node ACL Statement 1179 @node ACL Statement
...@@ -1148,13 +1184,17 @@ Expands to the recipient email addresses. ...@@ -1148,13 +1184,17 @@ Expands to the recipient email addresses.
1148 acl @{ 1184 acl @{
1149 # @r{Allow connections from this IP address.} 1185 # @r{Allow connections from this IP address.}
1150 allow [from] @var{ip}; 1186 allow [from] @var{ip};
1187
1151 # @r{Deny connections from this IP address.} 1188 # @r{Deny connections from this IP address.}
1152 deny [from] @var{ip}; 1189 deny [from] @var{ip};
1190
1153 # @r{Log connections from this IP address.} 1191 # @r{Log connections from this IP address.}
1154 log [from] @var{ip} [@var{string}]; 1192 log [from] @var{ip} [@var{string}];
1193
1155 /* @r{Execute supplied program if a connection from this 1194 /* @r{Execute supplied program if a connection from this
1156 IP address is requested.} */ 1195 IP address is requested.} */
1157 exec [from] @var{ip} @var{program}; 1196 exec [from] @var{ip} @var{program};
1197
1158 /* Use @var{program} to decide whether to allow connection 1198 /* Use @var{program} to decide whether to allow connection
1159 from @var{ip}. */ 1199 from @var{ip}. */
1160 ifexec [from] @var{ip} @var{program}; 1200 ifexec [from] @var{ip} @var{program};
...@@ -1175,10 +1215,10 @@ know}, then the next control is tried. It is unclear whether to allow ...@@ -1175,10 +1215,10 @@ know}, then the next control is tried. It is unclear whether to allow
1175 access if the last control in list returned @samp{Don't know}. GNU 1215 access if the last control in list returned @samp{Don't know}. GNU
1176 Mailutils @value{VERSION} issues a warning message and allows access. 1216 Mailutils @value{VERSION} issues a warning message and allows access.
1177 This default may change in future versions. Users are advised to 1217 This default may change in future versions. Users are advised to
1178 write their ACLs so that the last control returns a definitive answer 1218 write their ACLs so that the last control returns a definite answer
1179 (either @code{True} or @code{False}). 1219 (either @code{True} or @code{False}).
1180 1220
1181 In the discussion below, wherever @var{ip} appears as an argument, it 1221 In the discussion below, wherever @var{cidr} appears as an argument, it
1182 can be replaced by any of: 1222 can be replaced by any of:
1183 1223
1184 @itemize @bullet 1224 @itemize @bullet
...@@ -1205,6 +1245,34 @@ Deny connections from IP addresses matching this @var{cidr} block. ...@@ -1205,6 +1245,34 @@ Deny connections from IP addresses matching this @var{cidr} block.
1205 When a connection from the @var{cidr} block is requested, execute 1245 When a connection from the @var{cidr} block is requested, execute
1206 the program @var{program}. If its exit code is @samp{0}, then allow 1246 the program @var{program}. If its exit code is @samp{0}, then allow
1207 connection. Otherwise, deny it. 1247 connection. Otherwise, deny it.
1248
1249 The @var{program} argument undergoes variable expansion and word
1250 splitting. The following variables are defined:
1251
1252 @table @code
1253 @item aclno
1254 Ordinal number of the control in the ACL. Numbers begin from
1255 @samp{1}.
1256
1257 @item family
1258 Connection family. Mailutils version @value{VERSION} supports the following
1259 families: @samp{AF_INET}, @samp{AF_INET6} and @samp{AF_UNIX}.
1260
1261 @item address
1262 Remote IP address (for @samp{AF_INET} and @samp{AF_INET6}) or socket name (for
1263 @samp{AF_UNIX}). Notice that most Unixes return empty string instead
1264 of the @samp{AF_UNIX} socket name, so do not rely on it.
1265
1266 @item port
1267 Remote port number (for @samp{AF_INET} and @samp{AF_INET6}).
1268 @end table
1269 @end deffn
1270
1271 @deffn {Configuration} exec [from] @var{cidr} @var{program}
1272 If a connection from the @var{cidr} block is requested, execute the given
1273 @var{program}. Do not wait for it to terminate, and ignore its exit
1274 code. The @var{program} is subject for variable expansion as in
1275 @samp{ifexec}.
1208 @end deffn 1276 @end deffn
1209 1277
1210 The following two controls are provided for logging purposes and as a 1278 The following two controls are provided for logging purposes and as a
...@@ -1229,27 +1297,8 @@ For connections over UNIX sockets. The socket name, if available, may ...@@ -1229,27 +1297,8 @@ For connections over UNIX sockets. The socket name, if available, may
1229 be printed before the closing curly brace. 1297 be printed before the closing curly brace.
1230 @end table 1298 @end table
1231 1299
1232 If the @var{string} is specified, it undergoes macro expansion and the 1300 If @var{string} is supplied, it undergoes variable expansions as
1233 result of it is used as the log entry. The following macro variables 1301 described for the @samp{ifexec}.
1234 are expanded:
1235
1236 @table @code
1237 @item aclno
1238 Ordinal number of the control in the ACL. Numbers begin from
1239 @samp{0}.
1240
1241 @item family
1242 Connection family. Mailutils version @value{VERSION} supports two
1243 families: @samp{AF_INET} and @samp{AF_UNIX}.
1244
1245 @item address
1246 Remote IP address (for @samp{AF_INET}) or socket name (for
1247 @samp{AF_UNIX}). Notice that most Unixes return empty string instead
1248 of the @samp{AF_UNIX} socket name, so do not rely on it.
1249
1250 @item port
1251 Remote port number (for @samp{AF_INET}).
1252 @end table
1253 1302
1254 For example, the following ACL makes a Mailutils server log every 1303 For example, the following ACL makes a Mailutils server log every
1255 incoming connection: 1304 incoming connection:
...@@ -1274,23 +1323,21 @@ its exit code. ...@@ -1274,23 +1323,21 @@ its exit code.
1274 1323
1275 @node Tcp-wrappers Statement 1324 @node Tcp-wrappers Statement
1276 @subsection Tcp-wrappers Statement 1325 @subsection Tcp-wrappers Statement
1277 @UNREVISED
1278 @kwindex tcp-wrappers 1326 @kwindex tcp-wrappers
1279 @subheading Syntax 1327 @subheading Syntax
1280 @example 1328 @example
1281 tcp-wrappers @{ 1329 tcp-wrappers @{
1282 # @r{Enable TCP wrapper access control.} 1330 # @r{Enable TCP wrapper access control.}
1283 enable @var{bool}; 1331 enable @var{bool};
1332
1284 # @r{Set daemon name for TCP wrapper lookups.} 1333 # @r{Set daemon name for TCP wrapper lookups.}
1285 daemon @var{name}; 1334 daemon @var{name};
1335
1286 # @r{Use @var{file} for positive client address access control.} 1336 # @r{Use @var{file} for positive client address access control.}
1287 allow-table @var{file}; 1337 allow-table @var{file};
1338
1288 # @r{Use file for negative client address access control.} 1339 # @r{Use file for negative client address access control.}
1289 deny-table @var{file}; 1340 deny-table @var{file};
1290 # @r{Log allowed accesses at this syslog priority.}
1291 allow-syslog-priority @var{prio};
1292 # @r{Log denied accesses at this syslog priority.}
1293 deny-syslog-priority @var{prio};
1294 @} 1341 @}
1295 @end example 1342 @end example
1296 1343
...@@ -1336,32 +1383,23 @@ Use @var{file} as negative table. By default, @file{/etc/hosts.deny} ...@@ -1336,32 +1383,23 @@ Use @var{file} as negative table. By default, @file{/etc/hosts.deny}
1336 is used. 1383 is used.
1337 @end deffn 1384 @end deffn
1338 1385
1339 @deffn {Configuration} allow-syslog-priority @var{prio};
1340 Log allowed accesses using syslog priority @var{prio}.
1341 @end deffn
1342
1343 @deffn {Configuration} deny-syslog-priority @var{prio};
1344 Log denied accesses using syslog priority @var{prio}.
1345 @end deffn
1346
1347 @node Server Settings 1386 @node Server Settings
1348 @subsection Server Settings 1387 @subsection Server Settings
1349 @UNREVISED
1350 @cindex server settings, configuration 1388 @cindex server settings, configuration
1351 @cindex configuring servers 1389 @cindex configuring servers
1352 GNU Mailutils offers several server applications: @command{pop3d}, 1390 GNU Mailutils offers several server applications: @command{pop3d},
1353 @command{imap4d}, @command{comsatd}, to name a few. Being quite 1391 @command{imap4d}, @command{comsatd}, to name a few. Being quite
1354 different in their purpose, they are very similar in some aspects of 1392 different in their purpose, they are very similar in some aspects of
1355 their architecture. First of all, they all support two operating 1393 their architecture. First of all, they all support two operating
1356 mode: a @dfn{daemon} mode, where a program disconnects from the controlling 1394 modes: @dfn{daemon}, where a program disconnects from the controlling
1357 terminal and works in background, and an @dfn{inetd} mode, where it 1395 terminal and works in background, and @dfn{inetd}, where it
1358 remains in foreground and communicates with the remote party via 1396 remains in foreground and communicates with the remote party via
1359 standard input and output streams. Secondly, when operating as 1397 standard input and output streams. Secondly, when operating as
1360 daemons, they listen to a preconfigured set of IP addresses and 1398 daemons, they listen to a preconfigured set of IP addresses and
1361 ports, reacting to requests that arrive. 1399 ports, reacting to requests that arrive.
1362 1400
1363 To configure these aspects of functionality, GNU Mailutils provides 1401 To configure these aspects of functionality, GNU Mailutils provides
1364 @dfn{Server Configuration Settings}, which we will describe in this 1402 @dfn{Server Configuration Settings}, which is describes in this
1365 subsection. 1403 subsection.
1366 1404
1367 @menu 1405 @menu
...@@ -1371,20 +1409,24 @@ subsection. ...@@ -1371,20 +1409,24 @@ subsection.
1371 1409
1372 @node General Server Configuration 1410 @node General Server Configuration
1373 @subsubsection General Server Configuration 1411 @subsubsection General Server Configuration
1374 @UNREVISED
1375 @cindex server configuration, general 1412 @cindex server configuration, general
1376 @* Syntax: 1413 @* Syntax:
1377 @example 1414 @example
1378 # @r{Set daemon mode.} 1415 # @r{Set daemon mode.}
1379 mode @samp{inetd|daemon}; 1416 mode @samp{inetd|daemon};
1417
1380 # @r{Run in foreground.} 1418 # @r{Run in foreground.}
1381 foreground @var{bool}; 1419 foreground @var{bool};
1420
1382 # @r{Maximum number of children processes to run simultaneously.} 1421 # @r{Maximum number of children processes to run simultaneously.}
1383 max-children @var{number}; 1422 max-children @var{number};
1423
1384 # @r{Store PID of the master process in @var{file}.} 1424 # @r{Store PID of the master process in @var{file}.}
1385 pidfile @var{file}; 1425 pidfile @var{file};
1426
1386 # @r{Default port number.} 1427 # @r{Default port number.}
1387 port @var{portspec}; 1428 port @var{portspec};
1429
1388 # @r{Set idle timeout.} 1430 # @r{Set idle timeout.}
1389 timeout @var{time}; 1431 timeout @var{time};
1390 @end example 1432 @end example
...@@ -1414,7 +1456,7 @@ Operate as a subprocess of UNIX internet super-server program, ...@@ -1414,7 +1456,7 @@ Operate as a subprocess of UNIX internet super-server program,
1414 @command{inetd}. @xref{Internet super-server,,,inetd(8), inetd(8) man 1456 @command{inetd}. @xref{Internet super-server,,,inetd(8), inetd(8) man
1415 page}, for a detailed description of the operation of @command{inetd} 1457 page}, for a detailed description of the operation of @command{inetd}
1416 and its configuration. In this case it is @command{inetd} that 1458 and its configuration. In this case it is @command{inetd} that
1417 controls all major connectivity aspects, the Mailutils server itself 1459 controls all major connectivity aspects. The Mailutils server program
1418 communicates with it via standard input and output streams. 1460 communicates with it via standard input and output streams.
1419 1461
1420 For historical reasons, this mode is the default, if no @code{mode} 1462 For historical reasons, this mode is the default, if no @code{mode}
...@@ -1454,7 +1496,7 @@ services(5), services(5) man page}). ...@@ -1454,7 +1496,7 @@ services(5), services(5) man page}).
1454 @end deffn 1496 @end deffn
1455 1497
1456 @deffn {Configuration} timeout @var{time}; 1498 @deffn {Configuration} timeout @var{time};
1457 Set maximum idle time out in seconds. If a client does not send any 1499 Sets maximum idle time out in seconds. If a client does not send any
1458 requests during @var{time} seconds, the child process terminates. 1500 requests during @var{time} seconds, the child process terminates.
1459 @end deffn 1501 @end deffn
1460 1502
...@@ -1468,31 +1510,38 @@ requests during @var{time} seconds, the child process terminates. ...@@ -1468,31 +1510,38 @@ requests during @var{time} seconds, the child process terminates.
1468 server @var{ipaddr}[:@var{port}] @{ 1510 server @var{ipaddr}[:@var{port}] @{
1469 # @r{Run this server as a single process.} 1511 # @r{Run this server as a single process.}
1470 single-process @var{bool}; 1512 single-process @var{bool};
1513
1471 # @r{Log the session transcript.} 1514 # @r{Log the session transcript.}
1472 transcript @var{bool}; 1515 transcript @var{bool};
1516
1473 # @r{Set idle timeout.} 1517 # @r{Set idle timeout.}
1474 timeout @var{time}; 1518 timeout @var{time};
1519
1520 # @r{Kind of TLS encryption to use for this server.}
1521 tls @samp{no}|@samp{ondemand}|@samp{required}|@samp{connection};
1522
1475 # @r{Set server specific ACLs.} 1523 # @r{Set server specific ACLs.}
1476 acl @{ /* @xref{ACL Statement}. */ @}; 1524 acl @{ /* @xref{ACL Statement}. */ @};
1477 @} 1525 @}
1478 @end example 1526 @end example
1479 1527
1480 @* Description: 1528 @* Description:
1529
1481 The @code{server} block statement configures a single TCP or UDP 1530 The @code{server} block statement configures a single TCP or UDP
1482 server. It takes effect only in daemon mode (@pxref{server mode}). 1531 server. It takes effect only in daemon mode (@pxref{server mode}).
1483 The argument to this statement specifies the IP address, and, 1532 The argument to this statement specifies the IP address, and,
1484 optionally, the port, to listen on for requests. The @var{ipaddr} 1533 optionally, the port, to listen on for requests. The @var{ipaddr}
1485 part is either an IPv4 address in dotted-quad form, or a symbolic host 1534 part is either an IPv4 address in dotted-quad form, or a IPv6 address
1486 name which can be resolved to such an address via DNS. Specifying 1535 enclosed in square brackets, or a symbolic host name which can be
1487 @samp{0.0.0.0} as the @var{ipaddr} means listen on all available 1536 resolved to such an address. Specifying @samp{0.0.0.0} as the
1488 network interfaces. The @var{port} argument is either a port number 1537 @var{ipaddr} means listen on all available network interfaces. The
1489 in decimal, or a symbolic service name, as listed in 1538 @var{port} argument is either a port number in decimal, or a symbolic
1490 @file{/etc/services} (@pxref{Internet network services 1539 service name, as listed in @file{/etc/services} (@pxref{Internet
1491 list,,,services(5), services(5) man page}). If @var{port} is omitted, 1540 network services list,,,services(5), services(5) man page}). If
1492 Mailutils uses the port set by @code{port} statement (@pxref{General 1541 @var{port} is omitted, Mailutils uses the port set by @code{port}
1493 Server Configuration, port}), or, in its absence, the default port 1542 statement (@pxref{General Server Configuration, port}), or, in its
1494 number, which depends on a server being used (e.g. 110, for 1543 absence, the default port number, which depends on a server being used
1495 @command{pop3d}, 143, for @command{imap4d}, etc.). 1544 (e.g. 110, for @command{pop3d}, 143, for @command{imap4d}, etc.).
1496 1545
1497 Any number of @code{server} statements may be specified in a single 1546 Any number of @code{server} statements may be specified in a single
1498 configuration file, allowing to set up the same service on several IP 1547 configuration file, allowing to set up the same service on several IP
...@@ -1521,6 +1570,31 @@ Set idle timeout for this server. This overrides global timeout ...@@ -1521,6 +1570,31 @@ Set idle timeout for this server. This overrides global timeout
1521 settings (@pxref{General Server Configuration, timeout}). 1570 settings (@pxref{General Server Configuration, timeout}).
1522 @end deffn 1571 @end deffn
1523 1572
1573 @deffn {Configuration} tls @var{mode};
1574 Configure the use of TLS encryption. The @var{mode} argument is one
1575 of the following:
1576
1577 @table @asis
1578 @item no
1579 TLS is not used. The corresponding command (@command{STLS}, for POP3,
1580 @command{STARTTLS}, for @command{IMAP4}) won't be available even if
1581 the TLS configuration is otherwise complete.
1582
1583 @item ondemand
1584 TLS is initiated when the user issues the appropriate command.
1585 This is the default when TLS is configured.
1586
1587 @item required
1588 Same as above, but the use of TLS is mandatory. The authentication
1589 state is entered only after TLS negotiation has succeeded.
1590
1591 @item connection
1592 TLS is always forced when the connection is established. For
1593 @command{pop3d} this means using POP3S protocol (or IMAP4S, for
1594 @command{imap4d}).
1595 @end table
1596 @end deffn
1597
1524 @deffn {Configuration} acl 1598 @deffn {Configuration} acl
1525 This statement defines a per-server Access Control List. Its syntax 1599 This statement defines a per-server Access Control List. Its syntax
1526 is as described in @ref{ACL Statement}. Per-server ACLs complement, 1600 is as described in @ref{ACL Statement}. Per-server ACLs complement,
...@@ -1831,8 +1905,8 @@ assignment. For example: ...@@ -1831,8 +1905,8 @@ assignment. For example:
1831 "Service-Type = Authenticate-Only, NAS-Identifier = \"mail\"" 1905 "Service-Type = Authenticate-Only, NAS-Identifier = \"mail\""
1832 @end example 1906 @end example
1833 1907
1834 An assignment may contain references to the following macro-variables 1908 The assignment may contain references to the following variables
1835 (@FIXME-pxref{macro-variables}): 1909 (@pxref{Variables}):
1836 1910
1837 @table @asis 1911 @table @asis
1838 @item user 1912 @item user
...@@ -4660,7 +4734,7 @@ diagnostic messages issued by the program. By default, program ...@@ -4660,7 +4734,7 @@ diagnostic messages issued by the program. By default, program
4660 name is used. 4734 name is used.
4661 4735
4662 The @var{fmt} is a format string that may contain references to the 4736 The @var{fmt} is a format string that may contain references to the
4663 following macro variables (@FIXME-pxref{macro-variables}): 4737 following variables (@pxref{Variables}):
4664 4738
4665 @table @code 4739 @table @code
4666 @item progname 4740 @item progname
...@@ -4669,25 +4743,25 @@ The program name. ...@@ -4669,25 +4743,25 @@ The program name.
4669 @item source 4743 @item source
4670 URL of the source mailbox. 4744 URL of the source mailbox.
4671 4745
4672 @item source:user 4746 @item source_user
4673 User part of the source mailbox URL. 4747 User part of the source mailbox URL.
4674 4748
4675 @item source:host 4749 @item source_host
4676 Host part of the source mailbox URL. 4750 Host part of the source mailbox URL.
4677 4751
4678 @item source:path 4752 @item source_path
4679 Path part of the source mailbox URL. 4753 Path part of the source mailbox URL.
4680 4754
4681 @item dest 4755 @item dest
4682 URL of the destination mailbox 4756 URL of the destination mailbox
4683 4757
4684 @item dest:user 4758 @item dest_user
4685 User part of the destination mailbox URL. 4759 User part of the destination mailbox URL.
4686 4760
4687 @item dest:host 4761 @item dest_host
4688 Host part of the destination mailbox URL. 4762 Host part of the destination mailbox URL.
4689 4763
4690 @item dest:path 4764 @item dest_path
4691 Path part of the destination mailbox URL. 4765 Path part of the destination mailbox URL.
4692 @end table 4766 @end table
4693 4767
...@@ -7167,41 +7241,43 @@ $B(,5)\ ...@@ -7167,41 +7241,43 @@ $B(,5)\
7167 @include mu-mh.texi 7241 @include mu-mh.texi
7168 7242
7169 @page 7243 @page
7170 @node mu 7244 @node mailutils
7171 @section MU 7245 @section mailutils
7172 @pindex mu 7246 @pindex mailutils
7173 The @command{mu} utility is a multi-purpose tool shipped with 7247 The @command{mailutils} utility is a multi-purpose tool shipped with
7174 Mailutils. It can be used for various mail- and database-related 7248 Mailutils. It can be used for various mail and database-related
7175 tasks, as well as an auxiliary tool for compiling and linking programs 7249 tasks, as well as an auxiliary tool for compiling and linking programs
7176 with Mailutils. 7250 with Mailutils.
7177 7251
7178 @menu 7252 @menu
7179 * mu invocation syntax:: 7253 * mailutils invocation syntax::
7180 * mu help:: 7254 * mailutils help:: Display a terse help summary.
7181 * mu info:: 7255 * mailutils info:: Show Mailutils configuration.
7182 * mu cflags:: 7256 * mailutils cflags:: Show compiler options.
7183 * mu ldflags:: 7257 * mailutils ldflags:: List libraries required to link.
7184 * mu query:: 7258 * mailutils query:: Query configuration values.
7185 * mu 2047:: 7259 * mailutils 2047:: Decode/encode email message headers.
7186 * mu filter:: 7260 * mailutils filter:: Apply a chain of filters to the input.
7187 * mu acl:: 7261 * mailutils acl:: Test access control lists.
7188 * mu wicket:: 7262 * mailutils wicket:: Scan wickets for matching URLs.
7189 * mu dbm:: 7263 * mailutils dbm:: DBM management tool.
7190 * mu logger:: 7264 * mailutils logger:: Log data using Mailutils log facility.
7191 * mu pop:: 7265 * mailutils pop:: POP3 client shell.
7192 * mu imap:: 7266 * mailutils imap:: IMAP4 client shell.
7267 * mailutils send:: Send a message.
7268 * mailutils smtp:: Run a SMTP session.
7193 @end menu 7269 @end menu
7194 7270
7195 @node mu invocation syntax 7271 @node mailutils invocation syntax
7196 @subsection Invocation Syntax 7272 @subsection Invocation Syntax
7197 @command{Mu} is a command line tool. Its invocation syntax is: 7273 @command{Mailutils} is a command line tool. Its invocation syntax is:
7198 7274
7199 @example 7275 @example
7200 mu [@var{options}] @var{command} [@var{args}] 7276 mailutils [@var{options}] @var{command} [@var{args}]
7201 @end example 7277 @end example
7202 7278
7203 where @var{options} are options that affect the behavior of 7279 where @var{options} are options that affect the behavior of
7204 @command{mu} as a whole, @var{command} instructs it what it is to do 7280 @command{mailutils} as a whole, @var{command} instructs it what it is to do
7205 and @var{args} are any arguments the @var{command} needs in order to be 7281 and @var{args} are any arguments the @var{command} needs in order to be
7206 executed. 7282 executed.
7207 7283
...@@ -7236,32 +7312,32 @@ Queries configuration values. ...@@ -7236,32 +7312,32 @@ Queries configuration values.
7236 Scans wicket for matching URLs 7312 Scans wicket for matching URLs
7237 @end table 7313 @end table
7238 7314
7239 @node mu help 7315 @node mailutils help
7240 @subsection mu help 7316 @subsection mailutils help
7241 The @command{mu help} command lists all available options and command 7317 The @command{mailutils help} command lists all available options and command
7242 names along with short descriptions of what each of them does. It is 7318 names along with short descriptions of what each of them does. It is
7243 similar to the @command{mu --help} option. 7319 similar to the @command{mailutils --help} option.
7244 7320
7245 A command name can be supplied as an argument to 7321 A command name can be supplied as an argument to
7246 @command{help}, in which case it will display a help page for that 7322 @command{help}, in which case it will display a help page for that
7247 particular command, e.g.: 7323 particular command, e.g.:
7248 7324
7249 @example 7325 @example
7250 mu help ldflags 7326 mailutils help ldflags
7251 @end example 7327 @end example
7252 7328
7253 will output help for the @command{ldflags} command. It is synonymous 7329 will output help for the @command{ldflags} command. It is synonymous
7254 to the @option{--help} option used with that particular command, e.g.: 7330 to the @option{--help} option used with that particular command, e.g.:
7255 @command{mu ldflags --help}. 7331 @command{mailutils ldflags --help}.
7256 7332
7257 @node mu info 7333 @node mailutils info
7258 @subsection mu info 7334 @subsection mailutils info
7259 The @command{mu info} command displays information about Mailutils 7335 The @command{mailutils info} command displays information about Mailutils
7260 compile-time configuration. In normal form its output lists a single 7336 compile-time configuration. In normal form its output lists a single
7261 configuration flag per line, e.g.: 7337 configuration flag per line, e.g.:
7262 7338
7263 @example 7339 @example
7264 $ mu info 7340 $ mailutils info
7265 VERSION=2.99.93 7341 VERSION=2.99.93
7266 SYSCONFDIR=/etc 7342 SYSCONFDIR=/etc
7267 MAILSPOOLDIR=/var/mail/ 7343 MAILSPOOLDIR=/var/mail/
...@@ -7283,13 +7359,13 @@ particular value used by default for that feature. For example, ...@@ -7283,13 +7359,13 @@ particular value used by default for that feature. For example,
7283 whereas @samp{SYSCONFDIR=/etc} means that the default place for 7359 whereas @samp{SYSCONFDIR=/etc} means that the default place for
7284 configuration files is in @file{/etc} directory. 7360 configuration files is in @file{/etc} directory.
7285 7361
7286 Such short output is convenient for using @command{mu info} in scripts 7362 Such short output is convenient for using @command{mailutils info} in scripts
7287 to decide whether it is possible to use a given feature. To assist 7363 to decide whether it is possible to use a given feature. To assist
7288 human users, the @option{--verbose} (@option{-v}) option is provided. 7364 human users, the @option{--verbose} (@option{-v}) option is provided.
7289 It prints a short description next to each flag: 7365 It prints a short description next to each flag:
7290 7366
7291 @example 7367 @example
7292 $ mu info --verbose 7368 $ mailutils info --verbose
7293 VERSION=2.99.93 - Version of this package 7369 VERSION=2.99.93 - Version of this package
7294 SYSCONFDIR=/etc - System configuration directory 7370 SYSCONFDIR=/etc - System configuration directory
7295 MAILSPOOLDIR=/var/mail/ - Default mail spool directory 7371 MAILSPOOLDIR=/var/mail/ - Default mail spool directory
...@@ -7303,19 +7379,19 @@ WITH_GNUTLS - TLS support using GNU TLS ...@@ -7303,19 +7379,19 @@ WITH_GNUTLS - TLS support using GNU TLS
7303 WITH_GSASL - SASL support using GNU SASL 7379 WITH_GSASL - SASL support using GNU SASL
7304 @end example 7380 @end example
7305 7381
7306 @node mu cflags 7382 @node mailutils cflags
7307 @subsection mu cflags 7383 @subsection mailutils cflags
7308 The @command{mu cflags} command shows compiler options needed to 7384 The @command{mailutils cflags} command shows compiler options needed to
7309 compile a C source with Mailutils. It is intended for use in 7385 compile a C source with Mailutils. It is intended for use in
7310 configuration scripts and Makefiles, e.g.: 7386 configuration scripts and Makefiles, e.g.:
7311 7387
7312 @example 7388 @example
7313 CFLAGS=-g -O2 `mu cflags` 7389 CFLAGS=-g -O2 `mailutils cflags`
7314 @end example 7390 @end example
7315 7391
7316 @node mu ldflags 7392 @node mailutils ldflags
7317 @subsection mu ldflags 7393 @subsection mailutils ldflags
7318 The @command{mu ldflags} command is a counterpart of @command{cflags} 7394 The @command{mailutils ldflags} command is a counterpart of @command{cflags}
7319 which is used for linking. It constructs a @command{ld} command line 7395 which is used for linking. It constructs a @command{ld} command line
7320 for linking a program with Mailutils. 7396 for linking a program with Mailutils.
7321 7397
...@@ -7323,7 +7399,7 @@ When used without arguments, it outputs @command{ld} arguments which ...@@ -7323,7 +7399,7 @@ When used without arguments, it outputs @command{ld} arguments which
7323 would link only with the core Mailutils library @file{libmailutils}, e.g.: 7399 would link only with the core Mailutils library @file{libmailutils}, e.g.:
7324 7400
7325 @example 7401 @example
7326 $ mu ldflags 7402 $ mailutils ldflags
7327 -L/usr/local/lib -lmailutils 7403 -L/usr/local/lib -lmailutils
7328 @end example 7404 @end example
7329 7405
...@@ -7332,7 +7408,7 @@ particular subset of Mailutils libraries to link with. In particular, ...@@ -7332,7 +7408,7 @@ particular subset of Mailutils libraries to link with. In particular,
7332 the argument @samp{all} instructs it to link in all available libraries: 7408 the argument @samp{all} instructs it to link in all available libraries:
7333 7409
7334 @example 7410 @example
7335 $ mu ldflags all 7411 $ mailutils ldflags all
7336 -L/usr/local/lib -lmu_mbox -lmu_mh -lmu_maildir -lmu_imap -lmu_pop \ 7412 -L/usr/local/lib -lmu_mbox -lmu_mh -lmu_maildir -lmu_imap -lmu_pop \
7337 -lmu_mailer -lmu_compat -lmailutils -lmu_auth -lgsasl -lgnutls -lgcrypt \ 7413 -lmu_mailer -lmu_compat -lmailutils -lmu_auth -lgsasl -lgnutls -lgcrypt \
7338 -lldap -lgnuradius -lpam -ldl 7414 -lldap -lgnuradius -lpam -ldl
...@@ -7373,9 +7449,9 @@ Link in the Mailutils configuration library. ...@@ -7373,9 +7449,9 @@ Link in the Mailutils configuration library.
7373 Link in the library for command line parsing. 7449 Link in the library for command line parsing.
7374 @end table 7450 @end table
7375 7451
7376 @node mu query 7452 @node mailutils query
7377 @subsection mu query 7453 @subsection mailutils query
7378 The @command{mu query} command queries values from Mailutils 7454 The @command{mailutils query} command queries values from Mailutils
7379 configuration files. It takes one or more configuration paths 7455 configuration files. It takes one or more configuration paths
7380 (@pxref{Paths}) as its arguments. On output, it displays the values 7456 (@pxref{Paths}) as its arguments. On output, it displays the values
7381 it found, each value on a separate line. If the requested value is a 7457 it found, each value on a separate line. If the requested value is a
...@@ -7392,12 +7468,12 @@ logging @{ ...@@ -7392,12 +7468,12 @@ logging @{
7392 Then: 7468 Then:
7393 7469
7394 @example 7470 @example
7395 $ mu query .logging.syslog 7471 $ mailutils query .logging.syslog
7396 syslog yes; 7472 syslog yes;
7397 $ mu query .logging.syslog .logging.facility 7473 $ mailutils query .logging.syslog .logging.facility
7398 syslog yes; 7474 syslog yes;
7399 facility mail; 7475 facility mail;
7400 $ mu query .logging 7476 $ mailutils query .logging
7401 logging @{ 7477 logging @{
7402 syslog yes; 7478 syslog yes;
7403 facility mail; 7479 facility mail;
...@@ -7408,7 +7484,7 @@ Several command line options allow to modify output format. The ...@@ -7408,7 +7484,7 @@ Several command line options allow to modify output format. The
7408 @option{--value} option instructs the command to output only values: 7484 @option{--value} option instructs the command to output only values:
7409 7485
7410 @example 7486 @example
7411 $ mu query --value .logging.syslog 7487 $ mailutils query --value .logging.syslog
7412 yes 7488 yes
7413 @end example 7489 @end example
7414 7490
...@@ -7416,32 +7492,32 @@ The @option{--path} option instructs it to print full pathnames for ...@@ -7416,32 +7492,32 @@ The @option{--path} option instructs it to print full pathnames for
7416 each value: 7492 each value:
7417 7493
7418 @example 7494 @example
7419 $ mu query --path .logging.syslog 7495 $ mailutils query --path .logging.syslog
7420 logging.syslog: yes 7496 logging.syslog: yes
7421 @end example 7497 @end example
7422 7498
7423 The @option{--program} option instructs @command{mu} to behave as if 7499 The @option{--program} option instructs @command{mailutils} to behave as if
7424 it was called under another program name. For example, the following 7500 it was called under another program name. For example, the following
7425 command: 7501 command:
7426 7502
7427 @example 7503 @example
7428 $ mu query --program=pop3d .server.transcript 7504 $ mailutils query --program=pop3d .server.transcript
7429 @end example 7505 @end example
7430 7506
7431 will return the value of the @samp{.server.transcript} statement which 7507 will return the value of the @samp{.server.transcript} statement which
7432 the @command{pop3d} utility would see. 7508 the @command{pop3d} utility would see.
7433 7509
7434 By default, @command{mu query} operates on the main configuration 7510 By default, @command{mailutils query} operates on the main configuration
7435 file. Another configuration file can be supplied using the 7511 file. Another configuration file can be supplied using the
7436 @option{--file} (@option{-f}) option: 7512 @option{--file} (@option{-f}) option:
7437 7513
7438 @example 7514 @example
7439 $ mu query --file /usr/local/etc/file.conf .pidfile 7515 $ mailutils query --file /usr/local/etc/file.conf .pidfile
7440 @end example 7516 @end example
7441 7517
7442 @node mu 2047 7518 @node mailutils 2047
7443 @subsection mu 2047 7519 @subsection mailutils 2047
7444 The @command{mu 2047} command is a filter for decoding or encoding 7520 The @command{mailutils 2047} command is a filter for decoding or encoding
7445 email message headers formatted in accordance with RFC 2047 (see 7521 email message headers formatted in accordance with RFC 2047 (see
7446 @uref{http://www.faqs.org/rfcs/rfc2047.html}. By default, it operates 7522 @uref{http://www.faqs.org/rfcs/rfc2047.html}. By default, it operates
7447 in encode mode and assumes the @samp{iso-8859-1} encoding. If 7523 in encode mode and assumes the @samp{iso-8859-1} encoding. If
...@@ -7453,7 +7529,7 @@ standard output. ...@@ -7453,7 +7529,7 @@ standard output.
7453 For example: 7529 For example:
7454 7530
7455 @example 7531 @example
7456 $ mu 2047 'Keld J@o{}rn Simonsen <keld@@dkuug.dk>' 7532 $ mailutils 2047 'Keld J@o{}rn Simonsen <keld@@dkuug.dk>'
7457 =?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= <keld@@dkuug.dk> 7533 =?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= <keld@@dkuug.dk>
7458 @end example 7534 @end example
7459 7535
...@@ -7461,7 +7537,7 @@ The decode mode can be requested via the @option{--decode} ...@@ -7461,7 +7537,7 @@ The decode mode can be requested via the @option{--decode}
7461 (@option{-d}) option: 7537 (@option{-d}) option:
7462 7538
7463 @example 7539 @example
7464 $ mu 2047 --decode '=?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= \ 7540 $ mailutils 2047 --decode '=?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= \
7465 <keld@@dkuug.dk>' 7541 <keld@@dkuug.dk>'
7466 Keld J@o{}rn Simonsen <keld@@dkuug.dk> 7542 Keld J@o{}rn Simonsen <keld@@dkuug.dk>
7467 @end example 7543 @end example
...@@ -7473,7 +7549,7 @@ given character set. In encode mode it indicates the encoding of the ...@@ -7473,7 +7549,7 @@ given character set. In encode mode it indicates the encoding of the
7473 input data, which will be reflected in the resulting string: 7549 input data, which will be reflected in the resulting string:
7474 7550
7475 @example 7551 @example
7476 $ mu 2047 --charset=utf-8 'Keld J@o{}rn Simonsen <keld@@dkuug.dk>' 7552 $ mailutils 2047 --charset=utf-8 'Keld J@o{}rn Simonsen <keld@@dkuug.dk>'
7477 =?utf-8?Q?Keld J=C3=B8rn Simonsen <keld@@dkuug.dk>?= 7553 =?utf-8?Q?Keld J=C3=B8rn Simonsen <keld@@dkuug.dk>?=
7478 @end example 7554 @end example
7479 7555
...@@ -7484,14 +7560,14 @@ are: @samp{quoted-printable} (the default) or @samp{base64}. ...@@ -7484,14 +7560,14 @@ are: @samp{quoted-printable} (the default) or @samp{base64}.
7484 The @option{--newline} (@option{-n}) option prints an additional 7560 The @option{--newline} (@option{-n}) option prints an additional
7485 newline character after each line of output. 7561 newline character after each line of output.
7486 7562
7487 @node mu filter 7563 @node mailutils filter
7488 @subsection mu filter 7564 @subsection mailutils filter
7489 The @command{mu filter} command applies a chain of filters to the 7565 The @command{mailutils filter} command applies a chain of filters to the
7490 input. The filters to apply and their arguments are given 7566 input. The filters to apply and their arguments are given
7491 in the command line. The full invocation syntax is: 7567 in the command line. The full invocation syntax is:
7492 7568
7493 @example 7569 @example
7494 mu filter [@var{option}] @var{filter-chain} 7570 mailutils filter [@var{option}] @var{filter-chain}
7495 @end example 7571 @end example
7496 7572
7497 The syntax for @var{filter-chain} in Backus-Naur form follows: 7573 The syntax for @var{filter-chain} in Backus-Naur form follows:
...@@ -7508,7 +7584,7 @@ represents filter arguments. To obtain a list of known filter names, ...@@ -7508,7 +7584,7 @@ represents filter arguments. To obtain a list of known filter names,
7508 run: 7584 run:
7509 7585
7510 @example 7586 @example
7511 mu filter --list 7587 mailutils filter --list
7512 @end example 7588 @end example
7513 7589
7514 Filters are applied in the order of their appearence, from left to 7590 Filters are applied in the order of their appearence, from left to
...@@ -7522,25 +7598,25 @@ For example, to encode the contents of file @file{file.txt} in Base64 ...@@ -7522,25 +7598,25 @@ For example, to encode the contents of file @file{file.txt} in Base64
7522 run: 7598 run:
7523 7599
7524 @example 7600 @example
7525 mu filter base64 < file.txt 7601 mailutils filter base64 < file.txt
7526 @end example 7602 @end example
7527 7603
7528 To convert it to base64 and use CRLF as line delimiters, run: 7604 To convert it to base64 and use CRLF as line delimiters, run:
7529 7605
7530 @example 7606 @example
7531 mu filter base64 + crlf < file.txt 7607 mailutils filter base64 + crlf < file.txt
7532 @end example 7608 @end example
7533 7609
7534 The following command will decode the produced output: 7610 The following command will decode the produced output:
7535 7611
7536 @example 7612 @example
7537 mu filter --decode crlf + base64 7613 mailutils filter --decode crlf + base64
7538 @end example 7614 @end example
7539 7615
7540 It can also be written as 7616 It can also be written as
7541 7617
7542 @example 7618 @example
7543 mu filter ~crlf + ~base64 7619 mailutils filter ~crlf + ~base64
7544 @end example 7620 @end example
7545 7621
7546 The following example converts the input from ISO-8859-2 to UTF-8, 7622 The following example converts the input from ISO-8859-2 to UTF-8,
...@@ -7548,22 +7624,22 @@ quotes eventual @samp{From} occurring at the beginning of a line, ...@@ -7548,22 +7624,22 @@ quotes eventual @samp{From} occurring at the beginning of a line,
7548 encodes the result in Base64 and changes line delimiters to CRLF: 7624 encodes the result in Base64 and changes line delimiters to CRLF:
7549 7625
7550 @example 7626 @example
7551 mu filter iconv iso-8859-2 utf-8 + from + base64 + crlf 7627 mailutils filter iconv iso-8859-2 utf-8 + from + base64 + crlf
7552 @end example 7628 @end example
7553 7629
7554 This final example removes UNIX-style comments from the input and 7630 This final example removes UNIX-style comments from the input and
7555 joins continuation lines: 7631 joins continuation lines:
7556 7632
7557 @example 7633 @example
7558 mu filter --decode inline-comment -S '#' + linecon 7634 mailutils filter --decode inline-comment -S '#' + linecon
7559 @end example 7635 @end example
7560 7636
7561 Such invocation can be useful in shell scripts to facilitate 7637 Such invocation can be useful in shell scripts to facilitate
7562 configuration file processing. 7638 configuration file processing.
7563 7639
7564 @node mu acl 7640 @node mailutils acl
7565 @subsection mu acl 7641 @subsection mailutils acl
7566 The @command{mu acl} command tests Mailutils Access Control Lists. By 7642 The @command{mailutils acl} command tests Mailutils Access Control Lists. By
7567 default it reads ACL from the Mailutils configiration file section 7643 default it reads ACL from the Mailutils configiration file section
7568 @samp{acl}. The command takes a list of IP addresses as its 7644 @samp{acl}. The command takes a list of IP addresses as its
7569 arguments, applies the ACL to each of them in turn and prints the result. 7645 arguments, applies the ACL to each of them in turn and prints the result.
...@@ -7575,7 +7651,7 @@ configuration file to read instead of the default one. The ...@@ -7575,7 +7651,7 @@ configuration file to read instead of the default one. The
7575 (@pxref{Paths}) of the ACL section to use instead of the default @samp{.acl}. For example, to test ACL in section @samp{server 213.130.1.232} of file @file{/etc/pop3d.conf} use: 7651 (@pxref{Paths}) of the ACL section to use instead of the default @samp{.acl}. For example, to test ACL in section @samp{server 213.130.1.232} of file @file{/etc/pop3d.conf} use:
7576 7652
7577 @example 7653 @example
7578 mu acl --file=/etc/pop3d.conf \ 7654 mailutils acl --file=/etc/pop3d.conf \
7579 --path=/server="213.130.1.232"/acl @var{address} 7655 --path=/server="213.130.1.232"/acl @var{address}
7580 @end example 7656 @end example
7581 7657
...@@ -7593,61 +7669,61 @@ acl @{ ...@@ -7593,61 +7669,61 @@ acl @{
7593 @} 7669 @}
7594 @end example 7670 @end example
7595 7671
7596 Then, running @command{mu acl --file=test.conf 127.0.0.1} you will get: 7672 Then, running @command{mailutils acl --file=test.conf 127.0.0.1} you will get:
7597 7673
7598 @example 7674 @example
7599 Testing 127.0.0.1: 7675 Testing 127.0.0.1:
7600 mu: Connect from 127.0.0.1 7676 mailutils: Connect from 127.0.0.1
7601 127.0.0.1: deny 7677 127.0.0.1: deny
7602 @end example 7678 @end example
7603 7679
7604 More examples: 7680 More examples:
7605 7681
7606 @example 7682 @example
7607 $ mu acl --file=test.conf 127.0.0.1 10.10.10.1 \ 7683 $ mailutils acl --file=test.conf 127.0.0.1 10.10.10.1 \
7608 10.10.1.3 10.5.3.1 192.168.1.0 192.168.2.0 7684 10.10.1.3 10.5.3.1 192.168.1.0 192.168.2.0
7609 Testing 127.0.0.1: 7685 Testing 127.0.0.1:
7610 mu: Connect from 127.0.0.1 7686 mailutils: Connect from 127.0.0.1
7611 127.0.0.1: deny 7687 127.0.0.1: deny
7612 Testing 10.10.10.1: 7688 Testing 10.10.10.1:
7613 10.10.10.1: deny 7689 10.10.10.1: deny
7614 Testing 10.10.1.3: 7690 Testing 10.10.1.3:
7615 10.10.1.3: deny 7691 10.10.1.3: deny
7616 Testing 10.5.3.1: 7692 Testing 10.5.3.1:
7617 mu: Connect from 10.5.3.1 7693 mailutils: Connect from 10.5.3.1
7618 10.5.3.1: accept 7694 10.5.3.1: accept
7619 Testing 192.168.1.0: 7695 Testing 192.168.1.0:
7620 mu: Connect from 192.168.1.0 7696 mailutils: Connect from 192.168.1.0
7621 192.168.1.0: accept 7697 192.168.1.0: accept
7622 Testing 192.168.2.0: 7698 Testing 192.168.2.0:
7623 mu: Connect from 192.168.2.0 7699 mailutils: Connect from 192.168.2.0
7624 192.168.2.0: accept 7700 192.168.2.0: accept
7625 @end example 7701 @end example
7626 7702
7627 The @command{mu} option @option{--debug-level} will give you a deeper 7703 The @command{mailutils} option @option{--debug-level} will give you a deeper
7628 insight into the address matching algorithm: 7704 insight into the address matching algorithm:
7629 7705
7630 @example 7706 @example
7631 $ mu --debug-level=acl.trace9 acl --file test.conf 127.0.0.1 7707 $ mailutils --debug-level=acl.trace9 acl --file test.conf 127.0.0.1
7632 Testing 127.0.0.1: 7708 Testing 127.0.0.1:
7633 mu: Checking sockaddr 127.0.0.1 7709 mailutils: Checking sockaddr 127.0.0.1
7634 mu: 1:deny: Does 10.10.10.1/255.255.255.255 match 127.0.0.1? no; 7710 mailutils: 1:deny: Does 10.10.10.1/255.255.255.255 match 127.0.0.1? no;
7635 mu: 2:deny: Does 10.10.1.0/255.255.255.0 match 127.0.0.1? no; 7711 mailutils: 2:deny: Does 10.10.1.0/255.255.255.0 match 127.0.0.1? no;
7636 mu: 3:log: Does any match 127.0.0.1? yes; 7712 mailutils: 3:log: Does any match 127.0.0.1? yes;
7637 mu: Expanding "Connect from $@{address@}"; 7713 mailutils: Expanding "Connect from $@{address@}";
7638 mu: Expansion: "Connect from 127.0.0.1";. 7714 mailutils: Expansion: "Connect from 127.0.0.1";.
7639 mu: Connect from 127.0.0.1 7715 mailutils: Connect from 127.0.0.1
7640 mu: 4:accept: Does 10.0.0.0/255.0.0.0 match 127.0.0.1? no; 7716 mailutils: 4:accept: Does 10.0.0.0/255.0.0.0 match 127.0.0.1? no;
7641 mu: 5:accept: Does 192.168.0.0/255.255.0.0 match 127.0.0.1? no; 7717 mailutils: 5:accept: Does 192.168.0.0/255.255.0.0 match 127.0.0.1? no;
7642 mu: 6:deny: Does any match 127.0.0.1? yes; 7718 mailutils: 6:deny: Does any match 127.0.0.1? yes;
7643 127.0.0.1: deny 7719 127.0.0.1: deny
7644 @end example 7720 @end example
7645 7721
7646 @xref{Debugging Categories,acl}. 7722 @xref{Debugging Categories,acl}.
7647 7723
7648 @node mu wicket 7724 @node mailutils wicket
7649 @subsection mu wicket 7725 @subsection mailutils wicket
7650 The @command{mu wicket} command looks up matching URLs in the 7726 The @command{mailutils wicket} command looks up matching URLs in the
7651 Mailutils ticket file (by default, @file{~/.mu-tickets}) and prints 7727 Mailutils ticket file (by default, @file{~/.mu-tickets}) and prints
7652 them. The URLs to look for are supplied in the command line. 7728 them. The URLs to look for are supplied in the command line.
7653 7729
...@@ -7660,22 +7736,22 @@ smtp://bar:baz@@gnu.org ...@@ -7660,22 +7736,22 @@ smtp://bar:baz@@gnu.org
7660 *://quux:bar@@gnu.org 7736 *://quux:bar@@gnu.org
7661 @end example 7737 @end example
7662 7738
7663 Now, running @command{mu wicket smtp://bar@@gnu.org} will show: 7739 Now, running @command{mailutils wicket smtp://bar@@gnu.org} will show:
7664 7740
7665 @example 7741 @example
7666 smtp://bar@@gnu.org: /home/@var{user}/.mu-tickets:2 7742 smtp://bar@@gnu.org: /home/@var{user}/.mailutils-tickets:2
7667 @end example 7743 @end example
7668 7744
7669 @noindent 7745 @noindent
7670 (where @var{user} is your login name). This means that this URL 7746 (where @var{user} is your login name). This means that this URL
7671 matches the line 2 in your @file{.mu-tickets} file. The 7747 matches the line 2 in your @file{.mailutils-tickets} file. The
7672 @command{wicket} command does not show the actual matching line to 7748 @command{wicket} command does not show the actual matching line to
7673 avoid revealing eventual security-sensitive information. You can 7749 avoid revealing eventual security-sensitive information. You can
7674 instruct it to do so using the @option{--verbose} (@option{-v}) 7750 instruct it to do so using the @option{--verbose} (@option{-v})
7675 option: 7751 option:
7676 7752
7677 @example 7753 @example
7678 $ mu wicket -v smtp://bar@@gnu.org 7754 $ mailutils wicket -v smtp://bar@@gnu.org
7679 smtp://bar@@gnu.org: /home/@var{user}/.mu-tickets:2: smtp://bar:***@@gnu.org 7755 smtp://bar@@gnu.org: /home/@var{user}/.mu-tickets:2: smtp://bar:***@@gnu.org
7680 @end example 7756 @end example
7681 7757
...@@ -7687,24 +7763,24 @@ well, by supplying the @option{-v} option twice. ...@@ -7687,24 +7763,24 @@ well, by supplying the @option{-v} option twice.
7687 A counterpart of @option{--verbose} is the @option{--quite} 7763 A counterpart of @option{--verbose} is the @option{--quite}
7688 (@option{-q}) option, which instructs @command{wicket} to suppress any 7764 (@option{-q}) option, which instructs @command{wicket} to suppress any
7689 output, excepting error messages. This can be used in scripts, which 7765 output, excepting error messages. This can be used in scripts, which
7690 analyze the @command{mu wicket} exit code to alter the control flow. 7766 analyze the @command{mailutils wicket} exit code to alter the control flow.
7691 7767
7692 The @command{mu wicket} tool exits with code 0 if all URLs were 7768 The @command{mailutils wicket} tool exits with code 0 if all URLs were
7693 matched and with code 1 if some of them were not matched in the ticket 7769 matched and with code 1 if some of them were not matched in the ticket
7694 file. If an error occurred, the code 2 is returned. 7770 file. If an error occurred, the code 2 is returned.
7695 7771
7696 @node mu dbm 7772 @node mailutils dbm
7697 @subsection mu dbm 7773 @subsection mailutils dbm
7698 The @command{mu dbm} tool manages DBM files using @file{libmu_dbm} 7774 The @command{mailutils dbm} tool manages DBM files using @file{libmu_dbm}
7699 The invocation syntax is: 7775 The invocation syntax is:
7700 7776
7701 @example 7777 @example
7702 mu dbm @var{subcommand} [@var{options}] @var{file} [@var{keys}] 7778 mailutils dbm @var{subcommand} [@var{options}] @var{file} [@var{keys}]
7703 @end example 7779 @end example
7704 @noindent 7780 @noindent
7705 or 7781 or
7706 @example 7782 @example
7707 mu dbm [@var{options}] @var{subcommand} @var{file} [@var{keys}] 7783 mailutils dbm [@var{options}] @var{subcommand} @var{file} [@var{keys}]
7708 @end example 7784 @end example
7709 7785
7710 @noindent 7786 @noindent
...@@ -7731,14 +7807,14 @@ The @option{create} subcommand and its synonym @option{load} instruct ...@@ -7731,14 +7807,14 @@ The @option{create} subcommand and its synonym @option{load} instruct
7731 the tool to create a new database: 7807 the tool to create a new database:
7732 7808
7733 @example 7809 @example
7734 mu dbm create file.db 7810 mailutils dbm create file.db
7735 @end example 7811 @end example
7736 7812
7737 If the argument file already exists, it will be truncated prior to 7813 If the argument file already exists, it will be truncated prior to
7738 adding new records to it. 7814 adding new records to it.
7739 7815
7740 The data to populate the database with are read from the standard 7816 The data to populate the database with are read from the standard
7741 input. The @command{mu dbm} command supports several formats for 7817 input. The @command{mailutils dbm} command supports several formats for
7742 these data, which are discussed later. In the simplest case (a so 7818 these data, which are discussed later. In the simplest case (a so
7743 called @samp{format 0.0}) each input line must consist of two fields 7819 called @samp{format 0.0}) each input line must consist of two fields
7744 separated by any amount of whitespace. The first field is treated as 7820 separated by any amount of whitespace. The first field is treated as
...@@ -7748,7 +7824,7 @@ The usual way to read data from a file is, of course, by redirecting ...@@ -7748,7 +7824,7 @@ The usual way to read data from a file is, of course, by redirecting
7748 the file to the standard input as in: 7824 the file to the standard input as in:
7749 7825
7750 @example 7826 @example
7751 mu dbm create file.db < input.txt 7827 mailutils dbm create file.db < input.txt
7752 @end example 7828 @end example
7753 7829
7754 There is also a special option for that purpose: @option{--file} 7830 There is also a special option for that purpose: @option{--file}
...@@ -7756,7 +7832,7 @@ There is also a special option for that purpose: @option{--file} ...@@ -7756,7 +7832,7 @@ There is also a special option for that purpose: @option{--file}
7756 above: 7832 above:
7757 7833
7758 @example 7834 @example
7759 mu dbm create --file input.txt file.db 7835 mailutils dbm create --file input.txt file.db
7760 @end example 7836 @end example
7761 7837
7762 The @option{--file} option has the advantage that it allows, in 7838 The @option{--file} option has the advantage that it allows, in
...@@ -7766,7 +7842,7 @@ the following command ensures that the created database file will have ...@@ -7766,7 +7842,7 @@ the following command ensures that the created database file will have
7766 the same metadata as the input file: 7842 the same metadata as the input file:
7767 7843
7768 @example 7844 @example
7769 mu dbm create --file input.txt --copy-permissions file.db 7845 mailutils dbm create --file input.txt --copy-permissions file.db
7770 @end example 7846 @end example
7771 7847
7772 The @option{--copy-permissions} (@option{-P}) option is the one that 7848 The @option{--copy-permissions} (@option{-P}) option is the one that
...@@ -7785,7 +7861,7 @@ suffices to restore the original filename, ownership, mode and, of ...@@ -7785,7 +7861,7 @@ suffices to restore the original filename, ownership, mode and, of
7785 course, data: 7861 course, data:
7786 7862
7787 @example 7863 @example
7788 mu dbm create --file users.dump 7864 mailutils dbm create --file users.dump
7789 @end example 7865 @end example
7790 7866
7791 @node Add Records to a Database 7867 @node Add Records to a Database
...@@ -7795,7 +7871,7 @@ read from the standard input and must be formatted as for ...@@ -7795,7 +7871,7 @@ read from the standard input and must be formatted as for
7795 @option{create}: 7871 @option{create}:
7796 7872
7797 @example 7873 @example
7798 mu dbm add file.db 7874 mailutils dbm add file.db
7799 @end example 7875 @end example
7800 7876
7801 If the argument file does not exist, it will be created. 7877 If the argument file does not exist, it will be created.
...@@ -7808,7 +7884,7 @@ The same options that affect the behavior of @option{create} apply to ...@@ -7808,7 +7884,7 @@ The same options that affect the behavior of @option{create} apply to
7808 @option{add} and @samp{replace} as well, e.g.: 7884 @option{add} and @samp{replace} as well, e.g.:
7809 7885
7810 @example 7886 @example
7811 mu dbm replace --file input.txt --copy-permissions file.db 7887 mailutils dbm replace --file input.txt --copy-permissions file.db
7812 @end example 7888 @end example
7813 7889
7814 @node Delete Records 7890 @node Delete Records
...@@ -7818,7 +7894,7 @@ list of keys to delete to be specified as arguments in the command ...@@ -7818,7 +7894,7 @@ list of keys to delete to be specified as arguments in the command
7818 line: 7894 line:
7819 7895
7820 @example 7896 @example
7821 mu dbm delete file.db foo bar 7897 mailutils dbm delete file.db foo bar
7822 @end example 7898 @end example
7823 7899
7824 The command above will delete from @file{file.db} records with keys 7900 The command above will delete from @file{file.db} records with keys
...@@ -7834,18 +7910,18 @@ specified. ...@@ -7834,18 +7910,18 @@ specified.
7834 The @option{--glob} (@option{-G}) option instructs the tool to use UNIX globbing pattern matching. For example, the command below will delete all keys starting with @samp{foo} and ending with a decimal digit: 7910 The @option{--glob} (@option{-G}) option instructs the tool to use UNIX globbing pattern matching. For example, the command below will delete all keys starting with @samp{foo} and ending with a decimal digit:
7835 7911
7836 @example 7912 @example
7837 mu dbm delete file.db 'foo*[0-9]' 7913 mailutils dbm delete file.db 'foo*[0-9]'
7838 @end example 7914 @end example
7839 7915
7840 @noindent 7916 @noindent
7841 (note the quoting necessary to prevent shell from interpreting the 7917 (note the quoting necessary to prevent shell from interpreting the
7842 metacharacters itself). 7918 metacharacters itself).
7843 7919
7844 Another option, @option{--regex} (@option{-R}) instructs @command{mu} 7920 Another option, @option{--regex} (@option{-R}) instructs @command{mailutils}
7845 to treat supplied keys as extended regular expressions: 7921 to treat supplied keys as extended regular expressions:
7846 7922
7847 @example 7923 @example
7848 mu dbm delete --regex file.db 'foo.*[0-9]@{1,3@}' 7924 mailutils dbm delete --regex file.db 'foo.*[0-9]@{1,3@}'
7849 @end example 7925 @end example
7850 7926
7851 Both options are affected by the @option{--ignore-case} (@option{-i}) 7927 Both options are affected by the @option{--ignore-case} (@option{-i})
...@@ -7861,7 +7937,7 @@ the patterns match the right keys. ...@@ -7861,7 +7937,7 @@ the patterns match the right keys.
7861 The @option{list} command lists the content of the database: 7937 The @option{list} command lists the content of the database:
7862 7938
7863 @example 7939 @example
7864 mu dbm list file.db 7940 mailutils dbm list file.db
7865 @end example 7941 @end example
7866 7942
7867 By default, entire content is listed on the standard output. 7943 By default, entire content is listed on the standard output.
...@@ -7871,7 +7947,7 @@ rest of arguments after the database file name as the keys to look for ...@@ -7871,7 +7947,7 @@ rest of arguments after the database file name as the keys to look for
7871 and lists only records with these keys: 7947 and lists only records with these keys:
7872 7948
7873 @example 7949 @example
7874 $ mu dbm list file.db foo bar 7950 $ mailutils dbm list file.db foo bar
7875 foo 1 7951 foo 1
7876 bar 56 7952 bar 56
7877 @end example 7953 @end example
...@@ -7888,13 +7964,13 @@ in a format suitable for backup or sending over the network (a ...@@ -7888,13 +7964,13 @@ in a format suitable for backup or sending over the network (a
7888 version 1.0 format). 7964 version 1.0 format).
7889 7965
7890 @example 7966 @example
7891 mu dbm dump file.db < file.dump 7967 mailutils dbm dump file.db < file.dump
7892 @end example 7968 @end example
7893 7969
7894 The produced file is suitable for input to the @option{create} (@option{load}) command. Among other uses, it provides an easy way to convert databases between various formats supported by Mailutils. For example this is how to convert the database file @file{file.db} to the GDBM database @file{new.db}: 7970 The produced file is suitable for input to the @option{create} (@option{load}) command. Among other uses, it provides an easy way to convert databases between various formats supported by Mailutils. For example this is how to convert the database file @file{file.db} to the GDBM database @file{new.db}:
7895 7971
7896 @example 7972 @example
7897 mu dbm dump file.db | mu dbm create gdbm://new.db 7973 mailutils dbm dump file.db | mailutils dbm create gdbm://new.db
7898 @end example 7974 @end example
7899 7975
7900 Both @option{list} and @option{dump} subcommands share the same set of 7976 Both @option{list} and @option{dump} subcommands share the same set of
...@@ -7905,7 +7981,7 @@ backup purposes. ...@@ -7905,7 +7981,7 @@ backup purposes.
7905 7981
7906 @node Dump Formats 7982 @node Dump Formats
7907 @subsubsection Dump Formats 7983 @subsubsection Dump Formats
7908 As of version @value{VERSION}, @command{mu dbm} supports two formats 7984 As of version @value{VERSION}, @command{mailutils dbm} supports two formats
7909 for dumping DBM databases. Both formats are line-oriented. Comments 7985 for dumping DBM databases. Both formats are line-oriented. Comments
7910 are introduced with a sharp (@samp{#}) sign in the column 0 of a line, 7986 are introduced with a sharp (@samp{#}) sign in the column 0 of a line,
7911 followed by at least one white space character (space or tab). Sharp 7987 followed by at least one white space character (space or tab). Sharp
...@@ -7919,7 +7995,7 @@ separate line, which consists of the key and value separated by a ...@@ -7919,7 +7995,7 @@ separate line, which consists of the key and value separated by a
7919 single @sc{tab} character. Empty lines are ignored. For example: 7995 single @sc{tab} character. Empty lines are ignored. For example:
7920 7996
7921 @example 7997 @example
7922 $ mu list /etc/mail/users.db 7998 $ mailutils list /etc/mail/users.db
7923 root guessme 7999 root guessme
7924 smith pAssword 8000 smith pAssword
7925 qed fooBar 8001 qed fooBar
...@@ -7936,7 +8012,7 @@ format is free from these drawbacks. ...@@ -7936,7 +8012,7 @@ format is free from these drawbacks.
7936 The @dfn{version 1.0} dump format begins with a @dfn{header} 8012 The @dfn{version 1.0} dump format begins with a @dfn{header}
7937 containing important information about the file, such as its file 8013 containing important information about the file, such as its file
7938 name, ownership and file mode. This information is stored in 8014 name, ownership and file mode. This information is stored in
7939 pragmatic comments and allows @command{mu dbm load} to easily recreate 8015 pragmatic comments and allows @command{mailutils dbm load} to easily recreate
7940 an exact copy of the file. The following comments are defined: 8016 an exact copy of the file. The following comments are defined:
7941 8017
7942 @table @asis 8018 @table @asis
...@@ -7986,7 +8062,7 @@ Zm9vQmFyAA== ...@@ -7986,7 +8062,7 @@ Zm9vQmFyAA==
7986 8062
7987 @node Dbm Exit Codes 8063 @node Dbm Exit Codes
7988 @subsubsection Dbm Exit Codes 8064 @subsubsection Dbm Exit Codes
7989 The table below summarizes exit codes used by @command{mu dbm}: 8065 The table below summarizes exit codes used by @command{mailutils dbm}:
7990 8066
7991 @multitable @columnfractions 0.2 0.3 0.5 8067 @multitable @columnfractions 0.2 0.3 0.5
7992 @headitem Code @tab Symbolic name @tab Meaning 8068 @headitem Code @tab Symbolic name @tab Meaning
...@@ -8004,43 +8080,43 @@ some kind of problem (e.g. access to the file denied, etc.) ...@@ -8004,43 +8080,43 @@ some kind of problem (e.g. access to the file denied, etc.)
8004 @item 74 @tab EX_IOERR @tab Input/output error 8080 @item 74 @tab EX_IOERR @tab Input/output error
8005 @end multitable 8081 @end multitable
8006 8082
8007 @node mu logger 8083 @node mailutils logger
8008 @subsection mu logger 8084 @subsection mailutils logger
8009 The @command{mu logger} tool logs information using Mailutils log facility. 8085 The @command{mailutils logger} tool logs information using Mailutils log facility.
8010 8086
8011 Syntax: 8087 Syntax:
8012 8088
8013 @example 8089 @example
8014 mu logger [@var{options}] [@var{message}] 8090 mailutils logger [@var{options}] [@var{message}]
8015 @end example 8091 @end example
8016 8092
8017 The @var{message} argument, if supplied, gives the text to log. If not supplied, the utility reads lines of text from standard input or a file (if the @option{--file} option is given) and sends them to log: 8093 The @var{message} argument, if supplied, gives the text to log. If not supplied, the utility reads lines of text from standard input or a file (if the @option{--file} option is given) and sends them to log:
8018 8094
8019 @example 8095 @example
8020 # Send text to log 8096 # Send text to log
8021 $ mu logger I am here 8097 $ mailutils logger I am here
8022 # Log each line from file.txt 8098 # Log each line from file.txt
8023 $ mu logger --file file.txt 8099 $ mailutils logger --file file.txt
8024 # Read stdin and log it: 8100 # Read stdin and log it:
8025 $ mu logger 8101 $ mailutils logger
8026 @end example 8102 @end example
8027 8103
8028 The default logging channel is bound to standard error. To bind it to 8104 The default logging channel is bound to standard error. To bind it to
8029 syslog, use the @option{--syslog} command line option. In that case 8105 syslog, use the @option{--syslog} command line option. In that case
8030 @command{mu} uses facility @samp{user} and priority @samp{err}. You 8106 @command{mailutils} uses facility @samp{user} and priority @samp{err}. You
8031 can change this by using the @option{--priority} (@option{-p}) option. 8107 can change this by using the @option{--priority} (@option{-p}) option.
8032 Its argument is either a syslog facility name or facility and severity 8108 Its argument is either a syslog facility name or facility and severity
8033 names separated by a dot. For example, the following invocation will use 8109 names separated by a dot. For example, the following invocation will use
8034 facility @samp{auth}, severity @samp{info}: 8110 facility @samp{auth}, severity @samp{info}:
8035 8111
8036 @example 8112 @example
8037 mu logger --priority auth.info 8113 mailutils logger --priority auth.info
8038 @end example 8114 @end example
8039 8115
8040 The syslog tag can be set using the @option{--tag} (@option{-t}) option: 8116 The syslog tag can be set using the @option{--tag} (@option{-t}) option:
8041 8117
8042 @example 8118 @example
8043 mu logger --tag myprog 8119 mailutils logger --tag myprog
8044 @end example 8120 @end example
8045 8121
8046 The default tag is @samp{mu-logger}. 8122 The default tag is @samp{mu-logger}.
...@@ -8064,7 +8140,7 @@ optional @var{col} is the column number in that file. ...@@ -8064,7 +8140,7 @@ optional @var{col} is the column number in that file.
8064 For example, the following invocation: 8140 For example, the following invocation:
8065 8141
8066 @example 8142 @example
8067 mu logger --locus mailutils.rc:34 Suspicious statement 8143 mailutils logger --locus mailutils.rc:34 Suspicious statement
8068 @end example 8144 @end example
8069 8145
8070 will send the following to the log: 8146 will send the following to the log:
...@@ -8073,15 +8149,15 @@ will send the following to the log: ...@@ -8073,15 +8149,15 @@ will send the following to the log:
8073 mu-logger: mailutils.rc:34: Suspicious statement 8149 mu-logger: mailutils.rc:34: Suspicious statement
8074 @end example 8150 @end example
8075 8151
8076 @node mu pop 8152 @node mailutils pop
8077 @subsection mu pop 8153 @subsection mailutils pop
8078 The @command{mu pop} command invokes an interactive POP3 client shell. 8154 The @command{mailutils pop} command invokes an interactive POP3 client shell.
8079 It reads commands from the standard input, executes them and displays 8155 It reads commands from the standard input, executes them and displays
8080 the results on the standard output. If the standard input is 8156 the results on the standard output. If the standard input is
8081 connected to a terminal, the readline and history facilities are 8157 connected to a terminal, the readline and history facilities are
8082 enabled (provided that Mailutils is configured with GNU Readline). 8158 enabled (provided that Mailutils is configured with GNU Readline).
8083 8159
8084 The @command{mu pop} commands form two major groups. POP3 protocol 8160 The @command{mailutils pop} commands form two major groups. POP3 protocol
8085 commands interact with the remote POP3 server and display responses 8161 commands interact with the remote POP3 server and display responses
8086 obtained from it. These commands are named after their POP3 8162 obtained from it. These commands are named after their POP3
8087 equivalents. Another group, @dfn{internal commands}, are used to 8163 equivalents. Another group, @dfn{internal commands}, are used to
...@@ -8205,7 +8281,7 @@ following variables are defined: ...@@ -8205,7 +8281,7 @@ following variables are defined:
8205 connection is established. 8281 connection is established.
8206 @item program-name @tab Name of the program, as typed on the command 8282 @item program-name @tab Name of the program, as typed on the command
8207 line to invoke it. 8283 line to invoke it.
8208 @item canonical-program-name @tab @samp{mu} 8284 @item canonical-program-name @tab @samp{mailutils}
8209 @item package @tab @samp{Mailutils} 8285 @item package @tab @samp{Mailutils}
8210 @item version @tab Mailutils version number (@value{VERSION}) 8286 @item version @tab Mailutils version number (@value{VERSION})
8211 @item status @tab Session status. One of: @samp{disconnected}, 8287 @item status @tab Session status. One of: @samp{disconnected},
...@@ -8234,8 +8310,16 @@ With one argument, displays a terse description for the given @var{command}. ...@@ -8234,8 +8310,16 @@ With one argument, displays a terse description for the given @var{command}.
8234 Shows command history. 8310 Shows command history.
8235 @end table 8311 @end table
8236 8312
8237 @node mu imap 8313 @node mailutils imap
8238 @subsection mu imap 8314 @subsection mailutils imap
8239 The @command{mu imap} command is reserved for an interactive IMAP4 8315 The @command{mailutils imap} command is reserved for an interactive IMAP4
8240 client shell. It does not do much now (as of version @value{VERSION}. 8316 client shell. It does not do much now (as of version @value{VERSION}.
8241 8317
8318 @node mailutils send
8319 @subsection mailutils send
8320 @WRITEME
8321
8322 @node mailutils smtp
8323 @subsection mailutils smtp
8324 @WRITEME
8325
......