summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2009-06-29 14:23:18 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2009-06-29 14:23:18 (GMT)
commit6dcecd5893d71dfcda15228f8b17dc26d775f0e8 (patch) (side-by-side diff)
treef17881c00af626d7e3d118a3d7b30d66a66c6b46
parent7d4dcfe66b232a852a2eb8dd56b2a79e1a8b7094 (diff)
downloadmailfromd-6dcecd5893d71dfcda15228f8b17dc26d775f0e8.tar.gz
mailfromd-6dcecd5893d71dfcda15228f8b17dc26d775f0e8.tar.bz2
Bugfix.
* mfd/bi_db.m4 (db_prop_lookup): Fix conditional. Reported by Jan Rafaj.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--doc/mailfromd.texi37
-rw-r--r--mfd/bi_db.m43
2 files changed, 24 insertions, 16 deletions
diff --git a/doc/mailfromd.texi b/doc/mailfromd.texi
index 46a3a88..86f4d84 100644
--- a/doc/mailfromd.texi
+++ b/doc/mailfromd.texi
@@ -3486,7 +3486,7 @@ done
@noindent
It is syntactically correct, but it overlooks the fact that @code{mx
-matches} generates @code{temp_failure} exception, if the underlying
+matches} generates @code{e_temp_failure} exception, if the underlying
@acronym{DNS} query has timed out (@pxref{Special comparisons}). If
this happens, @command{mailfromd} has no instructions on what to do
next and reports an error. This can easily be fixed using a @code{catch}
@@ -3496,7 +3496,7 @@ statement, e.g.:
prog envfrom
do
# @r{Catch @acronym{DNS} errors}
- catch temp_failure, failure
+ catch e_temp_failure or e_failure
do
tempfail 451 4.1.1 "MX verification failed"
done
@@ -3524,7 +3524,7 @@ use the following catch statement:
@smallexample
@group
-catch macroundef
+catch e_macroundef
do
@dots{}
done
@@ -7526,17 +7526,24 @@ rw-r----
For example, consider the following pragmas:
@smallexample
-#pragma dbprop /etc/mail/*.db null 600
#pragma dbprop /etc/mail/whitelist.db 640
-#pragma dbprop /etc/mail/blacklist.db 640
@end smallexample
-The first of them tells that each database in @file{/etc/mail}
-directory must have the mode @samp{600} and include the null
-terminator in the key length. The remaining two pragmas define
-two exceptions: the databases @file{whitelist.db} and
-@file{blacklist.db} have privileges @samp{640} and do not include
-null in the key length.
+It tells that the database file @file{whitelist.db} has
+privileges @samp{640} and do not include null in the key length.
+
+Similarly, the following pragma:
+
+@smallexample
+#pragma dbprop `/etc/mail/*.db' null 600
+@end smallexample
+
+@noindent
+declares that all database files in directory @file{/etc/mail} have
+privileges @samp{640} and include null terminator in the key
+length. @emph{Notice}, the use of @command{m4} quoting characters in
+the example below. Without them, the sequence @samp{/*} would have
+been taken as the beginning of a comment.
Additionally, for compatibility with previous versions (up to 5.0),
the terminating null property can be requested via an optional
@@ -10910,7 +10917,7 @@ controlled by some conditional expression. It has the following form:
@smallexample
@group
loop [@var{label}]
- [for @var{stmt1},] [while @var{expr1},] [@var{stmt2}]
+ [for @var{stmt1}] [,while @var{expr1}] [,@var{stmt2}]
do
@var{stmt3}
done [while @var{expr2}]
@@ -11461,7 +11468,7 @@ done
prog envfrom
do
- catch failure or temp_failure
+ catch e_failure or e_temp_failure
do
switch $1
do
@@ -11488,7 +11495,7 @@ it instead. The following example illustrates this approach:
@smallexample
func poll_wrapper(string email) returns number
do
- catch failure or temp_failure
+ catch e_failure or e_temp_failure
do
return %email
done
@@ -11804,7 +11811,7 @@ do
compilation, using @option{-E} command line option:
@smallexample
-$ @kbd{mailfromf -E file.mf}
+$ @kbd{mailfromd -E file.mf}
@end smallexample
The output is in the form of preprocessed source code, which is sent
diff --git a/mfd/bi_db.m4 b/mfd/bi_db.m4
index f97fa8b..0c5b1b6 100644
--- a/mfd/bi_db.m4
+++ b/mfd/bi_db.m4
@@ -125,7 +125,8 @@ db_prop_lookup(const char *name)
mu_iterator_t itr;
const struct db_prop *found = NULL;
- if (db_prop_list && mu_list_get_iterator(db_prop_list, &itr)) {
+ if (db_prop_list
+ && mu_list_get_iterator(db_prop_list, &itr) == 0) {
for (mu_iterator_first(itr);
!mu_iterator_is_done(itr);
mu_iterator_next(itr)) {

Return to:

Send suggestions and report system problems to the System administrator.