aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-02-28 18:54:48 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2009-02-28 18:54:48 +0200
commit5fc738e4d43eb708428c4b30e60e570e2dd55470 (patch)
treea96f33c70162ff8a825b800fc9276360d95d154a
parent514797c56e431f37de9a00834281f990a7b15c46 (diff)
downloadwydawca-5fc738e4d43eb708428c4b30e60e570e2dd55470.tar.gz
wydawca-5fc738e4d43eb708428c4b30e60e570e2dd55470.tar.bz2
Various fixes
* doc/Makefile.am: Improve checking and final rules. * doc/fdl.texi, doc/rendition.texi: Use single-space sentence separators. * doc/wydawca.texi: Update. * src/config.c (cb_email_address): Accept a list of addresses. * src/meta.c (meta_expand_string): Take two additional arguments. Quote expansions if they are provided. * src/triplet.c (triplet_expand_method_query): New function. * src/mail.c, src/verify.c: Use triplet_expand_method_query * src/wydawca.h: Update. * src/meta.c (meta_escape): Remove.
-rw-r--r--doc/Makefile.am23
-rw-r--r--doc/fdl.texi82
-rw-r--r--doc/rendition.texi6
-rw-r--r--doc/wydawca.texi1031
-rw-r--r--src/config.c54
-rw-r--r--src/mail.c8
-rw-r--r--src/meta.c48
-rw-r--r--src/triplet.c34
-rw-r--r--src/verify.c29
-rw-r--r--src/wydawca.h10
10 files changed, 731 insertions, 594 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 0ef1e64..f53e47c 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -43,3 +43,3 @@ manual:
# Checking
-check-format:
+check-tabs:
@if test -n "`cat $(info_TEXINFOS) $(wydawca_TEXINFOS) | tr -d -c '\t'`"; then \
@@ -49,2 +49,10 @@ check-format:
+check-sentence-spacing:
+ @if grep -q '\. [@A-Z]' $(info_TEXINFOS) $(wydawca_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-options:
@@ -72,3 +80,3 @@ check-fixmes:
check-writeme:
- @grep -Hn @WRITEME $(info_TEXINFOS) $(mailfromd_TEXINFOS) > $@-t; \
+ @grep -Hn @WRITEME $(info_TEXINFOS) $(wydawca_TEXINFOS) > $@-t; \
if [ -s $@-t ]; then \
@@ -104,3 +112,12 @@ untabify:
-final: untabify master-menu
+fix-sentence-spacing:
+ for file in $(info_TEXINFOS) $(wydawca_TEXINFOS); \
+ do \
+ if grep -q '\. [@A-Z]' $$file; then \
+ mv $$file $${file}~; \
+ sed -r 's/\. ([@A-Z])/. \1/g' $${file}~ > $$file; \
+ fi; \
+ done
+
+final: untabify fix-sentence-spacing master-menu
diff --git a/doc/fdl.texi b/doc/fdl.texi
index edd86d4..3f42957 100644
--- a/doc/fdl.texi
+++ b/doc/fdl.texi
@@ -25,3 +25,3 @@ 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
@@ -32,5 +32,5 @@ 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.
@@ -42,7 +42,7 @@ 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
@@ -67,6 +67,6 @@ 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.
@@ -75,3 +75,3 @@ 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.
@@ -85,3 +85,3 @@ 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
@@ -89,3 +89,3 @@ 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''.
@@ -95,5 +95,5 @@ 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
@@ -106,3 +106,3 @@ 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
@@ -120,3 +120,3 @@ 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
@@ -133,6 +133,6 @@ 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.
@@ -150,6 +150,6 @@ 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
@@ -188,3 +188,3 @@ 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:
@@ -195,3 +195,3 @@ 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.
@@ -231,3 +231,3 @@ 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
@@ -241,3 +241,3 @@ 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
@@ -254,3 +254,3 @@ dedications given therein.
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.
@@ -258,3 +258,3 @@ 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.
@@ -272,3 +272,3 @@ 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.
@@ -284,5 +284,5 @@ 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
@@ -308,3 +308,3 @@ 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
@@ -318,3 +318,3 @@ 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.''
@@ -363,3 +363,3 @@ 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
@@ -367,3 +367,3 @@ 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
@@ -380,5 +380,5 @@ 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
@@ -391,5 +391,5 @@ 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/}.
@@ -401,3 +401,3 @@ 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
diff --git a/doc/rendition.texi b/doc/rendition.texi
index 45ac068..5d04105 100644
--- a/doc/rendition.texi
+++ b/doc/rendition.texi
@@ -7,6 +7,6 @@
@c This document has three levels of rendition: PUBLISH, DISTRIB or PROOF,
-@c as decided by @set symbols. The PUBLISH rendition does not show
-@c notes or marks asking for revision. Most users will prefer having more
+@c as decided by @set symbols. The PUBLISH rendition does not show
+@c notes or marks asking for revision. Most users will prefer having more
@c information, even if this information is not fully revised for adequacy,
-@c so DISTRIB is the default for distributions. The PROOF rendition
+@c so DISTRIB is the default for distributions. The PROOF rendition
@c show all marks to the point of ugliness, but is nevertheless useful to
diff --git a/doc/wydawca.texi b/doc/wydawca.texi
index 589f2f7..237f196 100644
--- a/doc/wydawca.texi
+++ b/doc/wydawca.texi
@@ -39,3 +39,3 @@ 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
+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''.
@@ -43,3 +43,3 @@ 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
+this GNU Manual, like GNU software. Copies published by the Free
Software Foundation raise funds for GNU development.''
@@ -91,2 +91,3 @@ How to Configure @command{wydawca}.
+* Syntax:: Configuration file syntax.
* syslog::
@@ -99,8 +100,28 @@ How to Configure @command{wydawca}.
+Configuration file syntax
+
+* Comments::
+* Pragmatic Comments::
+* Statements::
+* Preprocessor::
+
+Access Methods
+
+* sql type::
+* builtin type::
+* external type::
+
+SQL Access Methods
+
+* gpg-key-sql::
+* project-owner-sql::
+* user-data-sql::
+* verify-user-sql::
+
Mail Notification
-* mailer::
-* templates::
-* statreports::
-* event notification::
+* mailer::
+* templates::
+* statreports::
+* event notification::
@@ -186,4 +207,4 @@ effective and consumes little resources.
Usually, @command{wydawca} is installed on the machine that receives
-release uploads. It may be run either periodically as a cron-job, or
-as a standalone daemon. It supposes that both upload and distribution
+release uploads. It may be run either periodically as a cron-job, or
+as a standalone daemon. It supposes that both upload and distribution
directories are accessible in the local file system hierarchy. If that
@@ -234,3 +255,3 @@ necessary files, is then verified by checking if the modification
date of its oldest file is older than a predefined amount of time
-(@pxref{file-sweep-time}), and if so, all files from this triplet are
+(@FIXME-pxref{file-sweep-time}), and if so, all files from this triplet are
removed (an @dfn{expired triplet}). This gives users the possibility
@@ -356,3 +377,3 @@ detected, and withs status 1 otherwise.
Before parsing, configuration file is preprocessed using
-@command{m4} (@FIXME-pxref{Preprocessor}). To see the preprocessed
+@command{m4} (@pxref{Preprocessor}). To see the preprocessed
configuration without actually parsing it, use @option{-E} command
@@ -385,3 +406,3 @@ separators. Blanks, tabs, newlines and comments, collectively called
@dfn{white space} are ignored except as they serve to separate
-tokens. Some white space is required to separate otherwise adjacent
+tokens. Some white space is required to separate otherwise adjacent
keywords and values.
@@ -392,2 +413,3 @@ keywords and values.
* Statements::
+* Preprocessor::
@end menu
@@ -471,3 +493,3 @@ compatibility with the @sc{c} preprocessor.
features. For more sophisticated ways to modify configuration before
-parsing, see @FIXME-ref{Preprocessor}.
+parsing, see @ref{Preprocessor}.
@@ -480,3 +502,3 @@ parsing, see @FIXME-ref{Preprocessor}.
A @dfn{simple statement} consists of a keyword and value
-separated by any amount of whitespace. Simple statement is terminated
+separated by any amount of whitespace. Simple statement is terminated
with a semicolon (@samp{;}).
@@ -563,2 +585,40 @@ example above:
+@anchor{meta-interpretation}
+Depending on the context, the contents of a quoted string may be
+subject to @dfn{meta-variable interpretation}. During this process,
+any sequence
+
+@smallexample
+$@{@var{var}@}
+@end smallexample
+
+@noindent
+where @var{var} is the name of a defined meta-variable, is replaced with
+the value of the variable. This sequence is called @dfn{meta-
+reference}. For example, if the meta-variable @samp{user} has the
+value @samp{smith}, then the string
+
+@smallexample
+"where user = '$@{user@}'"
+@end smallexample
+
+@noindent
+becomes
+
+@smallexample
+"where user = 'smith'"
+@end smallexample
+
+If the name of the variable consists of a single character, the curly
+braces around it may be omitted. Thus, @code{$@{u@}} and @code{$u} are
+equivalent.
+
+If @var{var} is not defined, the meta-reference is left unchanged.
+
+To insert a literal @samp{$} character in a string that is subject to
+meta-variable interpretation, duplicate it: @samp{$$}.
+
+The exact set of defined meta-variables and their values depend on the
+context and are discussed in detail below.
+
@anchor{here-document}
@@ -571,4 +631,4 @@ strings of text containing embedded newlines.
the following lines up to the line containing only @var{word}, with
-possible trailing blanks. Any lines thus read are concatenated
-together into a single string. For example:
+possible trailing blanks. Any lines thus read are concatenated
+together into a single string. For example:
@@ -659,3 +719,39 @@ spool download @{
this is not required.
-
+
+@node Preprocessor
+@subsection Preprocessor
+@cindex preprocessor
+@cindex m4
+ Before parsing its configuration file, @command{wydawca} preprocesses
+it. The built-in preprocessor handles only file inclusion
+and @code{#line} statements (@pxref{Pragmatic Comments}), while the
+rest of traditional preprocessing facilities, such as macro expansion,
+is supported via @command{m4}, which is used as an external preprocessor.
+
+ The detailed description of @command{m4} facilities lies far beyond
+the scope of this document. You will find a complete user manual in
+@ifnothtml
+@ref{Top, GNU M4 manual, GNU M4, m4, GNU M4 macro processor}.
+@end ifnothtml
+@ifhtml
+@uref{http://www.gnu.org/software/m4/manual}.
+@end ifhtml
+For the rest of this subsection we assume the reader is sufficiently
+acquainted with @command{m4} macro processor.
+
+@cindex @file{pp-setup}
+ The external preprocessor is invoked with @option{-s} flag, which
+instructs it to include line synchronization information in its
+output. This information is then used by the parser to display meaningful
+diagnostic. An initial set of macro definitions is supplied by the
+@file{pp-setup} file, located in
+@file{@var{$prefix}/share/wydawca/@var{version}/include} directory (where
+@var{version} means the version of Wydawca package).
+
+The default @file{pp-setup} file renames all @command{m4} built-in
+macro names so they all start with the prefix @samp{m4_}. This
+is similar to GNU m4 @option{--prefix-builtin} options, but has an
+advantage that it works with non-GNU @command{m4} implementations as
+well.
+
@node syslog
@@ -748,3 +844,3 @@ to use. In the latter case, the @var{hostname} and the colon may be
omitted. If, however, it is present, it must be @samp{localhost}.
-@xref{sql-host}, for more information and examples.
+@FIXME-xref{sql-host}, for more information and examples.
@end deffn
@@ -799,3 +895,3 @@ access-method @var{method-name} @{
the configuration file, or inside a @code{spool} statement
-(@FIXME-pxref{spool}). Global definitions affect all directory
+(@pxref{spool}). Global definitions affect all directory
pairs in the configuration file, and ones inside a @code{directory}
@@ -858,3 +954,3 @@ See below for a detailed description of these access methods.
Sets the query used for retrieving the data. The @var{string} is
-subject to meta-variable expansion (@FIXME-pxref{meta-variables}). The
+subject to meta-variable interpretation (@pxref{meta-interpretation}). The
following meta-variables are defined:
@@ -866,2 +962,3 @@ following meta-variables are defined:
@itemx user
+@itemx user:name
The system name of the user that submitted the triplet.
@@ -876,2 +973,20 @@ submitted. It is defined as the value of directive
shortest initial prefix of that value, not containing slashes.
+
+@item spool
+ The name of the distribution spool where this upload originates
+(@pxref{spool}).
+
+@item url
+ The @acronym{URL} of the spool, as set in the @code{url} statement
+of the @code{spool} block (@pxref{spool, url}).
+
+@item dir
+Directory (relative to the project distribution root) where the
+files are going to be uploaded.
+
+@item dest-dir
+Spool destination directory (@pxref{spool, destination}).
+
+@item source-dir
+Spool source directory (@pxref{spool, source}).
@end table
@@ -942,7 +1057,7 @@ access-method project-owner @{
query "SELECT user.email, user.realname "
- "FROM user,user_group,groups "
- "WHERE user_group.user_id=user.user_id "
- "AND user_group.group_id=groups.group_id "
- "AND user_group.admin_flags = 'A' "
- "AND groups.unix_group_name = '$@{project@}'";
+ "FROM user,user_group,groups "
+ "WHERE user_group.user_id=user.user_id "
+ "AND user_group.group_id=groups.group_id "
+ "AND user_group.admin_flags = 'A' "
+ "AND groups.unix_group_name = '$@{project@}'";
@}
@@ -974,7 +1089,7 @@ access-method verify-user @{
query "SELECT user.user_name "
- "FROM user,user_group, groups "
- "WHERE user_group.user_id=user.user_id "
- "AND user_group.group_id=groups.group_id "
- "AND user_group.admin_flags = 'A' "
- "AND groups.unix_group_name='$@{project@}' "
+ "FROM user,user_group, groups "
+ "WHERE user_group.user_id=user.user_id "
+ "AND user_group.group_id=groups.group_id "
+ "AND user_group.admin_flags = 'A' "
+ "AND groups.unix_group_name='$@{project@}' "
"AND user.user_name='$@{user@}'";
@@ -1012,3 +1127,3 @@ is configured using @code{archive} statement. This statement can
appear either in the global scope, in which case it affects all
-spools, or within a @code{spool} block (@FIXME-pxref{spool}),
+spools, or within a @code{spool} block (@pxref{spool}),
where it affects only the given spool.
@@ -1188,3 +1303,3 @@ The @var{tag} argument defines a unique identifier for this spool. It
will be used in log messages, timers (@FIXME-pxref{timers}) and in
-meta-substitutions (@FIXME-pxref{meta-variables, spool}).
+meta-variable interpretation (@pxref{meta-interpretation}).
@@ -1266,6 +1381,5 @@ spool ftp @{
@cindex statistics
-@UNREVISED
At the end of the run, @command{wydawca} prints a detailed
statistics of its execution on the diagnostic channel @samp{info}.
-The statistics is printed only if at least one of the items is not zero.
+The statistics is printed only if at least one of its items is not zero.
The following example illustrates what you might get if you configured
@@ -1356,3 +1470,3 @@ A symlink is removed.
@kwindex statistics
- Amount of information included in the statistics summary is
+ The amount of information included in the statistics summary is
configured using the @code{statistics} statement. This statement takes
@@ -1363,3 +1477,3 @@ information about errors and warnings to be printed:
@smallexample
-statistics errors warnings
+statistics (errors, warnings);
@end smallexample
@@ -1367,3 +1481,3 @@ statistics errors warnings
@noindent
-It will produce the following output:
+The output produced looks like:
@@ -1375,3 +1489,3 @@ warnings: 2
@kwindex none@r{, statistics}
- The special keyword @samp{none} can be used to suppress this output
+ A special keyword @samp{none} can be used to suppress this output
altogether (which is the default), as in
@@ -1379,3 +1493,3 @@ altogether (which is the default), as in
@smallexample
-statistics none
+statistics none;
@end smallexample
@@ -1383,3 +1497,3 @@ statistics none
@kwindex all@r{, statistics}
- Another special keyword is @samp{all}, that enables all statistics
+ Another special keyword is @samp{all}. It enables full statistics
output. This keyword may also be followed by any number of statistics
@@ -1390,3 +1504,3 @@ warnings one would set:
@smallexample
-statistics all errors warnings
+statistics (all, errors, warnings);
@end smallexample
@@ -1396,3 +1510,2 @@ statistics all errors warnings
@cindex mail notification
-@UNREVISED
While running, @command{wydawca} keeps track of certain events
@@ -1405,21 +1518,48 @@ previous section.
-@kwindex from-address
The sender email address for these notifications is set using the
-@code{from-address} statement, e.g.:
+@code{from-address} statement.
+
+@deffn {Configuration} from-address @var{address}
+Set sender address for outgoing mails. E.g.:
@smallexample
-from-address ftp-uploads@@gnu.org.ua
+from-address ftp-uploads@@gnu.org.ua;
@end smallexample
+@end deffn
-@noindent
-It is not strictly necessary to specify it, however. In the absence of
-@code{from-address} statement, the sender email will be constructed
-from the name of the user @command{wydawca} runs as (usually
-@samp{root}) and the full domain name of the machine it runs at.
+It is not strictly necessary to specify the sender address. In the
+absence of @code{from-address} statement, the sender email will be
+constructed from the name of the user @command{wydawca} runs as
+(@FIXME-pxref{user privs}) and the full domain name of the machine it
+runs at.
+
+@deffn {Configuration} admin-address @var{email}
+Sets the admin email address or addresses. The statistics
+notifications and any notifications configured to be sent to admins
+will be forwarded to this address. The @var{email} argument is either
+a @acronym{RFC} 822 email address, or a list of such addresses. For
+example, the following statement configures a single admin address:
+
+@smallexample
+admin-address root@@gnu.org.ua;
+@end smallexample
+
+The example below illustrates how to configure multiple addresses:
+
+@smallexample
+admin-address "root@@gnu.org.ua,ftp-adm@@gnu.org.ua";
+@end smallexample
+
+Yet another way to configure them is:
+
+@smallexample
+admin-address (root@@gnu.org.ua, ftp-adm@@gnu.org.ua);
+@end smallexample
+@end deffn
@menu
-* mailer::
-* templates::
-* statreports::
-* event notification::
+* mailer::
+* templates::
+* statreports::
+* event notification::
@end menu
@@ -1429,11 +1569,9 @@ from the name of the user @command{wydawca} runs as (usually
@cindex mailer
-@kwindex mailer
-@UNREVISED
To send messages, @command{wydawca} uses a special logical entity
-called @dfn{mailer}. It is set in the configuration file using
-@code{mailer} keyword:
+called a @dfn{mailer}. It is set in the configuration file using
+@code{mailer} keyword.
-@smallexample
-mailer @var{url}
-@end smallexample
+@deffn {Configuration} mailer @var{url}
+Set mailer @acronym{URL}.
+@end deffn
@@ -1441,8 +1579,24 @@ mailer @var{url}
@cindex mailer @acronym{URL}
- A mailer @acronym{URL} begins with a protocol specification.
-Two protocol specifications are currently supported: @samp{sendmail}
-and @samp{smtp}. The former means to use a
-@command{sendmail}-compatible program to send mails. Such a program
-must be able to read mail from its standard input and must support the
-following options:
+ A mailer @acronym{URL} consists of a scheme specification, followed
+by @samp{://} separator and additional data. The @acronym{URL}s
+supported by Wydawca version @value{VERSION} are described in the
+table below. As usual, square brackets indicate optional parts:
+
+@table @asis
+@item smtp://@var{host}[:@var{port}]
+Use an SMTP server on @var{host} to relay messages. The @var{host} part is
+either an IP address in dotted-quad notation or as a symbolic host
+name. In the latter case, DNS system is be used to resolve
+it. Optional @var{port} specifies port number or symbolic name (as
+defined in @file{/etc/services}). It defaults to 25. For example:
+
+@smallexample
+mailer smtp://remote.server.net:24;
+@end smallexample
+
+@item sendmail://@var{progname}
+Use sendmail-compatible program
+@var{progname}. @dfn{Sendmail-compatible} means that the program must
+be able to read an RFC-822 message from its standard input and must
+support the following command line options:
@@ -1450,6 +1604,6 @@ following options:
@item -oi
-Do not treat '.' as message terminator.
+Do not treat @samp{.} as message terminator.
@item -f @var{addr}
-Use @var{addr} as the address of the sender.
+Use @var{addr} as the sender address.
@@ -1459,35 +1613,59 @@ Get recipient addresses from the message.
-These conditions are met by most existing @acronym{MTA} programs, such
-as @command{exim} or @command{postfix} (to say nothing of
-@command{sendmail} itself).
+Example:
+
+@smallexample
+mailer sendmail:///usr/sbin/exim;
+@end smallexample
+
+@item sendmail:
+This is a special form of the @samp{sendmail} mailer. It uses the
+@command{sendmail} binary from the @code{_PATH_SENDMAIL} macro in your
+@file{/usr/include/paths.h}. It is the default mailer.
-Following the protocol specification is the @dfn{mailer location}, which
-is separated from it with a colon. For the @samp{sendmail} protocol,
-the mailer location sets the full file name of the sendmail-compatible
-@acronym{MTA} binary, for example:
+@item prog://@var{progname}?@var{query}
+A @dfn{prog} mailer. This is a generalization of @samp{sendmail}
+mailer that allows to use arbitrary external programs as mailers.
+
+The full file name of the program is given in @var{progname} part.
+The @var{query} part is a list of arguments, separated by @samp{&}
+signs. Arguments may contain the following macro-substitutions:
+
+@table @samp
+@item $@{sender@}
+Expands to the sender email address.
+
+@item $@{rcpt@}
+Expands to the recipient email addresses.
+
+The program @var{progname} must read an RFC-822 message from its
+standard input.
+
+An example of @samp{prog} mailer definition:
+
+@smallexample
+mailer "prog:///bin/nullmail?localhost&-F$@{sender@}&$@{rcpt@}
+@end smallexample
+
+When sending a mail, @command{wydawca} will invoke:
@smallexample
-mailer sendmail:/usr/sbin/sendmail
+/bin/nullmail localhost -F@var{sender} @var{rcpt}
@end smallexample
-A special form of a sendmail @acronym{URL}, consisting of protocol
-specification only (@samp{sendmail:}) is also allowed. It means
-``use the sendmail binary from the @code{_PATH_SENDMAIL}
-macro in your @file{/usr/include/paths.h} file''. This is the default
-mailer.
+@noindent
+where @var{sender} means the sender address, and @var{rcpt} stands for
+the recipient email address.
-The @samp{smtp} protocol means to use an @acronym{SMTP} server directly.
-In this case, mailer location consists of two slashes,
-followed by the @acronym{IP} address or host name of the @acronym{SMTP}
-server, and, optionally, the port number. If the port number is
-present, it is separated from the rest of @acronym{URL} by a colon.
-For example:
+@item | @var{prog} @var{args..}
+Equivalent to the @samp{prog} mailer, described above, but written in
+a more natural fashion. In this notation, the example definition above
+becomes:
@smallexample
-@group
-mailer smtp://remote.server.net
-mailer smtp://remote.server.net:24
-@end group
+mailer "|/bin/nullmail localhost -F$@{sender@} $@{rcpt@}"
@end smallexample
+@end table
+@end table
+
@node templates
@@ -1497,72 +1675,68 @@ mailer smtp://remote.server.net:24
@cindex message template
-@UNREVISED
Each notification message is build from a message template, by
-expanding any occurrences of @samp{%@{@var{name}@}} within it with the value
-of macro-variable @var{name}. Sets of defined macro-variables
-depend on the type of the notification and are described below.
+expanding meta-variables (@pxref{meta-interpretation}) within it.
+The message text may be specified either in place within the
+configuration directive it belongs to (@FIXME-pxref{notification}), or
+defined by @code{define-message} statement.
+
+@deffn {Configuration} define-message @var{name} @var{text};
+Define message @var{name} to be @var{text}. This message can be
+referred to from other configuration statements by @code{@@@var{name}}
+notation.
+@end deffn
-@kwindex define-message
- Message templates are defined using @code{define-message}
-statement. Its syntax is as follows:
+The message text must be formatted as a valid RFC-822 message, i.e. it
+must consist of two parts, message headers and body, separated by a
+single empty line. Therefore @var{text} is usually a
+@dfn{here-document} construct (@pxref{here-document}). For example:
@smallexample
-define-message @var{id} [-]@var{delimiter}
-@var{lines}
-@var{delimiter}
+define-message my-message <<EOT
+From: Wydawca
+Subject: test
+
+This is a test message.
+EOT;
@end smallexample
-@noindent
-where @var{id} is a symbolic identifier used to refer to this message
-in another configuration statements, @var{delimiter} is a delimiter
-used to mark the end of the message template, and @var{lines} are any
-number of lines that form the message template. If @var{delimiter} is
-prefixed by a minus sign, any leading whitespace will be removed from
-each template line, thus allowing to indent the template text in a natural
-way. Furthermore, the @var{delimiter} itself is optional. If it is
-omitted, the string @samp{end} is used to delimit the message.
-The following example illustrates the simplest way to define a message
-template:
+If you do not wish to supply any headers (which is unlikely, because a
+mail should at least have a @code{Subject} header), simply begin the
+message text with an empty line, like this:
@smallexample
-define-message my-message
-Subject: test
+define-message my-message <<EOT
This is a test message.
-end
+EOT;
@end smallexample
- Following is the same message template, but indented in a more
-natural way. @samp{EOT} is used as a message delimiter:
+@node statreports
+@subsection Statistic Reports
+@kwindex mail-statistics
+@UNREVISED
+Sending statistic reports to the system administrator is configured by
+@code{mail-statistics} statement.
@smallexample
-define-message my-message -EOT
- Subject: test
-
- This is a test message.
-EOT
+mail-statistics @{
+ message @var{text-or-id};
+ statistics @var{item-list};
+@}
@end smallexample
- It is important to notice, that the message template must supply
-both @acronym{RFC} 822 headers, and message body, so it must always
-consist of two parts, separated by a single empty line. If you do not
-wish to supply any headers (which is unlikely, because a mail should
-at least have a @code{Subject} header), simply begin the message text
-with an empty line, like this:
+@deffn {Configuration} message @var{text-or-id}
+Define the message text. The argument is either the message text
+template, or a reference to a templat