aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--doc/mailfromd.texi18
2 files changed, 22 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f7ce2462..7fc43fd0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,18 +2,21 @@
* NEWS: Update
* configure.ac: Raise version to 1.4.91
(MAILUTILS_LIBS): Require auth
* src/Makefile.am (mailfromd_SOURCES): Add func.c
* src/gram.y: Implement functions, function calls and new
- conditional `validuser'
+ conditionals `validuser' and `dbmap'
* src/lex.l: Likewise
* src/mailfrom.h (FUNCTION,LOCUS): New types.
(node_type): New types node_type_funcall and node_type_validuser
(parse_error_locus): New function
(function_lookup,function_install): New function
+ (node_type): New type node_type_dbmap
+ (struct dbmap_node): New data type
+ (struct node): New member `map'.
* src/main.c: Use enum instead of defines for long option codes.
New options: --dump-grammar-trace, --dump-lex-trace and
--dump-tree.
(capa): Use "auth" capability
(main): Call MU_AUTH_REGISTER_ALL_MODULES
* doc/mailfromd.texi: Update
diff --git a/doc/mailfromd.texi b/doc/mailfromd.texi
index 51be5e3a..b9629c68 100644
--- a/doc/mailfromd.texi
+++ b/doc/mailfromd.texi
@@ -744,12 +744,30 @@ variable to @command{mailfromd} (@pxref{Sendmail Configuration}).
@anchor{Expressions}
Expressions operate on atoms and return literal values. Think of
them as of functions in programming languages. Currently the following
expressions are implemented:
@table @code
+@item dbmap @var{file} @var{atom}
+ @var{file} should be a literal string, @var{atom} an arbitrary
+atom which evaluates to a valid string. This conditional returns
+@code{true} if the key @var{atom} is present in the @acronym{DBM} file
+@var{file}. If @var{atom} contains a @samp{@@} character, only the
+part before this character will be used, thus allowing to check emails
+against the aliases database:
+
+@smallexample
+@group
+if not dbmap "/etc/mail/aliases" $f
+ @dots{}
+fi
+@end group
+@end smallexample
+
+Notice that @var{file} must not end in @samp{.db} suffix.
+
@item hostname @var{atom}
@cindex @code{hostname}
@var{atom} should be a string representing an IP address in
@samp{dotted-quad} notation. The result of this expression is the
canonical name of host with this IP address obtained from DNS
lookup. For example

Return to:

Send suggestions and report system problems to the System administrator.