Commit 3ec5d07e 3ec5d07e67044b614b8beab0e34908b4eec23eab by Sergey Poznyakoff

Update docs + minor changes.

* .gitmodules: Add imprimatur.
* Makefile.am: Likewise.
* configure.ac: Likewise.
* doc/Makefile.am: Likewise.
* bootstrap.conf: Comment out make in doc/texinfo
* doc/texinfo/Makefile.am: Rewrite.
* doc/texinfo/fdl.texi: Minor change.
* doc/texinfo/getdate.texi: Minor change.
* doc/texinfo/mailutils.texi: begin rewrite.
* doc/texinfo/mu-mh.texi: Minor change.
* doc/texinfo/programs.texi: begin rewrite.
* doc/texinfo/sieve.texi: Minor change.
* doc/texinfo/usage.texi: Minor change.

* libmailutils/cfg/lexer.l: Allow for @ in unquoted strings
* pop3d/bulletin.c: Relax safety checks for bulletin.db
* pop3d/logindelay.c: Relax safety checks for stat.sb
* pop3d/pop3d.h (DEFAULT_GROUP_DB_SAFETY): New define.
1 parent 6d9c7d66
[submodule "gint"]
path = gint
url = git://git.gnu.org.ua/gint.git
[submodule "doc/imprimatur"]
path = doc/imprimatur
url = git://git.gnu.org.ua/imprimatur.git
......
......@@ -15,7 +15,7 @@
## You should have received a copy of the GNU General Public License
## along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
ACLOCAL_AMFLAGS = -I m4 -I am -I gint
ACLOCAL_AMFLAGS = -I m4 -I am -I gint -I doc/imprimatur
if MU_COND_PYTHON
PYTHON_DIR = python
......
......@@ -100,5 +100,5 @@ done
wget -P m4 http://git.savannah.gnu.org/cgit/radius.git/plain/scripts/radius.m4
# Create included listings for texinfo docs.
make -C doc/texinfo -f maint.mk
#make -C doc/texinfo -f maint.mk
......
......@@ -1316,23 +1316,7 @@ dnl get sysconfdir expanded.
CPPFLAGS="$CPPFLAGS -DSYSCONFDIR=\\\"\$(sysconfdir)\\\""
# Doc hints.
# Select a rendition level:
# DISTRIB for stable releases (at most one dot in the version number)
# and maintenance releases (two dots, patchlevel < 50)
# PROOF for alpha releases.
# PUBLISH can only be required manually when running make in doc/
AC_SUBST(RENDITION)
case `echo $VERSION|sed 's/[[^.]]//g'` in
""|".") RENDITION=DISTRIB;;
"..") if test `echo $VERSION | sed 's/.*\.//'` -lt 50; then
RENDITION=DISTRIB
else
AC_DEFINE_UNQUOTED([MU_ALPHA_RELEASE], 1,
[Define if this is an alpha release])
RENDITION=PROOF
fi;;
*) RENDITION=PROOF;;
esac
IMPRIMATUR_INIT([doc/imprimatur])
AC_CONFIG_COMMANDS([status],[
cat <<EOF
......
......@@ -15,5 +15,5 @@
## You should have received a copy of the GNU General Public License
## along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
SUBDIRS = texinfo man
SUBDIRS = imprimatur texinfo man
EXTRA_DIST = ChangeLog.CVS rfc/README
......
imprimatur @ f32ef198
Subproject commit f32ef1983968e755cd580b06e369476d7e7f88b6
......@@ -19,6 +19,10 @@ mailutils.tmp
mailutils.toc
mailutils.tp
mailutils.vr
mailutils.fl
mailutils.kw
mailutils.pdf
mailutils.pr
mdate-sh
muint.info*
stamp-1
......
......@@ -17,174 +17,53 @@
info_TEXINFOS = mailutils.texi
INCFILES = \
addr.inc\
http.inc\
mailcap.inc\
numaddr.inc\
sfrom.inc\
url-parse.inc
RENDITION_TEXI=rendition.texi macros.texi
mailutils_TEXINFOS = \
address.texi\
attribute.texi\
auth.texi\
body.texi\
c-api.texi\
encoding.texi\
envelope.texi\
fdl.texi\
folder.texi\
framework.texi\
getdate.texi\
headers.texi\
imap4.texi\
iterator.texi\
libmu_scm.texi\
libmu_auth.texi\
libmu_sieve.texi\
locker.texi\
mailbox.texi\
mailcap.texi\
maildir.texi\
mailer.texi\
mbox.texi\
message.texi\
mh.texi\
macros.texi\
mu-mh.texi\
mu_address.texi\
mu_body.texi\
mu_logger.texi\
mu_mailbox.texi\
mu_message.texi\
mu_mime.texi\
mu_scm.texi\
nntp.texi\
parse822.texi\
pop3.texi\
programs.texi\
sendmail.texi\
sieve.texi\
smtp.texi\
stream.texi\
usage.texi\
url.texi\
$(RENDITION_TEXI)\
$(INCFILES)
version.texi
DISTCLEANFILES=*.pgs *.kys *.vrs
clean-local:
rm -rf manual
# The rendering level is one of PUBLISH, DISTRIB or PROOF.
# Just call `make RENDITION=PROOF [target]' if you want PROOF rendition.
MAKEINFOFLAGS=-D$(RENDITION)
GENDOCS=gendocs.sh
TEXI2DVI=texi2dvi -t '@set $(RENDITION)' -E
# Make sure you set TEXINPUTS.
# TEXINPUTS=/usr/share/texmf/pdftex/plain/misc/ is ok for most distributions
TEXINPUTS=$(srcdir):$(top_srcdir)/build-aux:$$TEXINPUTS
manual:
TEXINPUTS=$(srcdir):$(top_srcdir)/build-aux:$(TEXINPUTS) \
MAKEINFO="$(MAKEINFO) $(MAKEINFOFLAGS)" \
TEXI2DVI="$(TEXI2DVI) -t @finalout" \
$(GENDOCS) --texi2html $(PACKAGE) '$(PACKAGE_NAME) manual'
AM_MAKEINFOFLAGS = @IMPRIMATUR_MAKEINFOFLAGS@
# Imprimatur setup
imprimatur_INPUT=$(info_TEXINFOS) $(mailutils_TEXINFOS)
include ../imprimatur/imprimatur.mk
#CHECK_DOCS=$(top_srcdir)/@IMPRIMATUR_MODULE_DIR@/check-docs.sh
EXTRA_DIST=gendocs_template mastermenu.el untabify.el
# Checking
all-check-docs: imprimatur-basic-checks
master-menu:
emacs -batch -l mastermenu.el -f make-master-menu $(info_TEXINFOS)
check-docs:
@$(MAKE) -k all-check-docs
untabify:
emacs -batch -l untabify.el $(info_TEXINFOS) $(mailutils_TEXINFOS)
#
fix-sentence-spacing:
for file in $(info_TEXINFOS) $(mailutils_TEXINFOS); \
do \
if grep -q '\. [@A-Z]' $$file; then \
mv $$file $${file}~; \
sed -r 's/\. ([@A-Z])/. \1/g' $${file}~ > $$file; \
fi; \
done
master-menu: imprimatur-master-menu
untabify: imprimatur-untabify
final: imprimatur-final
final: untabify fix-sentence-spacing master-menu
# Web manual
#EXTRA_DIST = \
# gendocs_template
# Checks
check-tabs:
@if test -n "`cat $(info_TEXINFOS) $(mailutils_TEXINFOS) |\
tr -d -c '\t'`"; then \
echo >&2 "Sources contain tabs; run make untabify"; \
false; \
fi
check-sentence-spacing:
@if grep -q '\. [@A-Z]' $(info_TEXINFOS) $(mailutils_TEXINFOS); then \
echo >&2 "Sources contain double-space sentence separators"; \
echo >&2 "Run make fix-sentence-spacing to fix"; \
fi
check-format: check-tabs check-sentence-spacing
check-refs:
@for file in $(info_TEXINFOS) $(mailutils_TEXINFOS); \
do \
sed -e = $$file | \
sed -n 'N;/@FIXME-.*ref/{s/\(^[0-9][0-9]*\).*@FIXME-.*ref{\([^}]*\)}.*/'$$file':\1: \2/gp}'; \
done > $@-t; \
if [ -s $@-t ]; then \
echo >&2 "Unresolved cross-references:"; \
cat $@-t >&2;\
rm $@-t; \
else \
rm -f $@-t; \
fi
check-fixmes:
@for file in $(info_TEXINFOS) $(mailutils_TEXINFOS); \
do \
sed -e = $$file | \
sed -n 'N;/@FIXME{/{s/\(^[0-9][0-9]*\).*@FIXME{\([^}]*\).*/'$$file':\1: \2/gp}'; \
done > $@-t; \
if [ -s $@-t ]; then \
echo >&2 "Unresolved FIXMEs:"; \
cat $@-t >&2; \
rm $@-t; \
false; \
else \
rm -f $@-t; \
fi
check-writeme:
@grep -Hn @WRITEME $(info_TEXINFOS) $(mailutils_TEXINFOS) > $@-t; \
if [ -s $@-t ]; then \
echo "Empty nodes:"; \
cat $@-t; \
rm $@-t; \
false;\
else \
rm $@-t; \
fi
GENDOCS=gendocs.sh
TEXI2DVI=texi2dvi -t '@set $(RENDITION)' -E
check-unrevised:
@grep -Hn @UNREVISED $(info_TEXINFOS) $(mailutils_TEXINFOS) > $@-t; \
if [ -s $@-t ]; then \
echo >&2 "Unrevised nodes:"; \
cat $@-t >&2; \
rm $@-t; \
false;\
else \
rm $@-t; \
fi
.PHONY: manual
manual:
TEXINPUTS=$(srcdir):$(top_srcdir)/build-aux:$(TEXINPUTS) \
MAKEINFO="$(MAKEINFO) $(MAKEINFOFLAGS) $(AM_MAKEINFOFLAGS)" \
TEXI2DVI="$(TEXI2DVI)" \
TEXI2HTML="texi2html $(AM_MAKEINFOFLAGS)" \
$(GENDOCS) --texi2html $(PACKAGE) '$(PACKAGE_NAME) manual'
all-check-docs: check-format check-writeme check-unrevised check-refs check-fixmes
manual.tar.bz2: manual
tar cfj manual.tar.bz2 manual
check-docs:
$(MAKE) -k all-check-docs
man-tar: manual.tar.bz2
......
@setfilename fdl.info
@node GNU FDL
@appendix GNU Free Documentation License
@cindex FDL, GNU Free Documentation License
@center Version 1.2, November 2002
......@@ -26,16 +23,16 @@ to get credit for their work, while not being considered responsible
for modifications made by others.
This License is a kind of ``copyleft'', which means that derivative
works of the document must themselves be free in the same sense. It
works of the document must themselves be free in the same sense. It
complements the GNU General Public License, which is a copyleft
license designed for free software.
We have designed this License in order to use it for manuals for free
software, because free software needs free documentation: a free
program should come with manuals providing the same freedoms that the
software does. But this License is not limited to software manuals;
software does. But this License is not limited to software manuals;
it can be used for any textual work, regardless of subject matter or
whether it is published as a printed book. We recommend this License
whether it is published as a printed book. We recommend this License
principally for works whose purpose is instruction or reference.
@item
......@@ -43,11 +40,11 @@ APPLICABILITY AND DEFINITIONS
This License applies to any manual or other work, in any medium, that
contains a notice placed by the copyright holder saying it can be
distributed under the terms of this License. Such a notice grants a
distributed under the terms of this License. Such a notice grants a
world-wide, royalty-free license, unlimited in duration, to use that
work under the conditions stated herein. The ``Document'', below,
refers to any such manual or work. Any member of the public is a
licensee, and is addressed as ``you''. You accept the license if you
work under the conditions stated herein. The ``Document'', below,
refers to any such manual or work. Any member of the public is a
licensee, and is addressed as ``you''. You accept the license if you
copy, modify or distribute the work in a way requiring permission
under copyright law.
......@@ -68,15 +65,15 @@ them.
The ``Invariant Sections'' are certain Secondary Sections whose titles
are designated, as being those of Invariant Sections, in the notice
that says that the Document is released under this License. If a
that says that the Document is released under this License. If a
section does not fit the above definition of Secondary then it is not
allowed to be designated as Invariant. The Document may contain zero
Invariant Sections. If the Document does not identify any Invariant
allowed to be designated as Invariant. The Document may contain zero
Invariant Sections. If the Document does not identify any Invariant
Sections then there are none.
The ``Cover Texts'' are certain short passages of text that are listed,
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
the Document is released under this License. A Front-Cover Text may
the Document is released under this License. A Front-Cover Text may
be at most 5 words, and a Back-Cover Text may be at most 25 words.
A ``Transparent'' copy of the Document means a machine-readable copy,
......@@ -86,19 +83,19 @@ straightforwardly with generic text editors or (for images composed of
pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or
for automatic translation to a variety of formats suitable for input
to text formatters. A copy made in an otherwise Transparent file
to text formatters. A copy made in an otherwise Transparent file
format whose markup, or absence of markup, has been arranged to thwart
or discourage subsequent modification by readers is not Transparent.
An image format is not Transparent if used for any substantial amount
of text. A copy that is not ``Transparent'' is called ``Opaque''.
of text. A copy that is not ``Transparent'' is called ``Opaque''.
Examples of suitable formats for Transparent copies include plain
@sc{ascii} without markup, Texinfo input format, La@TeX{} input
format, @acronym{SGML} or @acronym{XML} using a publicly available
@acronym{DTD}, and standard-conforming simple @acronym{HTML},
PostScript or @acronym{PDF} designed for human modification. Examples
PostScript or @acronym{PDF} designed for human modification. Examples
of transparent image formats include @acronym{PNG}, @acronym{XCF} and
@acronym{JPG}. Opaque formats include proprietary formats that can be
@acronym{JPG}. Opaque formats include proprietary formats that can be
read and edited only by proprietary word processors, @acronym{SGML} or
@acronym{XML} for which the @acronym{DTD} and/or processing tools are
not generally available, and the machine-generated @acronym{HTML},
......@@ -107,7 +104,7 @@ output purposes only.
The ``Title Page'' means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the material
this License requires to appear in the title page. For works in
this License requires to appear in the title page. For works in
formats which do not have any title page as such, ``Title Page'' means
the text near the most prominent appearance of the work's title,
preceding the beginning of the body of the text.
......@@ -121,7 +118,7 @@ of such a section when you modify the Document means that it remains a
section ``Entitled XYZ'' according to this definition.
The Document may include Warranty Disclaimers next to the notice which
states that this License applies to the Document. These Warranty
states that this License applies to the Document. These Warranty
Disclaimers are considered to be included by reference in this
License, but only as regards disclaiming warranties: any other
implication that these Warranty Disclaimers may have is void and has
......@@ -134,10 +131,10 @@ You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License applies
to the Document are reproduced in all copies, and that you add no other
conditions whatsoever to those of this License. You may not use
conditions whatsoever to those of this License. You may not use
technical measures to obstruct or control the reading or further
copying of the copies you make or distribute. However, you may accept
compensation in exchange for copies. If you distribute a large enough
copying of the copies you make or distribute. However, you may accept
compensation in exchange for copies. If you distribute a large enough
number of copies you must also follow the conditions in section 3.
You may also lend copies, under the same conditions stated above, and
......@@ -151,10 +148,10 @@ printed covers) of the Document, numbering more than 100, and the
Document's license notice requires Cover Texts, you must enclose the
copies in covers that carry, clearly and legibly, all these Cover
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
the back cover. Both covers must also clearly and legibly identify
you as the publisher of these copies. The front cover must present
the back cover. Both covers must also clearly and legibly identify
you as the publisher of these copies. The front cover must present
the full title with all words of the title equally prominent and
visible. You may add other material on the covers in addition.
visible. You may add other material on the covers in addition.
Copying with changes limited to the covers, as long as they preserve
the title of the Document and satisfy these conditions, can be treated
as verbatim copying in other respects.
......@@ -189,14 +186,14 @@ the conditions of sections 2 and 3 above, provided that you release
the Modified Version under precisely this License, with the Modified
Version filling the role of the Document, thus licensing distribution
and modification of the Modified Version to whoever possesses a copy
of it. In addition, you must do these things in the Modified Version:
of it. In addition, you must do these things in the Modified Version:
@enumerate A
@item
Use in the Title Page (and on the covers, if any) a title distinct
from that of the Document, and from those of previous versions
(which should, if there were any, be listed in the History section
of the Document). You may use the same title as a previous version
of the Document). You may use the same title as a previous version
if the original publisher of that version gives permission.
@item
......@@ -232,7 +229,7 @@ Include an unaltered copy of this License.
@item
Preserve the section Entitled ``History'', Preserve its Title, and add
to it an item stating at least the title, year, new authors, and
publisher of the Modified Version as given on the Title Page. If
publisher of the Modified Version as given on the Title Page. If
there is no section Entitled ``History'' in the Document, create one
stating the title, year, authors, and publisher of the Document as
given on its Title Page, then add an item describing the Modified
......@@ -242,7 +239,7 @@ Version as stated in the previous sentence.
Preserve the network location, if any, given in the Document for
public access to a Transparent copy of the Document, and likewise
the network locations given in the Document for previous versions
it was based on. These may be placed in the ``History'' section.
it was based on. These may be placed in the ``History'' section.
You may omit a network location for a work that was published at
least four years before the Document itself, or if the original
publisher of the version it refers to gives permission.
......@@ -255,11 +252,11 @@ dedications given therein.
@item
Preserve all the Invariant Sections of the Document,
unaltered in their text and in their titles. Section numbers
unaltered in their text and in their titles. Section numbers
or the equivalent are not considered part of the section titles.
@item
Delete any section Entitled ``Endorsements''. Such a section
Delete any section Entitled ``Endorsements''. Such a section
may not be included in the Modified Version.
@item
......@@ -273,7 +270,7 @@ Preserve any Warranty Disclaimers.
If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no material
copied from the Document, you may at your option designate some or all
of these sections as invariant. To do this, add their titles to the
of these sections as invariant. To do this, add their titles to the
list of Invariant Sections in the Modified Version's license notice.
These titles must be distinct from any other section titles.
......@@ -285,9 +282,9 @@ standard.
You may add a passage of up to five words as a Front-Cover Text, and a
passage of up to 25 words as a Back-Cover Text, to the end of the list
of Cover Texts in the Modified Version. Only one passage of
of Cover Texts in the Modified Version. Only one passage of
Front-Cover Text and one of Back-Cover Text may be added by (or
through arrangements made by) any one entity. If the Document already
through arrangements made by) any one entity. If the Document already
includes a cover text for the same cover, previously added by you or
by arrangement made by the same entity you are acting on behalf of,
you may not add another; but you may replace the old one, on explicit
......@@ -309,7 +306,7 @@ license notice, and that you preserve all their Warranty Disclaimers.
The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
copy. If there are multiple Invariant Sections with the same name but
copy. If there are multiple Invariant Sections with the same name but
different contents, make the title of each such section unique by
adding at the end of it, in parentheses, the name of the original
author or publisher of that section if known, or else a unique number.
......@@ -319,7 +316,7 @@ Invariant Sections in the license notice of the combined work.
In the combination, you must combine any sections Entitled ``History''
in the various original documents, forming one section Entitled
``History''; likewise combine any sections Entitled ``Acknowledgements'',
and any sections Entitled ``Dedications''. You must delete all
and any sections Entitled ``Dedications''. You must delete all
sections Entitled ``Endorsements.''
@item
......@@ -364,11 +361,11 @@ distribute translations of the Document under the terms of section 4.
Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections. You may include a
original versions of these Invariant Sections. You may include a
translation of this License, and all the license notices in the
Document, and any Warranty Disclaimers, provided that you also include
the original English version of this License and the original versions
of those notices and disclaimers. In case of a disagreement between
of those notices and disclaimers. In case of a disagreement between
the translation and the original version of this License or a notice
or disclaimer, the original version will prevail.
......@@ -381,9 +378,9 @@ title.
TERMINATION
You may not copy, modify, sublicense, or distribute the Document except
as expressly provided for under this License. Any other attempt to
as expressly provided for under this License. Any other attempt to
copy, modify, sublicense or distribute the Document is void, and will
automatically terminate your rights under this License. However,
automatically terminate your rights under this License. However,
parties who have received copies, or rights, from you under this
License will not have their licenses terminated so long as such
parties remain in full compliance.
......@@ -392,9 +389,9 @@ parties remain in full compliance.
FUTURE REVISIONS OF THIS LICENSE
The Free Software Foundation may publish new, revised versions
of the GNU Free Documentation License from time to time. Such new
of the GNU Free Documentation License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns. See
differ in detail to address new problems or concerns. See
@uref{http://www.gnu.org/copyleft/}.
Each version of the License is given a distinguishing version number.
......@@ -402,7 +399,7 @@ If the Document specifies that a particular numbered version of this
License ``or any later version'' applies to it, you have the option of
following the terms and conditions either of that specified version or
of any later version that has been published (not as a draft) by the
Free Software Foundation. If the Document does not specify a version
Free Software Foundation. If the Document does not specify a version
number of this License, you may choose any version ever published (not
as a draft) by the Free Software Foundation.
@end enumerate
......
......@@ -7,7 +7,7 @@
@c under the terms of the GNU Free Documentation License, Version 1.2 or
@c any later version published by the Free Software Foundation; with no
@c Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
@c Texts. A copy of the license is included in the ``GNU Free
@c Texts. A copy of the license is included in the ``GNU Free
@c Documentation License'' file as part of this distribution.
@cindex date input formats
......@@ -18,30 +18,30 @@ First, a quote:
@quotation
Our units of temporal measurement, from seconds on up to months, are so
complicated, asymmetrical and disjunctive so as to make coherent mental
reckoning in time all but impossible. Indeed, had some tyrannical god
reckoning in time all but impossible. Indeed, had some tyrannical god
contrived to enslave our minds to time, to make it all but impossible
for us to escape subjection to sodden routines and unpleasant surprises,
he could hardly have done better than handing down our present system.
It is like a set of trapezoidal building blocks, with no vertical or
horizontal surfaces, like a language in which the simplest thought
demands ornate constructions, useless particles and lengthy
circumlocutions. Unlike the more successful patterns of language and
circumlocutions. Unlike the more successful patterns of language and
science, which enable us to face experience boldly or at least
level-headedly, our system of temporal calculation silently and
persistently encourages our terror of time.
@dots{} It is as though architects had to measure length in feet, width
in meters and height in ells; as though basic instruction manuals
demanded a knowledge of five different languages. It is no wonder then
demanded a knowledge of five different languages. It is no wonder then
that we often look into our own immediate past or future, last Tuesday
or a week from Sunday, with feelings of helpless confusion. @dots{}
or a week from Sunday, with feelings of helpless confusion. @dots{}
--- Robert Grudin, @cite{Time and the Art of Living}.
@end quotation
This section describes the textual date representations that @sc{gnu}
programs accept. These are the strings you, as a user, can supply as
arguments to the various programs. The C interface (via the
programs accept. These are the strings you, as a user, can supply as
arguments to the various programs. The C interface (via the
@code{get_date} function) is not described here.
@menu
......@@ -65,9 +65,9 @@ arguments to the various programs. The C interface (via the
@cindex items in date strings
A @dfn{date} is a string, possibly empty, containing many items
separated by whitespace. The whitespace may be omitted when no
ambiguity arises. The empty string means the beginning of today (i.e.,
midnight). Order of the items is immaterial. A date string may contain
separated by whitespace. The whitespace may be omitted when no
ambiguity arises. The empty string means the beginning of today (i.e.,
midnight). Order of the items is immaterial. A date string may contain
many flavors of items:
@itemize @bullet
......@@ -86,11 +86,11 @@ many flavors of items:
@findex first @r{in date strings}
@findex next @r{in date strings}
@findex last @r{in date strings}
A few ordinal numbers may be written out in words in some contexts. This is
A few ordinal numbers may be written out in words in some contexts. This is
most useful for specifying day of the week items or relative items (see
below). Among the most commonly used ordinal numbers, the word
below). Among the most commonly used ordinal numbers, the word
@samp{last} stands for @math{-1}, @samp{this} stands for 0, and
@samp{first} and @samp{next} both stand for 1. Because the word
@samp{first} and @samp{next} both stand for 1. Because the word
@samp{second} stands for the unit of time there is no way to write the
ordinal number 2, but for convenience @samp{third} stands for 3,
@samp{fourth} for 4, @samp{fifth} for 5,
......@@ -113,10 +113,10 @@ abbreviations like @samp{AM}, @samp{DST}, @samp{EST}, @samp{first},
The output of the @command{date} command
is not always acceptable as a date string,
not only because of the language problem, but also because there is no
standard meaning for time zone items like @samp{IST}. When using
standard meaning for time zone items like @samp{IST}. When using
@command{date} to generate a date string intended to be parsed later,
specify a date format that is independent of language and that does not
use time zone items other than @samp{UTC} and @samp{Z}. Here are some
use time zone items other than @samp{UTC} and @samp{Z}. Here are some
ways to do this:
@example
......@@ -136,13 +136,13 @@ $ date +'@@%s.%N' # %s and %N are GNU extensions.
@cindex case, ignored in dates
@cindex comments, in dates
Alphabetic case is completely ignored in dates. Comments may be introduced
Alphabetic case is completely ignored in dates. Comments may be introduced
between round parentheses, as long as included parentheses are properly
nested. Hyphens not followed by a digit are currently ignored. Leading
nested. Hyphens not followed by a digit are currently ignored. Leading
zeros on numbers are ignored.
Invalid dates like @samp{2005-02-29} or times like @samp{24:00} are
rejected. In the typical case of a host that does not support leap
rejected. In the typical case of a host that does not support leap
seconds, a time like @samp{23:59:60} is rejected even if it
corresponds to a valid leap second.
......@@ -152,9 +152,9 @@ corresponds to a valid leap second.
@cindex calendar date item
A @dfn{calendar date item} specifies a day of the year. It is
A @dfn{calendar date item} specifies a day of the year. It is
specified differently, depending on whether the month is specified
numerically or literally. All these strings specify the same calendar date:
numerically or literally. All these strings specify the same calendar date:
@example
1972-09-24 # @sc{iso} 8601.
......@@ -170,8 +170,8 @@ Sep 24, 1972
24sep72
@end example
The year can also be omitted. In this case, the last specified year is
used, or the current year if none. For example:
The year can also be omitted. In this case, the last specified year is
used, or the current year if none. For example:
@example
9/24
......@@ -185,19 +185,19 @@ Here are the rules.
For numeric months, the @sc{iso} 8601 format
@samp{@var{year}-@var{month}-@var{day}} is allowed, where @var{year} is
any positive number, @var{month} is a number between 01 and 12, and
@var{day} is a number between 01 and 31. A leading zero must be present
if a number is less than ten. If @var{year} is 68 or smaller, then 2000
@var{day} is a number between 01 and 31. A leading zero must be present
if a number is less than ten. If @var{year} is 68 or smaller, then 2000
is added to it; otherwise, if @var{year} is less than 100,
then 1900 is added to it. The construct
then 1900 is added to it. The construct
@samp{@var{month}/@var{day}/@var{year}}, popular in the United States,
is accepted. Also @samp{@var{month}/@var{day}}, omitting the year.
is accepted. Also @samp{@var{month}/@var{day}}, omitting the year.
@cindex month names in date strings
@cindex abbreviations for months
Literal months may be spelled out in full: @samp{January},
@samp{February}, @samp{March}, @samp{April}, @samp{May}, @samp{June},
@samp{July}, @samp{August}, @samp{September}, @samp{October},
@samp{November} or @samp{December}. Literal months may be abbreviated
@samp{November} or @samp{December}. Literal months may be abbreviated
to their first three letters, possibly followed by an abbreviating dot.
It is also permitted to write @samp{Sept} instead of @samp{September}.
......@@ -224,13 +224,13 @@ Or, omitting the year:
@cindex time of day item
A @dfn{time of day item} in date strings specifies the time on a given
day. Here are some examples, all of which represent the same time:
day. Here are some examples, all of which represent the same time:
@example
20:02:00.000000
20:02
8:02pm
20:02-0500 # In @sc{est} (U.S. Eastern Standard Time).
20:02-0500 # In @sc{est} (U.S. Eastern Standard Time).
@end example
More generally, the time of day may be given as
......@@ -240,7 +240,7 @@ a number between 0 and 23, @var{minute} is a number between 0 and
@samp{.} or @samp{,} and a fraction containing one or more digits.
Alternatively,
@samp{:@var{second}} can be omitted, in which case it is taken to
be zero. On the rare hosts that support leap seconds, @var{second}
be zero. On the rare hosts that support leap seconds, @var{second}
may be 60.
@findex am @r{in date strings}
......@@ -249,9 +249,9 @@ may be 60.
@findex noon @r{in date strings}
If the time is followed by @samp{am} or @samp{pm} (or @samp{a.m.}
or @samp{p.m.}), @var{hour} is restricted to run from 1 to 12, and
@samp{:@var{minute}} may be omitted (taken to be zero). @samp{am}
@samp{:@var{minute}} may be omitted (taken to be zero). @samp{am}
indicates the first half of the day, @samp{pm} indicates the second
half of the day. In this notation, 12 is the predecessor of 1:
half of the day. In this notation, 12 is the predecessor of 1:
midnight is @samp{12am} while noon is @samp{12pm}.
(This is the zero-oriented interpretation of @samp{12am} and @samp{12pm},
as opposed to the old tradition derived from Latin
......@@ -269,7 +269,7 @@ You can also separate @var{hh} from @var{mm} with a colon.
When a time zone correction is given this way, it
forces interpretation of the time relative to
Coordinated Universal Time (@sc{utc}), overriding any previous
specification for the time zone or the local time zone. For example,
specification for the time zone or the local time zone. For example,
@samp{+0530} and @samp{+05:30} both stand for the time zone 5.5 hours
ahead of @sc{utc} (e.g., India).
This is the best way to
......@@ -288,19 +288,19 @@ but not both.
A @dfn{time zone item} specifies an international time zone, indicated
by a small set of letters, e.g., @samp{UTC} or @samp{Z}
for Coordinated Universal
Time. Any included periods are ignored. By following a
Time. Any included periods are ignored. By following a
non-daylight-saving time zone by the string @samp{DST} in a separate
word (that is, separated by some white space), the corresponding
daylight saving time zone may be specified.
Alternatively, a non-daylight-saving time zone can be followed by a
time zone correction, to add the two values. This is normally done
time zone correction, to add the two values. This is normally done
only for @samp{UTC}; for example, @samp{UTC+05:30} is equivalent to
@samp{+05:30}.
Time zone items other than @samp{UTC} and @samp{Z}
are obsolescent and are not recommended, because they
are ambiguous; for example, @samp{EST} has a different meaning in
Australia than in the United States. Instead, it's better to use
Australia than in the United States. Instead, it's better to use
unambiguous numeric time zone corrections like @samp{-0500}, as
described in the previous section.
......@@ -319,8 +319,8 @@ The explicit mention of a day of the week will forward the date
Days of the week may be spelled out in full: @samp{Sunday},
@samp{Monday}, @samp{Tuesday}, @samp{Wednesday}, @samp{Thursday},
@samp{Friday} or @samp{Saturday}. Days may be abbreviated to their
first three letters, optionally followed by a period. The special
@samp{Friday} or @samp{Saturday}. Days may be abbreviated to their
first three letters, optionally followed by a period. The special
abbreviations @samp{Tues} for @samp{Tuesday}, @samp{Wednes} for
@samp{Wednesday} and @samp{Thur} or @samp{Thurs} for @samp{Thursday} are
also allowed.
......@@ -328,8 +328,8 @@ also allowed.
@findex next @var{day}
@findex last @var{day}
A number may precede a day of the week item to move forward
supplementary weeks. It is best used in expression like @samp{third
monday}. In this context, @samp{last @var{day}} or @samp{next
supplementary weeks. It is best used in expression like @samp{third
monday}. In this context, @samp{last @var{day}} or @samp{next
@var{day}} is also acceptable; they move one week before or after
the day that @var{day} by itself would represent.
......@@ -343,7 +343,7 @@ A comma following a day of the week item is ignored.
@cindex displacement of dates
@dfn{Relative items} adjust a date (or the current date if none) forward
or backward. The effects of relative items accumulate. Here are some
or backward. The effects of relative items accumulate. Here are some
examples:
@example
......@@ -361,18 +361,18 @@ examples:
@findex hour @r{in date strings}
@findex minute @r{in date strings}
The unit of time displacement may be selected by the string @samp{year}
or @samp{month} for moving by whole years or months. These are fuzzy
units, as years and months are not all of equal duration. More precise
or @samp{month} for moving by whole years or months. These are fuzzy
units, as years and months are not all of equal duration. More precise
units are @samp{fortnight} which is worth 14 days, @samp{week} worth 7
days, @samp{day} worth 24 hours, @samp{hour} worth 60 minutes,
@samp{minute} or @samp{min} worth 60 seconds, and @samp{second} or
@samp{sec} worth one second. An @samp{s} suffix on these units is
@samp{sec} worth one second. An @samp{s} suffix on these units is
accepted and ignored.
@findex ago @r{in date strings}
The unit of time may be preceded by a multiplier, given as an optionally
signed number. Unsigned numbers are taken as positively signed. No
number at all implies 1 for a multiplier. Following a relative item by
signed number. Unsigned numbers are taken as positively signed. No
number at all implies 1 for a multiplier. Following a relative item by
the string @samp{ago} is equivalent to preceding the unit by a
multiplier with value @math{-1}.
......@@ -389,8 +389,8 @@ one day in the past (equivalent to @samp{day ago}).
The strings @samp{now} or @samp{today} are relative items corresponding
to zero-valued time displacement, these strings come from the fact
a zero-valued time displacement represents the current time when not
otherwise changed by previous items. They may be used to stress other
items, like in @samp{12:00 today}. The string @samp{this} also has
otherwise changed by previous items. They may be used to stress other
items, like in @samp{12:00 today}. The string @samp{this} also has
the meaning of a zero-valued time displacement, but is preferred in
date strings like @samp{this thursday}.
......@@ -398,11 +398,11 @@ When a relative item causes the resulting date to cross a boundary
where the clocks were adjusted, typically for daylight saving time,
the resulting date and time are adjusted accordingly.
The fuzz in units can cause problems with relative items. For
The fuzz in units can cause problems with relative items. For
example, @samp{2003-07-31 -1 month} might evaluate to 2003-07-01,
because 2003-06-31 is an invalid date. To determine the previous
because 2003-06-31 is an invalid date. To determine the previous
month more reliably, you can ask for the month before the 15th of the
current month. For example:
current month. For example:
@example
$ date -R
......@@ -414,7 +414,7 @@ Last month was June!
@end example
Also, take care when manipulating dates around clock changes such as
daylight saving leaps. In a few cases these have added or subtracted
daylight saving leaps. In a few cases these have added or subtracted
as much as 24 hours from the clock, so it is often wise to adopt
universal time by setting the @env{TZ} environment variable to
@samp{UTC0} before embarking on calendrical calculations.
......@@ -436,7 +436,7 @@ calendar date.
If the decimal number is of the form @var{hh}@var{mm} and no other time
of day item appears before it in the date string, then @var{hh} is read
as the hour of the day and @var{mm} as the minute of the hour, for the
specified time of day. @var{mm} can also be omitted.
specified time of day. @var{mm} can also be omitted.
If both a calendar date and a time of day appear to the left of a number
in the date string, but no relative item, then the number overrides the
......@@ -447,26 +447,26 @@ year.
@section Seconds since the Epoch
If you precede a number with @samp{@@}, it represents an internal time
stamp as a count of seconds. The number can contain an internal
stamp as a count of seconds. The number can contain an internal
decimal point (either @samp{.} or @samp{,}); any excess precision not
supported by the internal representation is truncated toward minus
infinity. Such a number cannot be combined with any other date
infinity. Such a number cannot be combined with any other date
item, as it specifies a complete time stamp.
@cindex beginning of time, for @acronym{POSIX}
@cindex epoch, for @acronym{POSIX}
Internally, computer times are represented as a count of seconds since
an epoch---a well-defined point of time. On @acronym{GNU} and
an epoch---a well-defined point of time. On @acronym{GNU} and
@acronym{POSIX} systems, the epoch is 1970-01-01 00:00:00 @sc{utc}, so
@samp{@@0} represents this time, @samp{@@1} represents 1970-01-01
00:00:01 @sc{utc}, and so forth. @acronym{GNU} and most other
00:00:01 @sc{utc}, and so forth. @acronym{GNU} and most other
@acronym{POSIX}-compliant systems support such times as an extension
to @acronym{POSIX}, using negative counts, so that @samp{@@-1}
represents 1969-12-31 23:59:59 @sc{utc}.
Traditional Unix systems count seconds with 32-bit two's-complement
integers and can represent times from 1901-12-13 20:45:52 through
2038-01-19 03:14:07 @sc{utc}. More modern systems use 64-bit counts
2038-01-19 03:14:07 @sc{utc}. More modern systems use 64-bit counts
of seconds with nanosecond subcounts, and can represent all the times
in the known lifetime of the universe to a resolution of 1 nanosecond.
......@@ -482,9 +482,9 @@ For example, on most hosts @samp{@@915148799} represents 1998-12-31
@vindex TZ
Normally, dates are interpreted using the rules of the current time
zone, which in turn are specified by the @env{TZ} environment
variable, or by a system default if @env{TZ} is not set. To specify a
variable, or by a system default if @env{TZ} is not set. To specify a
different set of default time zone rules that apply just to one date,
start the date with a string of the form @samp{TZ="@var{rule}"}. The
start the date with a string of the form @samp{TZ="@var{rule}"}. The
two quote characters (@samp{"}) must be present in the date, and any
quotes or backslashes within @var{rule} must be escaped by a
backslash.
......@@ -503,7 +503,7 @@ Sun Oct 31 01:30:00 EDT 2004
In this example, the @option{--date} operand begins with its own
@env{TZ} setting, so the rest of that operand is processed according
to @samp{Europe/Paris} rules, treating the string @samp{2004-10-31
06:30} as if it were in Paris. However, since the output of the
06:30} as if it were in Paris. However, since the output of the
@command{date} command is processed according to the overall time zone
rules, it uses New York time. (Paris was normally six hours ahead of
New York in 2004, but this example refers to a brief Halloween period
......@@ -513,7 +513,7 @@ A @env{TZ} value is a rule that typically names a location in the
@uref{http://www.twinsun.com/tz/tz-link.htm, @samp{tz} database}.
A recent catalog of location names appears in the
@uref{http://twiki.org/cgi-bin/xtra/tzdate, TWiki Date and Time
Gateway}. A few non-@acronym{GNU} hosts require a colon before a
Gateway}. A few non-@acronym{GNU} hosts require a colon before a
location name in a @env{TZ} setting, e.g.,
@samp{TZ=":America/New_York"}.
......@@ -521,10 +521,10 @@ The @samp{tz} database includes a wide variety of locations ranging
from @samp{Arctic/Longyearbyen} to @samp{Antarctica/South_Pole}, but
if you are at sea and have your own private time zone, or if you are
using a non-@acronym{GNU} host that does not support the @samp{tz}
database, you may need to use a @acronym{POSIX} rule instead. Simple
database, you may need to use a @acronym{POSIX} rule instead. Simple
@acronym{POSIX} rules like @samp{UTC0} specify a time zone without
daylight saving time; other rules can specify simple daylight saving
regimes. @xref{TZ Variable,, Specifying the Time Zone with @code{TZ},
regimes. @xref{TZ Variable,, Specifying the Time Zone with @code{TZ},
libc, The GNU C Library}.
@node Authors of get_date
......@@ -538,11 +538,11 @@ libc, The GNU C Library}.
@cindex MacKenzie, David
@cindex Meyering, Jim
@cindex Eggert, Paul
@code{get_date} was originally implemented by Steven M. Bellovin
@code{get_date} was originally implemented by Steven M. Bellovin
(@email{smb@@research.att.com}) while at the University of North Carolina
at Chapel Hill. The code was later tweaked by a couple of people on
at Chapel Hill. The code was later tweaked by a couple of people on
Usenet, then completely overhauled by Rich $alz (@email{rsalz@@bbn.com})
and Jim Berets (@email{jberets@@bbn.com}) in August, 1990. Various
and Jim Berets (@email{jberets@@bbn.com}) in August, 1990. Various
revisions for the @sc{gnu} system were made by David MacKenzie, Jim Meyering,
Paul Eggert and others.
......
......@@ -3,12 +3,11 @@
@setfilename mailutils.info
@settitle GNU Mailutils Manual
@setchapternewpage odd
@finalout
@c %**end of header
@include version.texi
@include macros.texi
@include rendition.texi
@include macros.texi
@c Define indices
@defcodeindex op
......@@ -42,7 +41,7 @@
* 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.
* mu: (mailutils)mu. Mailutils Multi-Purpose Tool
@end direntry
@end ifinfo
......@@ -57,13 +56,9 @@ Copyright @copyright{} 1999, 2000, 2001, 2002, 2003, 2004, 2008, 2009,
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with the Front-Cover texts being ``A GNU Manual'',
and with the Back-Cover Texts as in (a) below. A copy of the license
is included in the section entitled ``GNU Free Documentation License''.
(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
this GNU Manual, like GNU software. Copies published by the Free
Software Foundation raise funds for GNU development.''
Invariant Sections, no Front-Cover, and no Back-Cover texts.
A copy of the license is included in the section entitled ``GNU Free
Documentation License''.
@end copying
@titlepage
......@@ -75,9 +70,11 @@ Software Foundation raise funds for GNU development.''
@insertcopying
@end titlepage
@ifnothtml
@page
@summarycontents
@page
@end ifnothtml
@contents
@ifnottex
......@@ -125,6 +122,7 @@ Mailutils Programs
* command line:: Command Line Syntax.
* configuration:: Common Configuration File.
* debugging::
* frm and from:: List Headers from a Mailbox.
* mail:: Send and Receive Mail.
......@@ -145,7 +143,7 @@ Mailutils Programs
* mh:: The MH Message Handling System.
* mailutils-config:: Get the Information about the Mailutils Build.
* mu:: Mailutils Multi-Purpose Tool.
Command Line
......@@ -177,13 +175,19 @@ Configuration File Syntax
* Comments::
* Statements::
* Block Statements::
* Paths::
Server Settings
* General Server Configuration::
* Server Statement::
Debugging
* Level Syntax::
* Level BNF::
* Debugging Categories::
@command{mail} --- Send and Receive Mail
* Invoking Mail:: Command Line Options.
......@@ -232,6 +236,7 @@ Reading Mail
* Movemail Configuration::
* Movemail Options:: Description of the Available Options
* Ownership:: Setting Destination Mailbox Ownership
* Summary:: Short Movemail Invocation Summary
@command{readmsg} --- Extract Messages from a Folder
......@@ -260,7 +265,7 @@ A Sieve Interpreter
maidag
* Sendmail-maidag:: Using @command{maidag} with Sendmail.
* Sendmail-maidag:: Using @command{maidag} with Sendmail.
* Exim-maidag:: Using @command{maidag} with Exim.
* MeTA1-maidag:: Using @command{maidag} with MeTA1.
* Mailbox Quotas::
......@@ -279,6 +284,7 @@ Maidag Scripting
* Sieve Maidag Filters::
* Scheme Maidag Filters::
* Python Maidag Filters::
mimeview
......@@ -310,7 +316,7 @@ Configuring @command{comsatd}
* General Settings::
* Security Settings::
@acronym{MH} --- The MH Message Handling System
MH --- The MH Message Handling System
* Diffs:: Major differences between Mailutils MH and other MH
implementations.
......@@ -321,70 +327,32 @@ Major differences between Mailutils MH and other MH implementations
* Profile Variable Diffs::
* Program Diffs::
@command{mailutils-config} --- Get the Information about the Mailutils Build
* Compiler Flags:: Getting Compiler Flags.
* Loader Flags:: Getting Loader Flags.
* General Information:: Obtaining General Build Information.
Mailutils Libraries
* libmailutils:: The Core Library.
* libmu_auth:: Auxiliary Library for Authenticating Users.
* libmu_scm:: Mailutils to Scheme Interface.
* libmu_sieve:: GNU Implementation of Sieve Mail Filtering.
Framework
* Folder:: Folder.
* Mailbox:: Mailbox.
* Mailer:: Protocol Used to Send Mail.
* Message:: Message.
* Envelope:: Envelope.
* Headers:: Headers.
* Body:: Body.
* Attribute:: Attribute.
* Stream:: Stream.
* Iterator:: Iterator.
* Authenticator:: Authenticator.
* Address:: Address.
* Locker:: Locker.
* URL:: Uniform Resource Locators.
* Parse822:: Parsing RFC 822 headers.
* Mailcap:: Parsing RFC 1524 file.
Authentication Library
* Data Types::
* Initializing libmu_auth::
* Module Creation and Destruction::
* Obtaining Authorization Information::
* Existing Modules::
* Using libmu_auth in Your Programs::
Mailutils to Scheme Interface
* Address Functions::
* Mailbox Functions::
* Message Functions::
* MIME Functions::
* Logging Functions::
* Other Functions::
Using @file{libmu_scm}
* Direct Linking::
* Dynamic Linking::
Sieve Library
* Sieve Data Types::
* Manipulating the Sieve Machine::
* Logging and Diagnostic Functions::
* Symbol Space Functions::
* Memory Allocation::
* Compiling and Executing the Script::
* Writing Loadable Commands::
MU
* mu invocation syntax::
* mu help::
* mu info::
* mu cflags::
* mu ldflags::
* mu query::
* mu 2047::
* mu filter::
* mu acl::
* mu wicket::
* mu dbm::
* mu logger::
* mu pop::
* mu imap::
mu dbm
* Create a Database::
* Add Records to a Database::
* Delete Records::
* List the Database::
* Dump the Database::
* Dump Formats::
* Dbm Exit Codes::
Sieve Language
......@@ -437,36 +405,58 @@ Date Input Formats
@node Introduction
@chapter Introduction
GNU Mailutils is a rich and powerful protocol-independent mail
framework. It contains a series of useful mail libraries, clients,
and servers. These are the primary mail utilities for the GNU system.
The central library is capable of handling electronic mail in various
mailbox formats and protocols, both local and remote. Specifically,
this project contains a POP3 server, an IMAP4 server, and a Sieve mail
filter. It also provides a POSIX `mailx' client, and a collection of
other handy tools.
The GNU Mailutils libraries supply an ample set of primitives for
handling electronic mail in programs written in C, C++, Python or
Scheme.
At the core of Mailutils is libmailutils, a library which provides
universal access to various mailboxes and protocols: UNIX mailbox,
Maildir, MH, POP3, IMAP4, Sendmail, SMTP. Mailutils offers functions
for almost any mail-related task, such as parsing of messages, email
addresses and URLs, handling MIME messages, listing mail folders,
mailcap facilities, extensible Sieve filtering, access control lists.
It supports various modern data security and authentication
techniques: TLS encryption, SASL and GSSAPI, to name a few.
The framework is able to work with a wide variety of authorization
databases, ranging from traditional system password database up to
RADIUS, SQL and LDAP.
The utilities provided by Mailutils include imap4d and pop3d mail
servers, mail reporting utility comsatd, general-purpose mail delivery
agent maidag, mail filtering program sieve, and an implementation of
MH message handling system.
GNU Mailutils is a set of libraries and utilities for handling
electronic mail. It addresses a wide audience and can be of interest
to application developers, casual users and system administrators alike.
It provides programmers with a consistent API allowing them to
handle a variety of different mailbox formats transparently and
without having to delve into complexities of their internal structure.
While doing so, it also provides interfaces that simplify common
programming tasks, such as handling lists, parsing configuration
files, etc. The philosophy of Mailutils is to have a single and
consistent programming interface for various objects designed to
handle the same task. It tries to use their similarities to create an
interface that hides their differences and complexities. This covers
a wide variety of programming tasks: apart from mailbox handling,
Mailutils also contains a unified iterface for work with various DBM
databases and much more.
The utilities built upon these libraries share that same distinctive
feature: no matter what is the internal structure of an object, it is
always handled the same way as other objects that do the same task.
Again, the most common example of this approach are, of course,
mailboxes. Whatever Mailutils program you use, you can be sure it is
able to handle various mailbox formats. You even don't have to inform
it about what type a mailbox is: it will do its best to discover it
automatically.
This approach sometimes covers entities which are seldom regarded as
compatible. For example, using Mailutils it is possible to treat an SMTP
connection as a mailbox opened only for appending new messages. This
in turn, provides a way for extending the functionality of some
utilities. As an example, using this concept of mailboxes, the usual
mail delivery agent becomes able to do things usually reserved for
mail transport agents only!
At the core of Mailutils is @file{libmailutils}, a library which
provides an API for accessing a generalized mailbox. A set of
complementary libraries provide methods for handling particular
mailbox implementations: UNIX mailbox, Maildir, MH, POP3, IMAP4,
even SMTP. Mailutils offers functions for almost any mail-related
task, such as parsing of messages, email addresses and URLs, handling
MIME messages, listing mail folders, mailcap facilities, extensible
Sieve filtering, access control lists. It supports various modern
data security and authentication techniques: TLS encryption, SASL and
GSSAPI, to name a few. Mailutils is able to work with a wide
variety of authorization databases, ranging from traditional system
password database up to RADIUS, SQL and LDAP.
The utilities provided by Mailutils include @command{imap4d} and
@command{pop3d} mail servers, mail reporting utility
@command{comsatd}, general-purpose mail delivery agent
@command{maidag}, mail filtering program @command{sieve}, an implementation
of MH message handling system and much more.
All utilities share the same subset of command line options and use
a unified configuration mechanism, which allows to easily configure
......@@ -486,17 +476,17 @@ under the GNU FDL, and everything else is licensed under the GNU GPL.
@section What this Book Contains
@FIXME{This is more a plan on how the document should be structured,
than a description of its actual structure. However it is:}
than a description of its actual structure. However it is:}
This book addresses a wide audience of both system administrators
and users that aim to use Mailutils programs, and programmers who wish
to use Mailutils libraries in their programs. Given this audience,
to use Mailutils libraries in their programs. Given this audience,
the book is divided in three major parts.
The first part provides a detailed description of each Mailutils
utility, and advices on how to use them in various situations. This
utility, and advices on how to use them in various situations. This
part is intended for users and system administrators who are using
Mailutils programs. If you are not interested in programming using
Mailutils programs. If you are not interested in programming using
Mailutils, this is the only part you need to read.
Subsequent parts address programmers.
......@@ -508,67 +498,37 @@ Mailutils.
Finally, the third part contains a complete Mailutils library
reference.
This version of the book is not finished. The places that may
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}.
@uref{http://mailutils.org/manual}. All material that ends up in this
document is first published in the Mailutils Wiki, available at
@uref{http://mailutils.org/wiki}. Be sure to visit it for latest
updates.
If you have any questions that are not answered there, feel free to
ask them at the mailing list @email{bug-mailutils@@gnu.org}.
@FIXME{Mailutils 3.0 introduced such amount of changes, most of which
being a complete rewrite of the existing codebase, that the library
tutorial and reference became hopelessly obsolete. It is my deep
conviction that using incorrect documentation is much worse than
having no documentation at all, therefore I have withdrawn the
obsolete parts from this edition of GNU Mailutils manual. I am doing
my best to document new Mailutils libraries and hope to be able to
re-introduce these parts of the documentation soon.}
@node History
@section A bit of History, and why use this package?
@UNREVISED
This package started off to try and handle large mailbox files more
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
at a later date, your program will support that new format
automatically as soon as it is compiled against the new library.
@node Programs
@chapter Mailutils Programs
@cindex Programs
@include programs.texi
@node Libraries
@chapter Mailutils Libraries
@cindex Libraries
@menu
* libmailutils:: The Core Library.
* libmu_auth:: Auxiliary Library for Authenticating Users.
* libmu_scm:: Mailutils to Scheme Interface.
* libmu_sieve:: GNU Implementation of Sieve Mail Filtering.
@end menu
@node libmailutils
@section Framework
@cindex Framework
@include framework.texi
@node libmu_auth
@section Authentication Library
@cindex Authentication Library
@cindex libmu_auth
@include libmu_auth.texi
@node libmu_scm
@section Mailutils to Scheme Interface
@cindex Scheme
@cindex libmu_scm
@include libmu_scm.texi
@node libmu_sieve
@section Sieve Library
@cindex Sieve Library
@cindex libmu_sieve
@include libmu_sieve.texi
@node Sieve Language
@chapter Sieve Language
@cindex Sieve Language
@include sieve.texi
gracefully then available at that time 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 at a later date, your program will support
that new format automatically as soon as it is compiled against the
new library.
@node Reporting Bugs
@chapter Reporting Bugs
......@@ -576,7 +536,7 @@ automatically as soon as it is compiled against the new library.
Email bug reports to @email{bug-mailutils@@gnu.org}.
As the purpose of bug reporting is to improve software, please be sure
to include maximum information when reporting a bug. The information
to include maximum information when reporting a bug. The information
needed is:
@itemize
......@@ -588,15 +548,33 @@ needed is:
The archives of bug-mailutils mailing list are available from
@url{http://mail.gnu.org/@/mailman/@/listinfo/@/bug-mailutils}.
@node Programs
@chapter Mailutils Programs
@cindex Programs
@include programs.texi
@node Libraries
@chapter Mailutils Libraries
@cindex Libraries
@WRITEME
@node Sieve Language
@chapter Sieve Language
@cindex Sieve Language
@include sieve.texi
@node News
@chapter Getting News About GNU Mailutils
The two places to look for any news regarding GNU Mailutils are the
Mailutils homepage at @url{http://www.gnu.org/@/software/@/mailutils}, and the
project page at @url{http://savannah.gnu.org/@/projects/@/mailutils}.
Mailutils homepage at @url{http://mailutils.org} or
@url{http://www.gnu.org/@/software/@/mailutils}, and the project page
at @url{http://savannah.gnu.org/@/projects/@/mailutils}.
The updated versions of this manual are available online from
@url{http://www.gnu.org/@/software/@/mailutils/@/manual}.
@uref{http://mailutils.org/manual}. See also
@uref{http://mailutils.org/wiki, Mailutils Wiki} for the latest
updates.
@node Acknowledgement
@chapter Acknowledgement
......@@ -630,128 +608,18 @@ Wojciech Polak @email{polak@@gnu.org}
@node References
@appendix References
@itemize @bullet
@item SMTP
@itemize @minus
@item
@cite{RFC 2821: Simple Mail Transfer Protocol}
@item
@cite{RFC 2368: The mailto URL scheme}
@item
@cite{RFC 2487: SMTP Service Extension for Secure SMTP over TLS}
@end itemize
@item POP3
@itemize @minus
@item
@cite{RFC 1939: Post Office Protocol - Version 3}
@item
@cite{RFC 1734: POP3 AUTHentication command}
@item
@cite{RFC 1957: Some Observations on Implementations of the Post Office
Protocol (POP3)}
@item
@cite{RFC 2449: POP3 Extension Mechanism}
@item
@cite{RFC 2384: POP URL Scheme}
@item
@cite{RFC 2595: Using TLS with IMAP, POP3 and ACAP}
@end itemize
@item IMAP4
@itemize @minus
@item
@cite{RFC 2060: INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1}
@item
@cite{RFC 2088: IMAP4 non-synchronizing literals}
@item
@cite{RFC 2193: IMAP4 Mailbox Referrals}
@item
@cite{RFC 2221: IMAP4 Login Referrals}
@item
@cite{RFC 2342: IMAP4 Namespace}
@item
@cite{RFC 2192: IMAP URL Scheme}
@item
@cite{RFC 1731: IMAP4 Authentication Mechanisms}
@item
@cite{RFC 2245: Anonymous SASL Mechanism}
@item
@cite{RFC 2595: Using TLS with IMAP, POP3 and ACAP}
@end itemize
@item message formats
@itemize @minus
@item
@cite{RFC 2822: Internet Message Format}
@item
@cite{RFC 2045: Multipurpose Internet Mail Extensions (MIME) Part One:
Format of Internet Message Bodies}
@item
@cite{RFC 2046: Multipurpose Internet Mail Extensions (MIME) Part Two:
Media Types}
@item
@cite{RFC 2047: Multipurpose Internet Mail Extensions (MIME) Part Three:
Message Header Extensions for Non-ASCII Text}
@item
@cite{RFC 2049: Multipurpose Internet Mail Extensions (MIME) Part Five:
Conformance Criteria and Examples}
@item
@cite{RFC 2111: Content-ID and Message-ID Uniform Resource Locators}
@end itemize
@item miscellaneous related topics
@itemize @minus
@item
@cite{RFC 1738: Uniform Resource Locators (URL)}
@item
@cite{RFC 2298: An Extensible Message Format for Message Disposition
Notifications}
@item
@cite{RFC 3028: Sieve: A Mail Filtering Language}
@item
@cite{RFC 3431: Sieve Extension: Relational Tests}
@item
@cite{Internet Email Protocols: A Developer's Guide, by Kevin Johnson}
@end itemize
@end itemize
@WRITEME
@node Date Input Formats
@appendix Date Input Formats
@include getdate.texi
@node Usage Vars
@appendix Configuring Help Summary
@include usage.texi
@node GNU FDL
@appendix GNU Free Documentation License
@include fdl.texi
@node Function Index
......
......@@ -16,7 +16,7 @@ For the information about the current state of Mailutils MH
implementation please refer to file @file{mh/TODO} in the Mailutils
distribution directory.
[FIXME]
@FIXME{This is perhaps not so important now.}
@menu
* Diffs:: Major differences between Mailutils MH and other MH
......@@ -27,7 +27,7 @@ distribution directory.
@subsection Major differences between Mailutils MH and other MH implementations
@enumerate 1
@item All programs use usual GNU long options. The support for MH single-dash
@item All programs use usual GNU long options. The support for MH single-dash
options is provided for backward compatibility;
@item UUCP addresses are not supported;
......@@ -55,16 +55,16 @@ Diffs});
@anchor{decode function}
@deftypefn {MH Format} string decode (string @var{str})
Decodes the input string @var{str} as per RFC 2047. Useful in printing
Decodes the input string @var{str} as per RFC 2047. Useful in printing
@samp{From:}, @samp{To:} and @samp{Subject:} headers.
Notice that, unlike the similar NMH function, @code{decode} checks the value
of the global profile variable @code{Charset} (@pxref{Charset variable})
to determine the charset to output the result in. If this variable is
not set, @code{decode} returns its argument without any change. If
to determine the charset to output the result in. If this variable is
not set, @code{decode} returns its argument without any change. If
this variable is set to @code{auto}, @code{decode} tries to determine
the charset name from the setting of @env{LC_ALL} environment
variable. Otherwise, the value of @code{Charset} is taken to be the
variable. Otherwise, the value of @code{Charset} is taken to be the
name of the character set.
@end deftypefn
......@@ -75,7 +75,7 @@ Returns package name (string @samp{mailutils}).
@deftypefn {MH Format} string package_string ()
Returns full package string (e.g. @samp{GNU Mailutils 2.1})
Returns full package string (e.g. @samp{GNU Mailutils 2.1})
@end deftypefn
@deftypefn {MH Format} string version ()
......@@ -86,7 +86,7 @@ Returns mailutils version.
@deftypefn {MH Format} string unre (string @var{str})
The function removes any leading whitespace and eventual @samp{Re:} prefix
from its argument. Useful for creating subjects in reply messages:
from its argument. Useful for creating subjects in reply messages:
@smallexample
%<@{subject@}Subject: Re: %(unre@{subject@})\\n%>
......@@ -96,7 +96,7 @@ from its argument. Useful for creating subjects in reply messages:
@anchor{reply_regex function}
@deftypefn {MH Format} void reply_regex (string @var{r})
Sets the regular expression used to recognize reply messages. The
Sets the regular expression used to recognize reply messages. The
argument @var{r} should be a POSIX extended regular expression.
Matching is case insensitive.
......@@ -109,7 +109,7 @@ For example, the following invocation
@noindent
corresponds to English @samp{Re}, Polish @samp{Odp}, Norwegian @samp{Aw} or
German @samp{Ang}, optionally followed by a number in brackets, followed
by colon and any amount of whitespace. Notice proper quoting of the
by colon and any amount of whitespace. Notice proper quoting of the
regex metacharacters.
See also @code{Reply-Regex} (@pxref{Reply-Regex variable}) and
......@@ -123,12 +123,12 @@ See also @code{Reply-Regex} (@pxref{Reply-Regex variable}) and
If @var{str} is not given, the value of @samp{Subject:} header is taken.
The function returns true if its argument matches the ``reply subject''
regular expression. This expression is set via the global profile variable
regular expression. This expression is set via the global profile variable
@code{Reply-Regex} (@pxref{Reply-Regex variable}) or via the format
function @code{reply_regex}.
This function is useful for creating @samp{Subject:} headers in reply
messages. For example, consider the following construction:
messages. For example, consider the following construction:
@smallexample
@group
......@@ -139,7 +139,7 @@ messages. For example, consider the following construction:
@end smallexample
If the @samp{Subject:} header already contained reply prefix, this construct
leaves it unchanged. Otherwise it prepends to it the value of
leaves it unchanged. Otherwise it prepends to it the value of
@code{Reply-Prefix} profile variable, or, if it is unset, the string
@samp{Re:}.
......@@ -151,7 +151,7 @@ This expression is used in default @file{replcomps} and
This function returns true if the given element is present in the
recipient mask (as modified by @option{--cc} or @option{--nocc} options) and
false otherwise. It is used in default formats for @command{repl} and
false otherwise. It is used in default formats for @command{repl} and
@command{comp}, e.g.:
@smallexample
......@@ -201,8 +201,8 @@ output.
@anchor{Reply-Regex variable}
@deftypevar {MH Variable} string Reply-Regex
Keeps the regular expression used to recognize reply messages. The
argument should be a POSIX extended regular expression. Matching
Keeps the regular expression used to recognize reply messages. The
argument should be a POSIX extended regular expression. Matching
is case insensitive.
For more information, please see @xref{reply_regex function}.
......@@ -225,21 +225,21 @@ RAND @command{anno} displays the prompt anyway.
@item burst
The utility is able to burst both RFC 934 digest messages and MIME
multipart messages. It provides two additional command line options:
multipart messages. It provides two additional command line options:
@option{--recurse} and @option{--length}.
The @option{--recurse} option instructs the utility to recursively
expand the digest.
The @option{--length} option can be used to set the minimal encapsulation
boundary length for RFC 934 digests. Default length is 1,
boundary length for RFC 934 digests. Default length is 1,
i.e. encountering one dash immediately following a newline triggers
digest decoding. It is OK for messages that follow RFC 934
specification. However, many user agents do not precisely follow it,
digest decoding. It is OK for messages that follow RFC 934
specification. However, many user agents do not precisely follow it,
in particular, they often do not escape lines starting with a dash by
@samp{- } sequence. @command{Mailman} is one of such agents. To cope
@samp{- } sequence. @command{Mailman} is one of such agents. To cope
with such digests you can set encapsulation boundary length to a higher
value. For example, @command{bounce --length=8} has been found to be
value. For example, @command{bounce --length=8} has been found to be
sufficient for most Mailman-generated digests.
@item comp
......@@ -248,7 +248,7 @@ Understands @option{--build} option.
@item fmtdump
This command is not provided. Use @option{fmtcheck} instead.
This command is not provided. Use @option{fmtcheck} instead.
@item mhl
......@@ -280,8 +280,8 @@ The following format variables are silently ignored: @samp{center},
@itemize @bullet
@item New option
New option @option{--compose} forces @command{mhn} editing mode. This
is also the default mode. This differs from the standard
New option @option{--compose} forces @command{mhn} editing mode. This
is also the default mode. This differs from the standard
@command{mhn}, which switches to the editing mode only if no other
options were given and the input file name coincides with the value of
@env{mhdraft} environment variable.
......@@ -289,22 +289,22 @@ options were given and the input file name coincides with the value of
@item Show mode (@option{--show})
If an appropriate mhn-show-type[/subtype] was not found, GNU @command{mhn}
prints the decoded message content using @code{moreproc}
variable. Standard @command{mhn} in this case used to print @samp{don't
variable. Standard @command{mhn} in this case used to print @samp{don't
know how to display content} diagnostic.
The default behaviour is to pipe the content to the standard input
of the mhn-show-type[/subtype] command. This is altered to using a
of the mhn-show-type[/subtype] command. This is altered to using a
temporary file if the command contains @code{%f} or @code{%F} escapes.
@item Store mode (@option{--store})
If the @code{Content-Disposition} header contains @samp{filename=},
and @command{mhn} is invoked with @option{--auto} switch, it
transforms the file name into the absolute notation and uses it only
if it lies below the current mhn-storage directory. Standard
if it lies below the current mhn-storage directory. Standard
@command{mhn} only requires that the file name do not begin with @samp{/}.
Before saving a message part, GNU @command{mhn} checks if the file already
exists. If so, it asks whether the user wishes to rewrite it. This
exists. If so, it asks whether the user wishes to rewrite it. This
behaviour is disabled when @option{--quiet} option was given.
@end itemize
......@@ -319,7 +319,7 @@ recognized only if at least one of the following conditions is met:
@itemize @bullet
@item The word @var{component} contains at least one capital letter.
E.g. @option{--User-Agent Mailutils}.
E.g. @option{--User-Agent Mailutils}.
@item The word @var{component} ends with a colon, as in
@option{user-agent: Mailutils}.
......@@ -334,7 +334,7 @@ pick --component @var{field} --pattern @var{string}
@end smallexample
New command line option @option{--cflags} allows to control the type of
regular expressions used. The option must occur right before
regular expressions used. The option must occur right before
@option{--pattern} or @option{--component} option (or one of its
aliases, like @option{--cc}, @option{--from}, etc.)
......@@ -401,11 +401,11 @@ will add it automatically.
@item
Linking messages between folders goes against the logic of Mailutils,
so @command{refile} never makes links even if called with
@option{--link} option. The latter is actually a synonym for @option{--copy},
@option{--link} option. The latter is actually a synonym for @option{--copy},
which preserves the original message.
@item
The @option{--preserve} option is not implemented. It is retained for backward
The @option{--preserve} option is not implemented. It is retained for backward
compatibility only.
@item
......@@ -414,7 +414,7 @@ Message specs and folder names may be interspersed.
@item repl
Understands @option{--use} option. Disposition shell provides
Understands @option{--use} option. Disposition shell provides
@code{use} command.
@item rmm
......@@ -423,7 +423,7 @@ Understands @option{--use} option. Disposition shell provides
@item
Different behaviour if one of the messages in the list does not exist:
Mailutils @command{rmm} does not delete any messages. Standard
Mailutils @command{rmm} does not delete any messages. Standard
@command{rmm} in this case deletes all messages preceding the
non-existent one.
......@@ -445,7 +445,7 @@ Any number of @option{--datefield}, @option{--textfield} and
@option{--numfield} options may be given, thus allowing to build sort
criteria of arbitrary complexity.
The order of @option{--.*field} options sets the ordering priority. This
The order of @option{--.*field} options sets the ordering priority. This
differs from the behaviour of the standard @command{sortm}, which
always orders datefield-major, textfield-minor.
......@@ -459,7 +459,7 @@ List the ordered messages using a format string given by
@item --dry-run
Do not actually sort messages, rather print what would have been
done. This is useful for debugging purposes.
done. This is useful for debugging purposes.
@end table
@end table
......
This diff could not be displayed because it is too large.
......@@ -30,8 +30,8 @@ as described below).
There are two kinds of comments: hash comments, that begin with a
@samp{#} character that is not contained within a string and continue
until the next newline, and C-style or bracketed comments, that are
delimited by @samp{/*} and @samp{*/} tokens. The bracketed comments
may span multiple lines. E.g.:
delimited by @samp{/*} and @samp{*/} tokens. The bracketed comments
may span multiple lines. E.g.:
@smallexample
if size :over 100K
......@@ -53,20 +53,20 @@ Like in C, bracketed comments do not nest.
The basic lexical entities are @dfn{identifiers} and @dfn{literals}.
An @dfn{identifier} is a sequence of letters, digits and underscores,
that begins with a letter or underscore. For example, @code{header} and
that begins with a letter or underscore. For example, @code{header} and
@code{check_822_again} are valid identifiers, whereas @code{1st} is not.
A special form of identifier is @dfn{tag}: it is an identifier prefixed
with a colon (@samp{:}), e.g.: @code{:comparator}.
A @dfn{literal} is a data that is not executed, merely evaluated ``as
is'', to be used as arguments to commands. There are four kinds of
is'', to be used as arguments to commands. There are four kinds of
literals:
@itemize
@item Number
@cindex numbers, sieve
@dfn{Numbers} are given as ordinary unsigned decimal numbers. An
@dfn{Numbers} are given as ordinary unsigned decimal numbers. An
optional suffix may be used to indicate a multiple of a power of two.
The suffixes are: @samp{K} specifying ``kibi-'', or 1,024 (2^10) times
the value of the number; @samp{M} specifying ``mebi-'', or 1,048,576
......@@ -78,24 +78,24 @@ The numbers have 32 bits of magnitude.
@item String
@cindex strings, sieve
A @dfn{string} is any sequence of characters enclosed in double quotes
(@samp{"}). A string cannot contain newlines and double quote
characters. This limitation will disappear in future releases.
(@samp{"}). A string cannot contain newlines and double quote
characters. This limitation will disappear in future releases.
@item Multiline Strings
@cindex multiline strings, sieve
@kwindex text:
A @dfn{multiline string} is used to represent large blocks of text
with embedded newlines and special characters. It starts with the
with embedded newlines and special characters. It starts with the
keyword @code{text:} followed by a newline and ends with a dot
(@samp{.}) on a newline by itself. Any characters between these two
markers are taken verbatim. For example:
(@samp{.}) on a newline by itself. Any characters between these two
markers are taken verbatim. For example:
@smallexample
text:
** This is an automatic response from my message **
** filtering program. **
I can not attend your message right now. However it
I can not attend your message right now. However it
will be saved, and I will read it as soon as I am back.
Regards,
......@@ -104,10 +104,10 @@ Fred
@end smallexample
Notice that a hashed comment or whitespace may occur between
@code{text:} and the newline. However, when used inside the multiline
@code{text:} and the newline. However, when used inside the multiline
string a hash sign looses its special meaning (except in one case, see
below) and is taken as is, as well as bracketed comment delimiters.
In other words, no comments are allowed within a multiline string. E.g.:
In other words, no comments are allowed within a multiline string. E.g.:
@smallexample
text: # This is a comment
......@@ -131,15 +131,15 @@ text:
This results in the contents of file @file{myresponse.txt} being read
and interpreted as the contents of the multiline string.
GNU libmu_sieve extends the described syntax as follows. If the keyword
GNU libmu_sieve extends the described syntax as follows. If the keyword
@code{text:} is immediately followed by a dash (@samp{-}), then all
leading tab characters are stripped from input lines and the line
containing delimiter (@samp{.}). This allows multiline strings within
containing delimiter (@samp{.}). This allows multiline strings within
scripts to be indented in a natural fashion.
Furthermore, if the @code{text:} (optionally followed by @samp{-}) is
immediately followed by a word, this word will be used as ending
delimiter of multiline string instead of the default dot. For
delimiter of multiline string instead of the default dot. For
example:
@smallexample
......@@ -172,7 +172,7 @@ in a pair of square brackets, e.g.:
For convenience, in any context where a list of strings is appropriate,
a single string is allowed without being a member of a list: it is
equivalent to a list with a single member. For example, the following
equivalent to a list with a single member. For example, the following
two statements are equivalent:
@smallexample
......@@ -198,7 +198,7 @@ simple syntax.
@node Commands
@subsection Commands
The basic syntax element is a @dfn{command}. It is defined as follows:
The basic syntax element is a @dfn{command}. It is defined as follows:
@smallexample
@var{command-name} [@var{tags}] @var{args}
......@@ -209,18 +209,18 @@ command, @var{tags} is an optional list of @dfn{optional} or
@dfn{tagged arguments} and @var{args} is a list of @dfn{required} or
@dfn{positional arguments}.
Positional arguments are literals delimited with whitespace. They
Positional arguments are literals delimited with whitespace. They
provide the command with the information necessary to its proper
functioning. Each command has a fixed number of positional arguments. It
functioning. Each command has a fixed number of positional arguments. It
is an error to supply more arguments to the command or to give it fewer
arguments than it accepts.
Optional arguments allow to modify the behaviour of the command, like
command line options in UNIX do. They are a list of @dfn{tags}
(@pxref{Lexical Structure}) separated by whitespace. An optional
command line options in UNIX do. They are a list of @dfn{tags}
(@pxref{Lexical Structure}) separated by whitespace. An optional
argument may have at most one parameter.
Each command understands a set of optional arguments. Supplying it tags
Each command understands a set of optional arguments. Supplying it tags
that it does not understand results in an error.
For example, consider the following command
......@@ -233,8 +233,8 @@ header :mime :comparator "i;octet" ["to", "from"] "bug-mailutils@@gnu.org"
Here, given that @code{header} takes two positional arguments:
@code{header} is command name, the list @code{["to", "from"]} is first
positional argument and the string @code{"bug-mailutils@@gnu.org"} is second
positional argument. There are two optional arguments: @code{:mime} and
@code{:comparator}. The latter has a string @code{"i;octet"} as its
positional argument. There are two optional arguments: @code{:mime} and
@code{:comparator}. The latter has a string @code{"i;octet"} as its
parameter.
@node Actions Described
......@@ -242,8 +242,8 @@ parameter.
@cindex action, sieve
An @dfn{action} is a Sieve command that performs some operation over
a message. Actions do the main job in any Sieve
program. Syntactically, an action is a command terminated with
a message. Actions do the main job in any Sieve
program. Syntactically, an action is a command terminated with
semicolon, e.g.:
@smallexample
......@@ -254,13 +254,13 @@ fileinto "mbox";
GNU Sieve provides the full set of actions described in RFC 3028.
It also allows to extend this set using loadable
actions. @xref{Actions}, for detailed discussion of actions.
actions. @xref{Actions}, for detailed discussion of actions.
@node Control Flow
@subsection Control Flow
@kwindex if, sieve
The only control flow statement Sieve has is @code{if} statement. In its
The only control flow statement Sieve has is @code{if} statement. In its
simplest form it is:
@smallexample
......@@ -287,13 +287,13 @@ if @code{cond1} @{ @dots{} @} elsif @code{cond2} @{ @dots{} @} else @{ @dots{} @
@end smallexample
There may be any number of ``elsif'' branches in an ``if''
statement. However it may have at most one ``else'' branch.
statement. However it may have at most one ``else'' branch.
Notes for C programmers:
@enumerate
@item The braces surrounding each branch of an ``if'' statement are
required.
@item The ``else if'' construct is disallowed. Use ``elsif'' keyword
@item The ``else if'' construct is disallowed. Use ``elsif'' keyword
instead.
@end enumerate
......@@ -321,7 +321,7 @@ statements.
@subsection Tests and Conditions
@cindex test, sieve
@dfn{Tests} are Sieve commands that return boolean value. E.g. the
@dfn{Tests} are Sieve commands that return boolean value. E.g. the
test
@smallexample
......@@ -336,7 +336,7 @@ The tests shipped with the GNU Sieve are described in @ref{Tests}.
@cindex condition, sieve
@dfn{Condition} is a Sieve expression that evaluates to @code{true} or
@code{false}. In its simplest form, condition is just a Sieve test.
@code{false}. In its simplest form, condition is just a Sieve test.
@kwindex not, sieve
To reverse the sense of a condition use keyword @code{not}, e.g.:
......@@ -350,10 +350,10 @@ not header :contains "from" "coyote"
@kwindex allof
@kwindex anyof
The results of several conditions may be joined together by logical
@code{and} and @code{or} operations. The special form @code{allof}
@code{and} and @code{or} operations. The special form @code{allof}
takes several tests as its arguments and computes the logical @code{and}
of their results. Similarly, the form @code{anyof} performs logical
@code{or} over the results of its arguments. E.g.:
of their results. Similarly, the form @code{anyof} performs logical
@code{or} over the results of its arguments. E.g.:
@smallexample
if anyof (not exists ["From", "Date"],
......@@ -371,7 +371,7 @@ if anyof (not exists ["From", "Date"],
Preprocessor statements are a GNU extension to the Sieve language.
The syntax for a preprocessor statement is similar to that used in
@code{C} programming language, i.e. a pound character (@samp{#})
followed by a preprocessor directive and its arguments. Any amount of
followed by a preprocessor directive and its arguments. Any amount of
whitespace can be inserted between the @samp{#} and the directive.
Currently implemented directives are @code{include} and @code{searchpath}.
......@@ -386,7 +386,7 @@ Currently implemented directives are @code{include} and @code{searchpath}.
The @code{#include} directive reads in the contents of the given file.
The contents is ``inserted'' into the text being parsed starting at the
line where the directive appears. The directive takes two forms:
line where the directive appears. The directive takes two forms:
@table @code
@item #include "@var{filename}"
......@@ -405,7 +405,7 @@ If @var{filename} starts with a directory separator character
@kwindex #searchpath, sieve
The @code{#searchpath} directive adds its argument to the list of
directories searched for loadable modules. It has the same effect
directories searched for loadable modules. It has the same effect
as @command{library-path} Sieve configuration statement
(@pxref{Sieve Configuration, library-path}).
......@@ -419,23 +419,23 @@ Syntax: require @var{string};
@end smallexample
The require statement informs the parser that a script makes use of a certain
extension. Multiple capabilities can be declared using the second form
of the statement. The actual handling of a capability name depends on
extension. Multiple capabilities can be declared using the second form
of the statement. The actual handling of a capability name depends on
its suffix.
If the name starts with @samp{comparator-}, it is understood
as a request to use the specified comparator. The comparator name
as a request to use the specified comparator. The comparator name
consists of the characters following the suffix.
If the name starts with @samp{test-}, it means a request to use
the given test. The test name consists of the characters following
the given test. The test name consists of the characters following
the suffix.
Otherwise, the capability is understood as a name of an action to be
used.
The @code{require} statement, if present, must be used before any other
statement that is using the required capability. As an extension, the GNU
statement that is using the required capability. As an extension, the GNU
sieve allows the @code{require} and any other statements to be
interspersed.
......@@ -464,24 +464,24 @@ When processing arguments for @code{require} statement, GNU libmu_sieve
uses the following algorithm:
@enumerate 1
@item Look up the name in a symbol table. If the name begins with
@samp{comparator-} it is looked up in the comparator table. If it
begins with @samp{test-}, the test table is used instead. Otherwise
@item Look up the name in a symbol table. If the name begins with
@samp{comparator-} it is looked up in the comparator table. If it
begins with @samp{test-}, the test table is used instead. Otherwise
the name is looked up in the action table.
@item If the name is found, the search is terminated.
@item Otherwise, transform the name. First, any @samp{comparator-} or
@samp{test-} prefix is stripped. Then, any character other than
@item Otherwise, transform the name. First, any @samp{comparator-} or
@samp{test-} prefix is stripped. Then, any character other than
alphanumeric characters, @samp{.} and @samp{,} is replaced with
dash (@samp{-}). The name thus obtained is used as a file name
dash (@samp{-}). The name thus obtained is used as a file name
of an external loadable module.
@item Try to load the module. The module is searched in the
@item Try to load the module. The module is searched in the
following search paths (in the order given):
@enumerate 1
@item Mailutils module directory. By default it is
@item Mailutils module directory. By default it is
@file{$prefix/lib/mailutils}.
@item Sieve library path as given with the @option{-L} options in
......@@ -505,7 +505,7 @@ colon-separated list of absolute directories, for example,
@samp{"/usr/lib/mypkg:/lib/foo"}.
In any of these directories, @command{libmu_sieve} first attempts to find
and load the given filename. If this fails, it tries to append the
and load the given filename. If this fails, it tries to append the
following suffixes to the file name:
@enumerate 1
......@@ -517,11 +517,11 @@ platform, e.g., @samp{.so}, @samp{.sl}, etc.
@item If the module is found, @command{libmu_sieve} executes its
initialization function (see below) and again looks up the name
in the symbol table. If found, search terminates successfully.
in the symbol table. If found, search terminates successfully.
@item If either the module is not found, or the symbol wasn't
found after execution of the module initialization function,
search is terminated with an error status. @command{libmu_sieve} then
search is terminated with an error status. @command{libmu_sieve} then
issues the following diagnostic message:
@smallexample
......@@ -541,11 +541,11 @@ This comparator simply compares the two arguments octet by octet
@item i;ascii-casemap
It treats uppercase and lowercase characters in the @sc{ascii} subset of
@sc{utf-8} as the same. This is the default comparator.
@sc{utf-8} as the same. This is the default comparator.
@item i;ascii-numeric
Treats the two arguments as @sc{ascii} representation of decimal
numbers and compares their numeric values. This comparator must
numbers and compares their numeric values. This comparator must
be explicitly required prior to use.
@end table
......@@ -558,7 +558,7 @@ In the discussion below the following macro-notations are used:
@table @var
@item match-type
This tag specifies the matching type to be used with the test. It can
This tag specifies the matching type to be used with the test. It can
be one of the following:
@table @code
......@@ -567,26 +567,26 @@ be one of the following:
@item :is
The @code{:is} match type describes an absolute match; if the contents of
the first string are absolutely the same as the contents of the
second string, they match. Only the string ``frobnitzm'' is the string
``frobnitzm''. The null key ``:is'' and only ``:is'' the null value.
second string, they match. Only the string ``frobnitzm'' is the string
``frobnitzm''. The null key ``:is'' and only ``:is'' the null value.
This is the default match-type.
@kwindex :contains, sieve
@kwindex contains, sieve
@item :contains
The @code{:contains} match type describes a substring match. If the value
The @code{:contains} match type describes a substring match. If the value
argument contains the key argument as a substring, the match is true.
For instance, the string ``frobnitzm'' contains ``frob'' and ``nit'', but
not ``fbm''. The null key ``'' is contained in all values.
not ``fbm''. The null key ``'' is contained in all values.
@kwindex :matches, sieve
@kwindex matches, sieve
@item :matches
The @code{:matches} version specifies a wildcard match using the
characters @samp{*} and @samp{?}. @samp{*} matches zero or more
characters, and @samp{?} matches a single character. @samp{?} and
characters @samp{*} and @samp{?}. @samp{*} matches zero or more
characters, and @samp{?} matches a single character. @samp{?} and
@samp{*} may be escaped as @samp{\\?} and @samp{\\*} in strings to match
against themselves. The first backslash escapes the second backslash;
against themselves. The first backslash escapes the second backslash;
together, they escape the @samp{*}.
@kwindex :regex, sieve
......@@ -599,7 +599,7 @@ Expressions.
@kwindex value, sieve
@item :value @var{relation}
The @code{:value} match type does a relational comparison between
strings. Valid values for @var{relation} are:
strings. Valid values for @var{relation} are:
@table @asis
@item "eq"
......@@ -627,7 +627,7 @@ Less than or Equal
This match type first determines the number of the specified entities
(headers, addresses, etc.) in the message and does a relational
comparison of the number of entities to the values specified in the
test expression. The test expression must be a list of one element.
test expression. The test expression must be a list of one element.
@end table
@kwindex :comparator, sieve
......@@ -653,7 +653,7 @@ if header :comparator "i;ascii-numeric" :is "X-Num" "10"
@end smallexample
@item address-part
This syntax item is used when testing structured Internet addresses. It
This syntax item is used when testing structured Internet addresses. It
specifies which part of an address must be used in comparisons.
Exactly one of the following tags may be used:
......@@ -661,7 +661,7 @@ Exactly one of the following tags may be used:
@kwindex :all, sieve
@kwindex all, sieve
@item :all
Use the whole address. This is the default.
Use the whole address. This is the default.
@kwindex :localpart, sieve
@kwindex localpart, sieve
......@@ -677,9 +677,9 @@ Use domain part of the address.
@end table
@emph{Notice}, that @var{match-type} modifiers interact with
comparators. Some comparators are not suitable for matching with
@code{:contains} or @code{:matches}. If this occurs, sieve issues
an appropriate error message. For example, the statement:
comparators. Some comparators are not suitable for matching with
@code{:contains} or @code{:matches}. If this occurs, sieve issues
an appropriate error message. For example, the statement:
@smallexample
if header :matches :comparator "i;ascii-numeric"
......@@ -692,7 +692,7 @@ comparator `i;ascii-numeric' is incompatible with match type `:matches'
in call to `header'
@end smallexample
GNU Sieve supports two kinds of tests. @dfn{Built-in tests} are
GNU Sieve supports two kinds of tests. @dfn{Built-in tests} are
defined within the library and do not require any external files.
@dfn{External tests} are loadable modules that can be linked in at run
time using the @code{require} statement (@pxref{Require Statement}).
......@@ -725,7 +725,7 @@ Tagged arguments:
@table @var
@item address-part
Selects the address part to compare. Default is the whole email address
Selects the address part to compare. Default is the whole email address
(@code{:all}).
@item comparator
......@@ -748,7 +748,7 @@ A list of address values.
@noindent
The @code{address} test matches Internet addresses in structured headers
that contain addresses. It returns @code{true} if any header contains any
that contain addresses. It returns @code{true} if any header contains any
key in the specified part of the address, as modified by
@var{comparator} and @var{match-type} optional arguments.
......@@ -756,8 +756,8 @@ This test returns @code{true} if any combination of the
@var{header-names} and @var{key-list} arguments match.
The @code{address} primitive never acts on the phrase part of an email
address, nor on comments within that address. Use the @code{header} test
instead. It also never acts on group names, although it does act on the
address, nor on comments within that address. Use the @code{header} test
instead. It also never acts on group names, although it does act on the
addresses within the group construct.
Example:
......@@ -771,8 +771,8 @@ if address :is :all "from" "tim@@example.com"
@end deftypefn
@deftypefn Test {} size [:over | :under] @var{limit}(number)
The @code{size} test deals with the size of a message. The required
argument @var{limit} represents the size of the message in bytes. It
The @code{size} test deals with the size of a message. The required
argument @var{limit} represents the size of the message in bytes. It
may be suffixed with the following quantifiers:
@table @samp
......@@ -796,7 +796,7 @@ If the argument is @samp{:under}, and the size of the message is less than
the @var{number}, the test is true; otherwise, it is false.
Otherwise, the test is true only if the size of the message equals
exactly @var{number}. This is a GNU extension.
exactly @var{number}. This is a GNU extension.
The size of a message is defined to be the number of octets from the
initial header until the last character in the message body.
......@@ -813,7 +813,7 @@ Tagged arguments:
@table @var
@item address-part
Selects the address part to compare. Default is the whole email address
Selects the address part to compare. Default is the whole email address
(@code{:all}).
@item comparator
......@@ -859,7 +859,7 @@ List of message header names.
@sp 1
@noindent
The @code{exists} test is @code{true} if the headers listed in
@var{header-names} argument exist within the message. All of the headers
@var{header-names} argument exist within the message. All of the headers
must exist or the test is false.
The following example throws out mail that doesn't have a From header
......@@ -909,15 +909,15 @@ A list of header values.
@sp 1
@noindent
The @code{header} test evaluates to true if any header name matches any
key. The type of match is specified by the optional match argument,
key. The type of match is specified by the optional match argument,
which defaults to ":is" if not explicitly given.
The test returns @code{true} if any combination of the @var{header-names}
and @var{key-list} arguments match.
If a header listed in @var{header-names} exists, it contains the null
key (@samp{""}). However, if the named header is not present, it
does not contain the null key. So if a message contained the header
key (@samp{""}). However, if the named header is not present, it
does not contain the null key. So if a message contained the header
@smallexample
X-Caffeine: C8H10N4O2
......@@ -949,12 +949,12 @@ if numaddr @var{args}
@}
@end smallexample
@*Description:
This test is provided as an example of loadable extension tests. You
This test is provided as an example of loadable extension tests. You
must use @samp{require "test-numaddr"} statement before actually using
it.
The @code{numaddr} test counts Internet addresses in structured headers
that contain addresses. It returns true if the total number of
that contain addresses. It returns true if the total number of
addresses satisfies the requested relation.
@kwindex :over
......@@ -985,17 +985,17 @@ if spamd @var{args}
@end smallexample
@*Description:
This test is an interface to SpamAssassin filter. It connects to the
This test is an interface to SpamAssassin filter. It connects to the
@command{spamd} daemon using connection parameters specified by tagged
arguments @code{:host} and @code{:port} (if the daemon is listening on
an INET socket), or @code{:socket} (if the daemon is listening on a
UNIX socket) and returns true, if SpamAssassin qualifies the message
as spam. Tagged argument @var{limit} alters the default behavior. Its
value is a string representation of a floating point number. If
as spam. Tagged argument @var{limit} alters the default behavior. Its
value is a string representation of a floating point number. If
the tag @code{:over} is used, then the test returns true if the spam
score returned from SpamAssassin is greater than @var{limit}.
Otherwise, if @code{:under} is used, the test returns true if the spam
score is less than @var{limit}. The comparison takes into account
score is less than @var{limit}. The comparison takes into account
three decimal digits.
Tagged argument @code{:user} allows to select a specific user profile.
......@@ -1046,8 +1046,8 @@ if list @var{args}
@end smallexample
@*Description:
The @code{list} test evaluates to true if any of @var{headers} match any
key from @var{keys}. Each header is regarded as containing a list of
keywords. By default, comma is assumed as list separator. This can be
key from @var{keys}. Each header is regarded as containing a list of
keywords. By default, comma is assumed as list separator. This can be
overridden by specifying the @code{:delim} tag, whose value is a
string consisting of valid list delimiter characters.
......@@ -1098,7 +1098,7 @@ date is after the given date, the result is false.
If no tagged argument is supplied, @code{:after} is assumed.
Almost any date format is understood. @xref{Date Input Formats}, for
Almost any date format is understood. @xref{Date Input Formats}, for
a detailed information on date formats.
@*Example:
......@@ -1148,19 +1148,19 @@ These actions are described in detail below.
@deffn Action stop
The @code{stop} action ends all processing. If no actions have been
The @code{stop} action ends all processing. If no actions have been
executed, then the @code{keep} action is taken.
@end deffn
@deffn Action keep
The effect of this action is to preserve the current message in the
mailbox. This action is executed if no other action has been executed.
mailbox. This action is executed if no other action has been executed.
@end deffn
@deffn Action discard
@code{Discard} silently throws away the current message. No notification
@code{Discard} silently throws away the current message. No notification
is returned to the sender, the message is deleted from the mailbox.
Example:
......@@ -1192,12 +1192,12 @@ Specifies the permissions to use, if the mailbox is created.
@end table
The @code{fileinto} action delivers the message into the specified
folder. If the folder is local, it is created using permissions
@samp{0600}, for regular files, and @samp{0700} for directories. This
default can be changed by using the @code{:permissions} tag. Its
folder. If the folder is local, it is created using permissions
@samp{0600}, for regular files, and @samp{0700} for directories. This
default can be changed by using the @code{:permissions} tag. Its
argument is a mode specification, similar to that used by
@command{chmod} shell utility. It is a list of permissions settings
separated by commas. Each setting begins with one of the following
@command{chmod} shell utility. It is a list of permissions settings
separated by commas. Each setting begins with one of the following
letters:
@table @asis
......@@ -1209,7 +1209,7 @@ Set permissions for users not in the file's group.
@end table
This letter must be followed by either @samp{+} or @samp{=} and the
list of permissions to be set. This latter list is a string
list of permissions to be set. This latter list is a string
containing any one or both of the following characters:
@table @asis
......@@ -1237,17 +1237,17 @@ value.
@item
Only @code{r} and @code{w} permissions can be set, since other
permissions do not seem to be useful for mailboxes. However, for
permissions do not seem to be useful for mailboxes. However, for
mailboxes that have a directory structure (such as maildir and MH),
any settings in @samp{g} and @samp{o} sets imply setting the
executable bit.
@item
Owner's permissions cannot be set. The owner always has all
Owner's permissions cannot be set. The owner always has all
permissions on the mailbox he created.
@item
The @code{:permissions} settings apply only to local mailboxes. They
The @code{:permissions} settings apply only to local mailboxes. They
are ignored for remote mailboxes.
@end enumerate
......@@ -1256,9 +1256,9 @@ are ignored for remote mailboxes.
@deffn Action reject @var{reason}
The optional @code{reject} action refuses delivery of a message by sending
back a message delivery notification to the sender. It resends the
back a message delivery notification to the sender. It resends the
message to the sender, wrapping it in a ``reject'' form, noting that it
was rejected by the recipient. The required argument @var{reason} is
was rejected by the recipient. The required argument @var{reason} is
a string specifying the reason for rejecting the message.
Example:
......@@ -1344,15 +1344,15 @@ if header :mime :matches "Content-Type"
@deffn Action redirect @var{address}
The @code{redirect} action is used to send the message to another user at
a supplied @var{address}, as a mail forwarding feature does. This action
a supplied @var{address}, as a mail forwarding feature does. This action
makes no changes to the message body or existing headers, but it may add
new headers. It also modifies the envelope recipient.
new headers. It also modifies the envelope recipient.
The @code{redirect} command performs an MTA-style ``forward'' --- that
is, what you get from a @file{.forward} file using @code{sendmail} under
@sc{unix}. The address on the SMTP envelope is replaced with the one on
@sc{unix}. The address on the SMTP envelope is replaced with the one on
the @code{redirect} command and the message is sent back
out. @emph{Notice}, that it differs from the MUA-style forward, which
out. @emph{Notice}, that it differs from the MUA-style forward, which
creates a new message with a different sender and message ID, wrapping
the old message in a new one.
@end deffn
......@@ -1361,7 +1361,7 @@ the old message in a new one.
@subsection External Actions
@UNREVISED
GNU Mailutils is shipped with a set of external Sieve
actions. These actions are compiled as loadable modules and must be
actions. These actions are compiled as loadable modules and must be
required prior to use (@pxref{Require Statement}).
@deftypefn Action {} moderator [:keep] [:address @var{address}(string)] @
......@@ -1391,20 +1391,20 @@ Replying to part 3 while adding an `Approved:' header with the list
password in it approves the submission.
The @code{moderator} action spawns an inferior Sieve machine and
filters the original submission (part 2) through it. If the inferior
filters the original submission (part 2) through it. If the inferior
machine marks the message as deleted, the action replies to the
control message, thereby causing the submission to be discarded. The
control message, thereby causing the submission to be discarded. The
@samp{From:} address of the reply can be modified using
@code{:address} tag. After discarding the message, @code{moderator}
@code{:address} tag. After discarding the message, @code{moderator}
marks it as deleted, unless it is given @code{:keep} tag.
The argument of @code{:source} tag, if given, specifies the Sieve
source file to be used on the message. If @code{:tag} is not present,
source file to be used on the message. If @code{:tag} is not present,
@code{moderator} will create and use a copy of the existing Sieve machine.
The action checks the message structure: it will bail out if the message
does not have exactly 3 MIME parts, or if parts 2 and 3 are not of
@samp{message/rfc822} type. It is the responsibility of the caller to
@samp{message/rfc822} type. It is the responsibility of the caller to
make sure the message is actually a valid Mailman moderation request
(see the example below).
......@@ -1429,7 +1429,7 @@ if pipe @var{args}
@end smallexample
@*Description:
The @code{pipe} action sends executes a command specified by its
argument and sends the entire message to its standard input. The
argument and sends the entire message to its standard input. The
@var{command} argument supplies the command line.
The envelope of the message is included, if the @code{:envelope} tag
......@@ -1461,15 +1461,15 @@ vacation @var{args};
@end smallexample
@*Description:
The @code{vacation} action returns a message with @var{reply-text} to
the sender. It is intended to inform the sender that the recipient is
the sender. It is intended to inform the sender that the recipient is
not currently reading his mail.
If the @code{:subject} tag is given, its argument sets the subject of
the message. Otherwise, the subject is formed by prefixing original
the message. Otherwise, the subject is formed by prefixing original
subject with @samp{Re:}, or @var{prefix}, given with the
@code{:reply_prefix} tag. Before prefixing, any original prefixes
@code{:reply_prefix} tag. Before prefixing, any original prefixes
matching extended regular expression @var{expr} (@code{:reply_regex}
tag) are stripped from the subject line. If @code{:reply_regex} is not
tag) are stripped from the subject line. If @code{:reply_regex} is not
specified, the default regexp is @samp{^re: *}.
The @code{:aliases} tag instructs @code{vacation} to handle messages
......@@ -1477,9 +1477,9 @@ for any address in @var{addrlist} in the same manner as those received
for the user's principal email.
Before processing, @code{vacation} compares the sender address with
its @dfn{address exclusion list}. Elements of this list are extended
case-insensitive regular expressions. If the sender address matches
any of these expressions, the message will not be replied. The default
its @dfn{address exclusion list}. Elements of this list are extended
case-insensitive regular expressions. If the sender address matches
any of these expressions, the message will not be replied. The default
exclusion list is:
@smallexample
......@@ -1495,10 +1495,10 @@ exclusion list is:
New entries can be added to this list using @code{:addresses} tag.
The @code{:days} tag sets the @dfn{reply interval}. A reply is sent to
each sender once in @var{ndays} days. GNU Sieve keeps track of
The @code{:days} tag sets the @dfn{reply interval}. A reply is sent to
each sender once in @var{ndays} days. GNU Sieve keeps track of
sender addresses and dates in a DBM file @file{.vacation} stored in
the user's home directory. This tag is available only if Mailutils is
the user's home directory. This tag is available only if Mailutils is
compiled with DBM support.
@end deftypefn
......@@ -1524,15 +1524,15 @@ The meaning of optional flags is the same as in shell ``here document''
construct: the dash strips all leading tab characters from the string body,
thus allowing it to be indented in a natural fashion; @var{delimiter}
introduces the new end-of-text delimiter instead of the default
dot. If @var{delimiter} starts with a backslash, no preprocessing will
dot. If @var{delimiter} starts with a backslash, no preprocessing will
be performed within a string.
@item Handling of the @code{require} statement.
@itemize
@item According to the RFC an error must occur if a @code{require} appears
after a command other than @code{require}. The GNU sieve library allows
interspersing the @code{require} and other statements. The only
after a command other than @code{require}. The GNU sieve library allows
interspersing the @code{require} and other statements. The only
requirement is that @code{require} must occur before a statement that is
using the required capability (@pxref{Require Statement}).
......@@ -1548,12 +1548,12 @@ scan the headers from each part of a multipart message.
@item @code{size} test
The @code{size} test allows to omit the optional argument
(:over|:under). In this case exact equality is assumed.
(:over|:under). In this case exact equality is assumed.
@item @code{envelope} test
The only value that can be meaningfully used as the first required
argument of an @code{envelope} test is @samp{from}. This limitation
argument of an @code{envelope} test is @samp{from}. This limitation
may disappear from the subsequent releases.
@item @code{fileinto} action
......@@ -1564,7 +1564,7 @@ in case it is created (@pxref{fileinto}).
@item Match type optional argument.
Along with the usual @code{:is}, @code{:matches} and @code{contains}
matching type, GNU sieve library understands @code{:regex} type. This
matching type, GNU sieve library understands @code{:regex} type. This
matching type toggles POSIX Extended Regular Expression matching.
@end enumerate
......
......@@ -3,15 +3,13 @@
@c 2008, 2010, 2011 Free Software Foundation, Inc.
@c See file mailutils.texi for copying conditions.
@comment *******************************************************************
@node Usage Vars
@appendix Configuring Help Summary
Running @command{@var{prog} --help} displays the short usage summary
for @var{prog} utility (@pxref{Common Options}). This summary is
organized by @dfn{groups} of semantically close options. The options
for @var{prog} utility (@pxref{Common Options}). This summary is
organized by @dfn{groups} of semantically close options. The options
within each group are printed in the following order: a short option,
eventually followed by a list of corresponding long option names,
followed by a short description of the option. For example, here is an
followed by a short description of the option. For example, here is an
excerpt from the actual @kbd{sieve --help} output:
@verbatim
......@@ -22,12 +20,12 @@ excerpt from the actual @kbd{sieve --help} output:
@vrindex ARGP_HELP_FMT, environment variable
The exact visual representation of the help output is configurable via
@env{ARGP_HELP_FMT} environment variable. The value of this variable
is a comma-separated list of @dfn{format variable} assignments. There
are two kinds of format variables. An @dfn{offset variable} keeps the
@env{ARGP_HELP_FMT} environment variable. The value of this variable
is a comma-separated list of @dfn{format variable} assignments. There
are two kinds of format variables. An @dfn{offset variable} keeps the
offset of some part of help output text from the leftmost column on
the screen. A @dfn{boolean} variable is a flag that toggles some
output feature on or off. Depending on the type of the corresponding
the screen. A @dfn{boolean} variable is a flag that toggles some
output feature on or off. Depending on the type of the corresponding
variable, there are two kinds of assignments:
@table @asis
......@@ -45,8 +43,8 @@ numeric value to be assigned to the variable.
@item Boolean assignment
To assign @code{true} value to a variable, simply put this variable name. To
assign @code{false} value, prefix the variable name with @samp{no-}. For
To assign @code{true} value to a variable, simply put this variable name. To
assign @code{false} value, prefix the variable name with @samp{no-}. For
example:
@smallexample
......@@ -78,7 +76,7 @@ argument is only shown with the long one, for example:
@noindent
and a message indicating that the argument is applicable to both
forms is printed below the options. This message can be disabled
forms is printed below the options. This message can be disabled
using @code{dup-args-note} (see below).
The default is false.
......@@ -93,12 +91,12 @@ Mandatory or optional arguments to long options are also mandatory or
optional for any corresponding short options.
@end quotation
Setting @code{no-dup-args-note} inhibits this message. Normally, only
Setting @code{no-dup-args-note} inhibits this message. Normally, only
one of variables @code{dup-args} or @code{dup-args-note} should be set.
@end deftypevr
@deftypevr {Help Output} offset short-opt-col
Column in which short options start. Default is 2.
Column in which short options start. Default is 2.
@smallexample
@group
......@@ -111,7 +109,7 @@ $ @kbd{ARGP_HELP_FMT=short-opt-col=6 sieve --help|grep ARCHIVE}
@end deftypevr
@deftypevr {Help Output} offset long-opt-col
Column in which long options start. Default is 6. For example:
Column in which long options start. Default is 6. For example:
@smallexample
@group
......@@ -124,9 +122,9 @@ $ @kbd{ARGP_HELP_FMT=long-opt-col=16 sieve --help|grep ADDRESS}
@end deftypevr
@deftypevr {Help Output} offset doc-opt-col
Column in which @dfn{doc options} start. A doc option isn't actually
Column in which @dfn{doc options} start. A doc option isn't actually
an option, but rather an arbitrary piece of documentation that is
displayed in much the same manner as the options. For example, in
displayed in much the same manner as the options. For example, in
the output of @command{folder --help}:
@verbatim
......@@ -138,7 +136,7 @@ GNU MH folder
@end verbatim
@noindent
the string @samp{Actions are:} is a doc option. Thus, if you set
the string @samp{Actions are:} is a doc option. Thus, if you set
@kbd{ARGP_HELP_FMT=doc-opt-col=6} the above part of the help output
will look as follows:
......@@ -152,7 +150,7 @@ GNU MH folder
@end deftypevr
@deftypevr {Help Output} offset opt-doc-col
Column in which option description starts. Default is 29.
Column in which option description starts. Default is 29.
@smallexample
@group
......@@ -172,8 +170,8 @@ Notice, that the description starts on a separate line if
@end deftypevr
@deftypevr {Help Output} offset header-col
Column in which @dfn{group headers} are printed. A group header is a
descriptive text preceding an option group. For example, in the
Column in which @dfn{group headers} are printed. A group header is a
descriptive text preceding an option group. For example, in the
following text:
@verbatim
......@@ -188,10 +186,10 @@ The default value is 1.
@end deftypevr
@deftypevr {Help Output} offset usage-indent
Indentation of wrapped usage lines. Affects @option{--usage}
output. Default is 12.
Indentation of wrapped usage lines. Affects @option{--usage}
output. Default is 12.
@end deftypevr
@deftypevr {Help Output} offset rmargin
Right margin of the text output. Used for wrapping.
Right margin of the text output. Used for wrapping.
@end deftypevr
......
......@@ -100,7 +100,7 @@ P [1-9][0-9]*
yylval.string = _mu_line_finish ();
return MU_TOK_IDENT; }
/* Strings */
[a-zA-Z0-9_\./:\*=-]+ { _mu_line_begin ();
[a-zA-Z0-9_\./:\*=@-]+ { _mu_line_begin ();
_mu_line_add (yytext, yyleng);
yylval.string = _mu_line_finish ();
return MU_TOK_STRING; }
......
......@@ -133,6 +133,8 @@ read_bulletin_db (size_t *pnum)
return rc;
}
mu_dbm_safety_set_flags (db, DEFAULT_GROUP_DB_SAFETY);
rc = mu_dbm_safety_check (db);
if (rc)
{
......@@ -225,6 +227,8 @@ write_bulletin_db (size_t num)
return rc;
}
mu_dbm_safety_set_flags (db, DEFAULT_GROUP_DB_SAFETY);
rc = mu_dbm_safety_check (db);
if (rc && rc != ENOENT)
{
......
......@@ -32,8 +32,10 @@ open_stat_db (int mode)
return NULL;
}
mu_dbm_safety_set_flags (db, DEFAULT_GROUP_DB_SAFETY);
rc = mu_dbm_safety_check (db);
if (rc)
if (rc && rc != ENOENT)
{
mu_diag_output (MU_DIAG_ERROR,
_("statistics db fails safety check: %s"),
......
......@@ -201,6 +201,17 @@ extern char *apop_database_name;
extern int apop_database_safety;
extern int apop_database_safety_set;
/* Safety checks for group-rw database files, such as stat and bulletin
databases */
#define DEFAULT_GROUP_DB_SAFETY \
(MU_FILE_SAFETY_WORLD_WRITABLE| \
MU_FILE_SAFETY_WORLD_READABLE| \
MU_FILE_SAFETY_LINKED_WRDIR| \
MU_FILE_SAFETY_DIR_IWGRP| \
MU_FILE_SAFETY_DIR_IWOTH)
extern pop3d_command_handler_t pop3d_find_command (const char *name);
extern int pop3d_stat (char *);
......