summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore9
-rw-r--r--NEWS21
-rw-r--r--README86
-rw-r--r--auth/tls.c1
-rw-r--r--configure.ac2
-rw-r--r--doc/texinfo/Makefile.am1
-rw-r--r--doc/texinfo/mailutils.texi75
-rw-r--r--doc/texinfo/programs.texi958
-rw-r--r--doc/texinfo/sieve.texi6
-rw-r--r--imap4d/imap4d.c2
-rw-r--r--scripts/.gitignore6
11 files changed, 793 insertions, 374 deletions
diff --git a/.gitignore b/.gitignore
index 702933960..dc3cea215 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,7 @@
.bootstrap
.deps
.emacs*
+.libs
ABOUT-NLS
ChangeLog
INSTALL
@@ -14,13 +15,11 @@ Makefile
Makefile.in
aclocal.m4
autom4te.cache
-libtool
-m4
-stamp-h1
config.h
config.h.in
config.log
config.status
configure
-.libs
-.deps \ No newline at end of file
+libtool
+m4
+stamp-h1
diff --git a/NEWS b/NEWS
index 8a0cc7e22..845c90693 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-GNU mailutils NEWS -- history of user-visible changes. 2008-11-12
+GNU mailutils NEWS -- history of user-visible changes. 2008-12-26
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007,
2008 Free Software Foundation, Inc.
See the end of file for copying conditions.
@@ -6,10 +6,13 @@ See the end of file for copying conditions.
Please send mailutils bug reports to <bug-mailutils@gnu.org>.
-Version 1.9.93:
+Version 2.0:
* New configuration file format.
+See documentation, chapter 2.2, `Mailutils Configuration File', for a
+detailed description.
+
* Programs
** Debugging and online help
@@ -306,6 +309,17 @@ Any mu_url_get_.* accessors return MU_ERR_ENOENT if the corresponding
field is not present in the object. Previous versions in that case
returned 0 and stored empty string in the output buffer.
+** Prog mailer.
+
+New mailer type, `prog' is introduced. It is a generalization of the
+`sendmail' message. The syntax for this mailer type is:
+
+ prog://progname?args
+
+where `args' is a list of command line arguments separated by `&'
+signs. When using this mailer, mailutils executes `progname' with the
+given arguments and pipes the message to its standard input.
+
** New mailbox types.
Two new mailbox types, "remote+smtp" and "remote+sendmail", are
@@ -314,6 +328,9 @@ that can be done over them is mu_mailbox_append_message. E.g.,
appending to the URL `remote+smtp://127.0.0.1:24' is equivalent to
sending a message using mailer `smtp://127.0.0.1:24'.
+In addirion, "remote+prog" mailbox (abbreviated as "|") is useful for
+piping messages to the standard input of an external program.
+
** New argcv functions.
- int mu_argcv_get_np (const char *command, int len,
diff --git a/README b/README
index b02af9918..172b67055 100644
--- a/README
+++ b/README
@@ -5,19 +5,19 @@ This is the GNU Mailutils package
==============
This package contains a series of useful mail clients, servers, and
-libraries. These are the primary mail utilities of the GNU system.
+libraries. These are the primary mail utilities of the GNU system.
Specifically, this package contains a POP3 server, an IMAP4 server,
-and a Sieve mail filter. It also provides a POSIX `mailx' client,
+and a Sieve mail filter. It also provides a POSIX `mailx' client,
and a collection of other tools.
The central library is capable of reading mail from an `mbox' mailbox,
as well as off of local or remote POP3 and IMAP4 servers.
You're welcome to use this library in your own programs, please see
-the examples subdirectory or these other applications. All libraries
-are licensed using the GNU LGPL. The documentation is licensed under
-the GNU FDL, and everything else is licensed using the GNU GPL. The
+the examples subdirectory or these other applications. All libraries
+are licensed using the GNU LGPL. The documentation is licensed under
+the GNU FDL, and everything else is licensed using the GNU GPL. The
complete texts of the corresponding licences are included in the files
COPYING.LESSER, COPYING and doc/texinfo/COPYING.DOC.
@@ -28,9 +28,9 @@ Software Foundation.
=======================
This package started off to try and handle large mailbox files more
-gracefully then current POP3 servers did. While it handles this task,
+gracefully then current POP3 servers did. While it handles this task,
it also allows you to support a variety of different mailbox formats
-without any real effort on your part. Also, if a new format is added
+without any real effort on your part. Also, if a new format is added
at a later date, your program will support that new format
automatically as soon as it is compiled against the new library.
@@ -41,19 +41,19 @@ it to compile cleanly on all the platforms supported there.
================
Please see the INSTALL file in this directory for the generic instructions
-on how to use configure. The following short summary describes the
+on how to use configure. The following short summary describes the
mailutils-specific configuration options:
--enable-debug
- Compile Mailutils with debugging support. This disables
+ Compile Mailutils with debugging support. This disables
compiler optimizations and adds debugging information to the
binaries.
--disable-pam
- Do not build PAM support. By default configure will build PAM
- support if the host system supports it. Use this option to
+ Do not build PAM support. By default configure will build PAM
+ support if the host system supports it. Use this option to
suppress this behaviour.
--disable-pthread
@@ -68,7 +68,7 @@ mailutils-specific configuration options:
Enable support for authentication using given SQL modules.
MODLIST is a colon-separated list of SQL modules to use.
- Available modules are 'mysql', 'postgres' and 'odbc'. E.g.,
+ Available modules are 'mysql', 'postgres' and 'odbc'. E.g.,
to enable all modules:
--with-sql=mysql:postgres:odbc
@@ -115,12 +115,12 @@ mailutils-specific configuration options:
--enable-mh-utils
- Build a suite of MH utilities. The GNU implementation of MH
+ Build a suite of MH utilities. The GNU implementation of MH
primarily aims to provide an interface between Mailutils'
functionality and Emacs, using the mh-e module.
For more information, refer to the TODO file in the mh
subdirectory, and to the section `MH' in the accompanying
- documentation. To access it, run
+ documentation. To access it, run
`info -f ./doc/texinfo/mailutils.info mh' from the Mailutils
root directory. After installation, it will become available
by running `info mailutils mh'.
@@ -129,13 +129,13 @@ mailutils-specific configuration options:
By default the MH binaries are installed in
${exec_prefix}/bin/mu-mh. To change this, use --with-mh-bindir
- option. If DIR starts with '/' it is taken as an absolute
+ option. If DIR starts with '/' it is taken as an absolute
path specification, otherwise ${prefix} is prepended to it.
--with-virtual-pwddir=DIR
Use DIR instead of $sysconfdir/domain as the location of
- virtual mail domain database. This option is ignored if
+ virtual mail domain database. This option is ignored if
--disable-virtual-domains is specified.
--without-readline
@@ -150,12 +150,12 @@ mailutils-specific configuration options:
--with-gsasl
Enable GNU SASL support (Simple Authentication and Security
- Layer framework). IMAP4d supports this mechanism. This
+ Layer framework). IMAP4d supports this mechanism. This
requires GSASL version 0.2.3 or newer.
--with-gssapi
- Enable GSSAPI authentication. For this to work, you will have
+ Enable GSSAPI authentication. For this to work, you will have
to have Kerberos V installed on your system.
--without-guile
@@ -164,14 +164,14 @@ mailutils-specific configuration options:
--with-guiledir[=DIR]
- Specify the directory to install guile modules to. By default
+ Specify the directory to install guile modules to. By default
they are installed in
$(prefix)/share/mailutils/$(VERSION)/guile.
The option --with-guiledir used without argument instructs
configure script to install modules to the site-wide Guile
- directory, where it is easier to find them. This directory is
+ directory, where it is easier to find them. This directory is
defined as $(guile_pkgdatadir)/site where guile_pkgdatadir is
the Guile package data directory as returned by `guile-config
info pkgdatadir'.
@@ -183,41 +183,41 @@ mailutils-specific configuration options:
--with-mail-rc=FILE
Set the location of the system-wide configuration file for mail
- utility. FILE must be an absolute filename specification.
+ utility. FILE must be an absolute filename specification.
Default is $sysconfdir/mail.rc
--with-mail-spool=PATH
- Override the location of the mailspool. The default value
- depends on the system. Usually it is either /var/spool/mail
+ Override the location of the mailspool. The default value
+ depends on the system. Usually it is either /var/spool/mail
or /var/mail. PATH is either an absolute directory name, or a
valid `mbox' URL in the form:
mbox:path;type=TYPE;param=N;user=
- This method allows you to use indexed mailspools. For servers
+ This method allows you to use indexed mailspools. For servers
with a really big number of users this may provide a
significant speedup in opening the mailbox.
TYPE is one of:
hash -- The user's mailbox is kept in a subdirectory
whose name is determined by hashing first
- N characters of the user name. There are
+ N characters of the user name. There are
256 subdirectories named from 00 through FF.
index -- The user's mailbox is located PARAM directories
- down the `path'. The directories are named
+ down the `path'. The directories are named
after the first N letters of a login name.
For example, when N=2 the mailbox for
user `smith' is `/var/spool/mail/s/m/smith'.
rev-index -- Same as above, except that the last letters
are used, thus the mailbox for `smith' will
- be /var/spool/mail/h/t/smith. This may provide
+ be /var/spool/mail/h/t/smith. This may provide
a better average distribution than the `index'
method.
--with-log-facility=facility
- Enable logging to the given syslog facility. Default is `mail'.
+ Enable logging to the given syslog facility. Default is `mail'.
--without-included-regex
@@ -235,10 +235,10 @@ mailutils-specific configuration options:
--with-included-argp
Use the argp library supplied with the package, instead of the
- one from your libc. You will need this option if the libc library
+ one from your libc. You will need this option if the libc library
on your system was compiled without NLS support.
-The following options enable DBM support in Mailutils. DBM support is
+The following options enable DBM support in Mailutils. DBM support is
necessary if you wish to use APOP authentication in POP3 daemon or to
use DBM-based mail box quotas with mail.local.
@@ -248,8 +248,8 @@ use DBM-based mail box quotas with mail.local.
--with-berkeley-db[=ARG]
- Use Berkeley DB. If ARG is not specified, configure will
- attempt to autodetect the database version to use. Unless ARG
+ Use Berkeley DB. If ARG is not specified, configure will
+ attempt to autodetect the database version to use. Unless ARG
begins with a digit, it is taken as a library name, without
the `lib' prefix and library type suffix, so that specifying
@@ -258,8 +258,8 @@ use DBM-based mail box quotas with mail.local.
instructs configure to use library libdb-3.1.so (or
libdb-3.1.a).
Otherwise, if ARG begins with a digit, it is understood as a
- library version number to link to. In this case configure
- assumes a Slackware-like installation layout. Thus, using
+ library version number to link to. In this case configure
+ assumes a Slackware-like installation layout. Thus, using
--with-berkeley-db=3.1
@@ -270,8 +270,8 @@ use DBM-based mail box quotas with mail.local.
Use NDBM
- Only one dbm option may be specified. Which one depends on
- the flavor of DBM you are using. GDBM is most common for GNU
+ Only one dbm option may be specified. Which one depends on
+ the flavor of DBM you are using. GDBM is most common for GNU
system.
Use following options to disable support for particular protocols or
@@ -279,7 +279,7 @@ features:
--disable-imap Disables IMAP protocol support.
--disable-pop Disables POP protocol support.
- --disable-smtp Disables support for SMTP mailer. With this
+ --disable-smtp Disables support for SMTP mailer. With this
option `mail.remote' is not built.
--disable-sendmail Disables support for `Sendmail' mailer.
--disable-mh Disables support for MH mailbox format.
@@ -287,11 +287,11 @@ features:
Disables support for authentication using
virtual mail domains.
-Several environment variables affect the configuration. Currently,
-the only mailutils-specific variable is DEFAULT_CUPS_CONFDIR. It
+Several environment variables affect the configuration. Currently,
+the only mailutils-specific variable is DEFAULT_CUPS_CONFDIR. It
sets the location of CUPS (Common UNIX Printing System) configuration
-directory, which is needed for `mimeview' utility. By default, this
-location is $sysconfdir/cups. On most sites, however, it may be
+directory, which is needed for `mimeview' utility. By default, this
+location is $sysconfdir/cups. On most sites, however, it may be
reasonable to set it to /etc/cups, e.g.:
./configure DEFAULT_CUPS_CONFDIR=/etc/cups ...
@@ -300,10 +300,10 @@ reasonable to set it to /etc/cups, e.g.:
* Where to report BUGS
======================
-Please report any bugs to <bug-mailutils@gnu.org>. We encourage
+Please report any bugs to <bug-mailutils@gnu.org>. We encourage
sysadmins who will be using this package to subscribe to this list by
sending an email to <bug-mailutils-request@gnu.org> with the word
-`subscribe' in the body of the message. Another way to subscribe is
+`subscribe' in the body of the message. Another way to subscribe is
by visiting http://mail.gnu.org/mailman/listinfo/bug-mailutils.
* Copyright information:
diff --git a/auth/tls.c b/auth/tls.c
index 7c31dd925..e7560a36c 100644
--- a/auth/tls.c
+++ b/auth/tls.c
@@ -52,6 +52,7 @@ mu_tls_module_init (enum mu_gocs_op op, void *data)
#ifdef WITH_TLS
mu_init_tls_libs ();
#endif
+ break;
}
return 0;
}
diff --git a/configure.ac b/configure.ac
index 218dd2989..ba62a0fad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,7 @@ dnl You should have received a copy of the GNU General Public License along
dnl with GNU Mailutils; if not, write to the Free Software Foundation,
dnl Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-AC_INIT([GNU Mailutils], [1.9.93], [bug-mailutils@gnu.org], [mailutils])
+AC_INIT([GNU Mailutils], [2.0], [bug-mailutils@gnu.org], [mailutils])
AC_CONFIG_SRCDIR([mailbox/mailbox.c])
AC_CONFIG_AUX_DIR([scripts])
AM_INIT_AUTOMAKE
diff --git a/doc/texinfo/Makefile.am b/doc/texinfo/Makefile.am
index 0dde172ce..83df86c2a 100644
--- a/doc/texinfo/Makefile.am
+++ b/doc/texinfo/Makefile.am
@@ -72,6 +72,7 @@ mailutils_TEXINFOS = \
sieve.texi\
smtp.texi\
stream.texi\
+ usage.texi\
url.texi\
$(RENDITION_TEXI)\
$(INCFILES)
diff --git a/doc/texinfo/mailutils.texi b/doc/texinfo/mailutils.texi
index 67b4f2365..3aa857d7d 100644
--- a/doc/texinfo/mailutils.texi
+++ b/doc/texinfo/mailutils.texi
@@ -30,16 +30,20 @@
@end direntry
@dircategory Individual utilities
@direntry
-* comsatd: (mailutils)comsatd. Comsat daemon.
-* frm: (mailutils)frm. List headers from a mailbox.
-* guimb: (mailutils)guimb. Mailbox processing language.
-* imap4d: (mailutils)imap4d. IMAP4 daemon.
-* mail.local: (mailutils)mail.local. Deliver mail to local mailbox.
-* mail: (mailutils)mail. Send and receive mail.
-* messages: (mailutils)messages. Count messages in mailbox.
-* pop3d: (mailutils)pop3d. POP3 daemon.
-* readmsg: (mailutils)readmsg. Extract messages from a folder.
-* sieve: (mailutils)sieve. Mail filtering utility.
+* comsatd: (mailutils)comsatd. Comsat Daemon.
+* frm: (mailutils)frm. List Headers from a Mailbox.
+* guimb: (mailutils)guimb. Mailbox Processing Language.
+* imap4d: (mailutils)imap4d. IMAP4 Daemon.
+* mail: (mailutils)mail. Send and Receive Mail.
+* maidag: (mailutils)maidag. A General-Purpose Mail Delivery Agent.
+* messages: (mailutils)messages. Count Messages in a Mailbox.
+* pop3d: (mailutils)pop3d. POP3 Daemon.
+* readmsg: (mailutils)readmsg. Extract Messages from a Folder.
+* sieve: (mailutils)sieve. Mail Filtering Utility.
+* mimeview: (mailutils)mimeview. View MIME Messages.
+* mailutils-config: (mailutils)mailutils-config. List Information about Mailutils.
+* mail.local: (mailutils)mail.local. Deliver Mail to UNIX Mailboxes.
+* mail.remote: (mailutils)mail.remote. Forward Mail to Remote Machine.
@end direntry
@end ifinfo
@@ -132,6 +136,7 @@ Mailutils Programs
* sieve:: Mail Filtering Utility.
* guimb:: Mailbox Scanning and Processing Language.
+* maidag:: General-purpose Mail Delivery Agent.
* mail.local:: Deliver Mail to the Local Mailbox.
* mail.remote:: Pseudo-Sendmail Interface for Mail Delivery.
@@ -158,6 +163,7 @@ Mailutils Configuration File
* Debug Statement::
* Mailbox Statement::
* Locking Statement::
+* Mailer Statement::
* ACL Statement::
* Tcp-wrappers Statement::
* Server Settings::
@@ -244,6 +250,7 @@ Reading Mail
A Sieve Interpreter
* Invoking Sieve::
+* Sieve Configuration::
* Logging and Debugging::
* Extending Sieve::
@@ -254,34 +261,50 @@ A Sieve Interpreter
* Passing Options to Scheme::
* Command Line Option Summary::
-@command{mail.local} --- Deliver Mail to the Local Mailbox
+maidag
-* Invocation:: Mail.local options
-* MTA:: Using mail.local with various MTAs
-* Mailbox Quotas:: Setting up mailbox quotas.
-* Sieve Filters:: Implementing user-defined Sieve mail filters.
-* Scheme Filters:: Implementing user-defined Scheme mail filters.
+* Sendmail-maidag:: Using @command{maidag} with Sendmail.
+* Exim-maidag:: Using @command{maidag} with Exim.
+* MeTA1-maidag:: Using @command{maidag} with MeTA1.
+* Mailbox Quotas::
+* Maidag Scripting::
+* Forwarding::
+* Url-mode:: Delivering Messages to a URL.
+* Remote Mailbox Delivery::
+* Conf-maidag:: Maidag Configuration File Summary
-Using @command{mail.local} with Various MTAs
+Mailbox Quotas
-* Sendmail:: Using @command{mail.local} with Sendmail.
-* Exim:: Using @command{mail.local} with Exim.
+* DBM Quotas:: Keeping Quotas in DBM File.
+* SQL Quotas:: Keeping Quotas in SQL Database.
-Setting up Mailbox Quotas
+Maidag Scripting
-* DBM Quotas:: Keeping Quotas in DBM Database.
-* SQL Quotas:: Keeping Quotas in SQL Database.
+* Sieve Maidag Filters::
+* Scheme Maidag Filters::
+
+@command{mail.local} --- Deliver Mail to the Local UNIX Mailbox
+
+* Invocation:: Mail.local options
+* Mail.local Config::
+
+mimeview
+
+* Mimeview Invocation::
+* Mimeview Config::
POP3 Daemon
* Login delay::
* Auto-expire::
* Bulletins::
+* Conf-pop3d:: Pop3d Configuration
* Command line options::
IMAP4 Daemon
* Namespace:: Namespace.
+* Conf-imap4d:: Configuration.
* Starting imap4d:: Invocation Options.
Comsat Daemon
@@ -446,7 +469,6 @@ else is licensed using the GNU GPL.
@node Book Contents
@section What this Book Contains
-@UNREVISED
@FIXME{This is more a plan on how the document should be structured,
than a description of its actual structure. However it is:}
@@ -471,6 +493,13 @@ Mailutils.
Finally, the third part contains a complete Mailutils library
reference.
+ This version of the book is not finished. The places that may
+contain inaccurate information carry prominent notices stating so.
+For updated versions of the documentation, visit
+@uref{http://www.gnu.org/software/mailutils/manual}. If you have any
+questions, feel free to ask them at the mailing list
+@email{bug-mailutils@@gnu.org}.
+
@node History
@section A bit of History, and why use this package?
@UNREVISED
diff --git a/doc/texinfo/programs.texi b/doc/texinfo/programs.texi
index 4d88ee538..d4371d995 100644
--- a/doc/texinfo/programs.texi
+++ b/doc/texinfo/programs.texi
@@ -32,6 +32,7 @@ syntax.
* sieve:: Mail Filtering Utility.
* guimb:: Mailbox Scanning and Processing Language.
+* maidag:: General-purpose Mail Delivery Agent.
* mail.local:: Deliver Mail to the Local Mailbox.
* mail.remote:: Pseudo-Sendmail Interface for Mail Delivery.
@@ -48,7 +49,6 @@ syntax.
@node command line
@section Command Line
-@UNREVISED
@menu
* Option Basics:: Basic Notions About Command Line Options.
@@ -232,7 +232,6 @@ Do not load user configuration file.
@section Mailutils Configuration File
@cindex Mailutils configuration file
@cindex mailutils.rc
-@UNREVISED
Configuration files are the principal means of configuring any GNU
Mailutils component. When started, each utility tries to load its
@@ -364,7 +363,6 @@ and to edit the @file{imap4d.rc} file with your editor of choice.
@node conf-syntax
@subsection Configuration File Syntax
-@UNREVISED
Configuration files consist of a series of statements. Blanks,
tabs, newlines and comments, collectively called @dfn{white space} are
ignored except as they serve to separate tokens. Some white space is
@@ -844,7 +842,7 @@ favor of @code{mailbox-pattern} statement.
@deffn {Configuration} mailbox-pattern @var{pattern}
The @code{mailbox-pattern} statement is a modern way of configuring
-mailbox locations. It superceeds @code{mail-spool} statement.
+mailbox locations. It supersedes @code{mail-spool} statement.
The @var{pattern} is valid @dfn{mailbox URL}, which
may contain references to @samp{user} macro-variable
@@ -902,7 +900,7 @@ table. The result gives sub-directory name.
For example, using this algorithm, the mailbox of the user
@samp{smith} is stored in file @file{@var{path}/s/smith}.
-If each of single-letter subirectories contains the
+If each of single-letter subdirectories contains the
indexed directory structure, we have second level of indexing. In
this case the file name of @samp{smith}'s mailbox is
@file{@var{path}/s/m/smith}.
@@ -1574,7 +1572,7 @@ both stages succeed is the user allowed to use the service.
A set of @dfn{modules} is involved in performing each stage. For
example, the authorization stage can retrieve the user description
-from various sources: system database, sql database, virtual domain
+from various sources: system database, SQL database, virtual domain
table, etc. Each module is responsible for retrieving the description
from a particular source of information. The modules are arranged in
a @dfn{module list}. The modules from the list are invoked in turn,
@@ -1596,14 +1594,14 @@ For example, the authorization list
@noindent
means that first the system user database (@file{/etc/password}) is
searched for a description of a user in question. If the search fails,
-the @acronym{sql} database is searched. Finally, if it also fails, the
+the @acronym{SQL} database is searched. Finally, if it also fails, the
search is performed in the virtual domain database.
@emph{Note}, that some authentication and/or authorization modules may
be disabled when configuring the package before compilation. The names
of the disabled modules are nevertheless available for use in runtime
configuration options, but they represent a ``fail-only'' functionality,
-e.g. if the package was compiled without @acronym{sql} support then
+e.g. if the package was compiled without @acronym{SQL} support then
the module @samp{sql} in the above example will always fail, thus
passing the execution on to the next module.
@@ -1724,7 +1722,7 @@ user name can be present in several domains and represent different
users.
When authenticating to a server with virtual domain support enabled,
-users must supply their usernames with domain parts. The server strips
+users must supply their user names with domain parts. The server strips
off the domain part and uses it as a name of UNIX-format password
database file, located in the @dfn{domain password directory}. The
latter is set using @code{passwd-dir} statement.
@@ -3459,7 +3457,7 @@ command is replaced with the last executed command.
By default the date in a header summary is taken from the SMTP
envelope of the message. Setting this variable tells @command{mail}
to use the date from @code{Date:} header field, converted to
-localtime. Notice, that for messages lacking this field @command{mail}
+local time. Notice, that for messages lacking this field @command{mail}
will fall back to using SMTP envelope.
@item charset
@@ -4269,8 +4267,8 @@ If @var{bool} is @samp{true}, display entire headers.
@deffn {Readmsg Conf} weedlist @var{str}
Set the weedlist. The @var{str} argument is
-a string, containig a list of header names, separated by whitespace,
-commans or colons. This corresponds to the @option{--weedlist} command
+a string, containing a list of header names, separated by whitespace,
+commands or colons. This corresponds to the @option{--weedlist} command
line option (@pxref{Opt-readmsg, --weedlist}).
@end deffn
@@ -4366,7 +4364,7 @@ more of the following letters:
@multitable @columnfractions .40 .45
@item @samp{g} @tab Enable main parser traces
-@item @samp{T} @tab Enable mailutil traces
+@item @samp{T} @tab Enable mailutils traces
@item @samp{P} @tab Trace network protocols
@item @samp{t} @tab Enable sieve trace
@item @samp{i} @tab Trace the program instructions
@@ -4495,7 +4493,7 @@ If @var{bool} is @samp{true}, log all executed actions.
@end deffn
@deffn {Sieve Conf} line-info @var{bool}
-If @var{bool} is @samp{true}, rint source locations along with action
+If @var{bool} is @samp{true}, print source locations along with action
logs. This statement takes effect only if @code{verbose true} is also
set.
@end deffn
@@ -4840,37 +4838,635 @@ Display program version.
@end table
@page
+@node maidag
+@section maidag
+@pindex maidag
+
+The name @samp{maidag} stands for @i{Mai}l @i{d}elivery @i{ag}ent. It
+is a general-purpose @acronym{MDA} offering a rich set of
+features. It can operate both in traditional mode, reading the message
+from its standard input, and in @acronym{LMTP} mode. @command{Maidag}
+is able to deliver mail to any mailbox format, supported by GNU
+Mailutils. These formats, among others, include @samp{remote+smtp},
+@samp{remote+prog} and @samp{remote+sendmail} which are
+equivalent to forwarding a message over @acronym{SMTP} to a remote
+node. Thus, @command{maidag} supersedes both @command{mail.local} and
+@command{mail.remote} utilities from GNU Mailutils versions prior to
+2.0.
+
+@command{Maidag} is also able to process incoming messages using Sieve
+or Scheme scripts and, based on results of this processing, to take a decision
+on whether to actually deliver and where to deliver them. Due to its
+extensive scripting facilities, @command{maidag} offers much more
+flexibility than other popular @acronym{MDA}s, such as
+@command{procmail}.
+
+@menu
+* Sendmail-maidag:: Using @command{maidag} with Sendmail.
+* Exim-maidag:: Using @command{maidag} with Exim.
+* MeTA1-maidag:: Using @command{maidag} with MeTA1.
+* Mailbox Quotas::
+* Maidag Scripting::
+* Forwarding::
+* Url-mode:: Delivering Messages to a URL.
+* Remote Mailbox Delivery::
+* Conf-maidag:: Maidag Configuration File Summary
+@end menu
+
+@node Sendmail-maidag
+@subsection Using @command{maidag} with Sendmail.
+@cindex Sendmail
+When used as a @acronym{MDA} with Sendmail, @command{maidag} must be
+invoked from the local mailer definition in the @file{sendmail.cf}
+file. It must have the following flags set: @samp{lswS}. These mean:
+the mailer is local, quote characters should be stripped off the
+address before invoking the mailer, the user must have a valid account
+on this machine and the userid should not be reset before calling the
+mailer. Additionally, the flags @samp{fn} may be specified to allow
+@command{maidag} to generate the usual @samp{From } envelope instead
+of the one supplied by @command{sendmail}.
+
+If you wish to use @command{maidag} with non-local authentication,
+such as @acronym{SQL} or @acronym{LDAP}, you also need to remove the
+@samp{w} flag, since in that case the user is not required to have a
+valid account on the machine that runs @command{sendmail}.
+
+Here is an example of mailer definition in @file{sendmail.cf}
+
+@smallexample
+Mlocal, P=/usr/local/sbin/maidag,
+ F=lsDFMAw5:/|@@qSPfhn9,
+ S=EnvFromL/HdrFromL, R=EnvToL/HdrToL,
+ T=DNS/RFC822/X-Unix,
+ A=mail $u
+@end smallexample
+
+To define local mailer in @samp{mc} source file, it will suffice to
+set:
+
+@smallexample
+define(`LOCAL_MAILER_PATH', `/usr/local/sbin/maidag')
+define(`LOCAL_MAILER_ARGS', `mail $u')
+@end smallexample
+
+@node Exim-maidag
+@subsection Using @command{maidag} with Exim.
+@cindex Exim
+
+Using @command{maidag} with Exim is quite straightforward. The
+following example illustrates the definition of the appropriate transport
+and director in @file{exim.conf}:
+
+@smallexample
+# transport
+maidag_pipe:
+ driver = pipe
+ command = /usr/local/sbin/maidag $local_part
+ return_path_add
+ delivery_date_add
+ envelope_to_add
+
+# director
+maidag:
+ driver = localuser
+ transport = maidag_pipe
+@end smallexample
+
+@node MeTA1-maidag
+@subsection Using @command{maidag} with MeTA1.
+@cindex LMTP
+@cindex MeTA1
+MeTA1 (@uref{http://meta1.org}) communicates with the delivery agent
+using @acronym{LMTP}.
+
+LMTP mode is enabled in @command{maidag} by the @samp{lmpt yes}
+statement. The socket to listen on must be specified using
+@code{server} statement (@pxref{Server Settings}). For the purposes of
+this section, let's suppose @command{maidag} will listen on a
+@acronym{UNIX} socket @file{/var/spool/meta1/lmtpsock}. Then, the
+following (minimal) @command{maidag} configuration will do the job:
+
+@smallexample
+# @r{Start in LMTP mode.}
+lmtp yes;
+# @r{Run as daemon.}
+mode daemon;
+# @r{Switch to this group after startup.}
+group meta1c;
+# @r{Configure server:}
+server unix:///var/spool/meta1/lmtpsock @{
+ transcript no;
+@};
+@end smallexample
+
+To configure MeTA1 to use this socket, add the following statement to
+the @samp{smtpc} section in @file{/etc/meta1/meta1.conf}:
+
+@smallexample
+ LMTP_socket="lmtpsock";
+@end smallexample
+
+@node Mailbox Quotas
+@subsection Mailbox Quotas
+
+@dfn{Mailbox quota} is a limit on the size of the mailbox. When a
+mailbox size reaches this limit, @command{maidag} stops accepting
+messages for this recipient and returns an error condition to the
+sender. The error code is accompanied by the following error message:
+
+@smallexample
+@var{user}: mailbox quota exceeded for this recipient
+@end smallexample
+
+Furthermore, if accepting the incoming message would make the
+mailbox size exceed the quota, such a message will be rejected as
+well. In this case, the error message is:
+
+@smallexample
+@var{user}: message would exceed maximum mailbox size for this recipient
+@end smallexample
+
+In both cases, the default return code will be @samp{service
+unavailable} (corresponding to the @acronym{SMTP} return code
+@samp{550}), unless the following statement is present in the
+@command{maidag} configuration file:
+
+@smallexample
+exit-quota-tempfail yes;
+@end smallexample
+
+@noindent
+in which case a temporary error will be returned.
+
+The mailbox quota can be retrieved from the following sources:
+
+@enumerate 1
+@item Authentication method.
+@item @acronym{DBM} file.
+@item @acronym{SQL} database.
+@end enumerate
+
+@menu
+* DBM Quotas:: Keeping Quotas in DBM File.
+* SQL Quotas:: Keeping Quotas in SQL Database.
+@end menu
+
+@node DBM Quotas
+@subsubsection Keeping Quotas in DBM File
+
+To use @acronym{DBM} quota database, GNU Mailutils must
+be compiled with one of the following command line options:
+@option{--with-gdbm}, @option{--with-berkeley-db}, or
+@option{--with-ndbm}. Examine the output of @command{maidag
+--show-config-options}, if not sure.
+
+The quota database should have the following structure:
+
+@table @asis
+@item Key
+Key represents the user name. Special key @samp{DEFAULT} means default
+quota value, i.e. the one to be used if the user is not explicitly
+listed in the database.
+
+@item Value
+Mailbox quota for this user. If it is a number, it represents the
+maximum mailbox size in bytes. A number may optionally be followed by
+@samp{kb} or @samp{mb}, meaning kilobytes and megabytes, respectively.
+
+A special value @samp{NONE} means no mailbox size limit for this user.
+@end table
+
+Here is an example of a valid quota database
+
+@smallexample
+# Default quota value:
+DEFAULT 5mb
+
+# Following users have unlimited mailbox size
+root NONE
+smith NONE
+
+# Rest of users
+plog 26214400
+karin 10mB
+@end smallexample
+
+To use the @acronym{DBM} quota database, specify its absolute name using
+@code{quota-db} configuration statement, e.g.:
+
+@smallexample
+quota-db /etc/mail/quota.db;
+@end smallexample
+
+@node SQL Quotas
+@subsubsection Keeping Quotas in SQL Database
+
+Configuration statement @code{quota-query} allows to specify a special
+query to retrieve the quota from the database. Currently (as of mailutils
+version @value{VERSION}) it is assumed that this table can be accessed
+using the credentials set in @samp{sql} configuration statement
+(@pxref{SQL Statement}).
+
+For example, suppose you have the following quota table:
+
+@smallexample
+create table mailbox_quota (
+ user_name varchar(32) binary not null,
+ quota int,
+ unique (user_name)
+);
+@end smallexample
+
+@noindent
+
+To retrieve user quota the following query can be used:
+
+@smallexample
+SELECT quota FROM mailbox_quota WHERE user_name='$@{user@}'
+@end smallexample
+
+There are no special provisions for specifying group quotas, similar to
+@samp{DEFAULT} in @acronym{DBM} databases. This is because group quotas can
+easily be implemented using @acronym{SQL} language. @command{Maidag}
+always uses the first tuple from the set returned by mailbox quota
+query. So, you may add a special entry to the @code{mailbox_quota}
+table that would keep the group quota. In the discussion below we assume
+that the @code{user_name} column for this entry is lexicographically
+less than any other user name in the table. Let's suppose the group
+quota name is @samp{00DEFAULT}. Then the following query:
+
+@smallexample
+SELECT quota
+FROM mailbox_quota</