authorSergey Poznyakoff <>2009-06-29 14:23:18 (GMT)
committer Sergey Poznyakoff <>2009-06-29 14:23:18 (GMT)
commit6dcecd5893d71dfcda15228f8b17dc26d775f0e8 (patch) (side-by-side diff)
parent7d4dcfe66b232a852a2eb8dd56b2a79e1a8b7094 (diff)
* mfd/bi_db.m4 (db_prop_lookup): Fix conditional. Reported by Jan Rafaj.
Diffstat (more/less context) (ignore whitespace changes)
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
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
# @r{Catch @acronym{DNS} errors}
- catch temp_failure, failure
+ catch e_temp_failure or e_failure
tempfail 451 4.1.1 "MX verification failed"
@@ -3524,7 +3524,7 @@ use the following catch statement:
-catch macroundef
+catch e_macroundef
@@ -7526,17 +7526,24 @@ rw-r----
For example, consider the following pragmas:
-#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:
+#pragma dbprop `/etc/mail/*.db' null 600
+@end smallexample
+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:
loop [@var{label}]
- [for @var{stmt1},] [while @var{expr1},] [@var{stmt2}]
+ [for @var{stmt1}] [,while @var{expr1}] [,@var{stmt2}]
done [while @var{expr2}]
@@ -11461,7 +11468,7 @@ done
prog envfrom
- catch failure or temp_failure
+ catch e_failure or e_temp_failure
switch $1
@@ -11488,7 +11495,7 @@ it instead. The following example illustrates this approach:
func poll_wrapper(string email) returns number
- catch failure or temp_failure
+ catch e_failure or e_temp_failure
return %email
@@ -11804,7 +11811,7 @@ do
compilation, using @option{-E} command line option:
-$ @kbd{mailfromf -E}
+$ @kbd{mailfromd -E}
@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_next(itr)) {

Return to:

Send suggestions and report system problems to the System administrator.