diff options
-rw-r--r-- | NEWS | 16 | ||||
-rw-r--r-- | configure.ac | 53 | ||||
-rw-r--r-- | doc/mailfromd.texi | 87 | ||||
-rw-r--r-- | doc/upgrade.texi | 9 |
4 files changed, 117 insertions, 48 deletions
@@ -1,8 +1,22 @@ -Mailfromd NEWS -- history of user-visible changes. 2018-04-13 +Mailfromd NEWS -- history of user-visible changes. 2018-07-24 See the end of file for copying conditions. Please send Mailfromd bug reports to <bug-mailfromd@gnu.org.ua> +Version 8.6, 2018-07-24 + +* New configure option --with-dbm + +This option allows you to select any DBM flavor supported by mailutils +as the default DBM implementation for mailfromd. + +* Fix byte compilation of mfl-mode.el + +* Minor fixes in DNS resolver + +* Case-insensitive comparison of SPF record marker + + Version 8.5, 2018-04-13 * Ensure proper integer promotion (was broken on certain 64-bit architectures). diff --git a/configure.ac b/configure.ac index 9224ed25..4f17fa83 100644 --- a/configure.ac +++ b/configure.ac @@ -16,7 +16,7 @@ AC_PREREQ(2.63) m4_define([MF_VERSION_MAJOR], 8) -m4_define([MF_VERSION_MINOR], 5) +m4_define([MF_VERSION_MINOR], 6) AC_INIT([mailfromd], MF_VERSION_MAJOR.MF_VERSION_MINOR[]m4_ifdef([MF_VERSION_PATCH],.MF_VERSION_PATCH), [bug-mailfromd@gnu.org.ua], @@ -126,6 +126,43 @@ if test $syslog_async = "yes"; then AC_SUBST([BUILD_SYSLOG_ASYNC], '$(SYSLOG_ASYNC_O)') AC_DEFINE([USE_SYSLOG_ASYNC], [1], [Define if syslog-async is being used]) fi +# ###################### +# Default database type +# ###################### + +# A map of supported database types. The format is DBTYPE:FEATURE, +# where FEATURE is the corresponding mailutils feature as listed by +# 'mailutils info', without the WITH_ prefix and converted to lowercase. +# The entries are sorted in ascending preference order. +# Traditionally Mailfromd preferred Berkeley DB over GDBM. +db_map=" +bdb:bdb +gbdm:gdbm +kc:kyotocabinet +tc:tokyocabinet +ndbm:ndbm +" + +# Convert database type to mailutils feature +db_type_to_feature() { + sed -n /^$(echo "$1" | tr A-Z a-z)':/s/.*://p' <<EOF +$db_map +EOF +} + +# Convert mailutils feature to the database type +db_feature_to_type() { + sed -n /:$(echo "$1" | tr A-Z a-z)'$/s/:.*//p' <<EOF +$db_map +EOF +} + +# Produce the list of mailutils DBM features +db_feature_list() { + sed 's/^.*://' <<EOF +$db_map +EOF +} AC_ARG_VAR([DEFAULT_DB_TYPE],[Set default database type]) @@ -148,14 +185,22 @@ case "${withval}" in *) DEFAULT_DB_TYPE=bdb;; esac]) +AC_ARG_WITH([dbm], + AC_HELP_STRING([--with-dbm=TYPE], + [set default DBM type]), + [DEFAULT_DB_TYPE=$withval]) + AH_TEMPLATE([DEFAULT_DB_TYPE], [Define default database type]) if test -n "$DEFAULT_DB_TYPE"; then - if ! mailutils info $DEFAULT_DB_TYPE >/dev/null; then + if ! mailutils info $(db_type_to_feature $DEFAULT_DB_TYPE) >/dev/null; then AC_MSG_ERROR([requested DBM type $DEFAULT_DB_TYPE not supported by Mailutils]) fi else - # Traditionally Mailfromd preferred Berkeley DB over GDBM - DEFAULT_DB_TYPE=`mailutils info bdb gdbm | head -n 1 | sed 's/WITH_//' | tr A-Z a-z` + fl=$(db_feature_list) + feature=$(mailutils info $fl | head -n 1 | sed 's/WITH_//') + if test -n "$feature"; then + DEFAULT_DB_TYPE=$(db_feature_to_type $feature) + fi fi if test -n "$DEFAULT_DB_TYPE"; then AC_DEFINE_UNQUOTED([DEFAULT_DB_TYPE], "$DEFAULT_DB_TYPE") diff --git a/doc/mailfromd.texi b/doc/mailfromd.texi index 4ab802ac..9e44bb12 100644 --- a/doc/mailfromd.texi +++ b/doc/mailfromd.texi @@ -926,63 +926,64 @@ Visit @uref{http://www.gnu.org/software/adns}, for more information. @cindex @acronym{DBM} @cindex Berkeley DB @cindex @acronym{GDBM} +@cindex @option{--with-dbm}, @command{configure} option @command{Mailfromd} is able to link with any flavor of @acronym{DBM} supported by GNU mailutils. As of version @value{VERSION} it will refuse to build without @acronym{DBM}. By default, @command{configure} will try to find the best implementation installed on your machine (preference is given to Berkeley DB) and will use it. You can, however, explicitly -specify which implementation you want to use. +specify which implementation you want to use. To do so, use the +@option{--with-dbm} configure option. Its argument specifies the +@dfn{type} of database to use. It must be one of the types supported +by GNU mailutils. At the time of this writing, these are: + +@table @asis +@item bdb +Berkeley DB (versions 2 to 6). +@item gdbm +GNU DBM. +@item kc +Kyoto Cabinet +@item tc +Tokyo Cabinet +@item ndbm +NDBM +@end table + +To check what database types are supported by your version of +mailutils, run the following command: + +@example +$ mailutils dbd gdbm kc tc ndbm +@end example + +For backward compatibility, @command{configure} accepts the following +two options: + +@table @option +@item --with-gdbm +Same as @option{--with-dbm=gdbm}. +@item --with-berkeley-db +Same as @option{--with-dbm=bdb}. +@end table @cindex confMAPDEF, @command{Sendmail} macro - The following table will help you do that. The column @samp{DB type} lists + For @command{Sendmail} users, it often makes sense to configure +@command{mailfromd} to use the same database flavor as @command{sendmail}. +The following table will help you do that. The column @samp{DB type} lists types of @acronym{DBM} databases supported by @command{mailfromd}. The column @samp{confMAPDEF} lists the value of @code{confMAPDEF} Sendmail -configuration macro corresponding to that database type. It is here -because it is usually wise to configure @command{mailfromd} to use the -same database type as your @command{Sendmail} installation. Of -course, this column is irrelevant if you use @command{MeTA1} or @command{Postfix}. -Finally, the column @samp{configure option} lists the option you -should give to @command{configure} to enable using this database. -@samp{N/A} in any column means there is no support for this database in -@command{Sendmail} or @command{mailfromd}. - -@cindex @option{--with-berkeley-db}, @command{configure} option -@cindex @option{--with-gdbm}, @command{configure} option +configuration macro corresponding to that database type. The column +@samp{configure option} contains the corresponding option to configure. + @multitable @columnfractions 0.25 .25 .50 @headitem DB type @tab confMAPDEF @tab configure option -@item NDBM @tab @option{-NNDBM} @tab N/A -@item Berkeley DB @tab @option{-NNEWDB} @tab @option{--with-berkeley-db} -@item GDBM @tab N/A @tab @option{--with-gdbm} +@item NDBM @tab @option{-NNDBM} @tab @option{--with-dbm=ndbm} +@item Berkeley DB @tab @option{-NNEWDB} @tab @option{--with-dbm=bdb} +@item GDBM @tab N/A @tab @option{--with-dbm=gdbm} @end multitable - The @option{--with-berkeley-db} option needs a special note. By default it -will try to determine the version of Berkeley DB installed on your -machine. If, however, this autodetection fails, you can explicitly -specify the version or the library name to use as the argument to -the option. Unless the argument begins with a digit, it is taken as a -library name, without the @samp{lib} prefix and library type suffix, -so that - -@smallexample -./configure --with-berkeley-db=db-3.1 -@end smallexample - -@noindent -instructs @code{configure} to use the library @file{libdb-3.1.so} (or -@file{libdb-3.1.a}). Otherwise, if the argument begins with a digit, -it is understood as a version number of the library to link to. In -this case @code{configure} assumes a Slackware-like installation -layout. Thus, the option - -@smallexample - --with-berkeley-db=3.1 -@end smallexample - -@noindent -tells @command{configure} to use the library @file{libdb-3.1.so} (or -@file{libdb-3.1.a}) and the header file @file{/usr/include/db31/db.h}. - @end enumerate @anchor{default user privileges} diff --git a/doc/upgrade.texi b/doc/upgrade.texi index ea612246..1ce3afde 100644 --- a/doc/upgrade.texi +++ b/doc/upgrade.texi @@ -11,6 +11,7 @@ a pair of versions @var{x}-@var{y} numbers means that no specific actions are required for upgrading from @var{x} to @var{y}. @menu +* 850-860:: Upgrading from 8.5 to 8.6 * 820-830:: Upgrading from 8.2 to 8.3 (or 8.4) * 700-800:: Upgrading from 7.0 to 8.0 * 600-700:: Upgrading from 6.0 to 7.0 @@ -27,6 +28,14 @@ actions are required for upgrading from @var{x} to @var{y}. * 1x-2x:: Upgrading from 1.x to 2.x @end menu +@node 850-860 +@appendixsec Upgrading from 8.5 to 8.6 +@cindex Upgrading from 8.5 to 8.6 + + New configure option @option{--with-dbm} allows you to select any +DBM flavor supported by GNU mailutils as the default DBM implementation +for @command{mailfromd}. + @node 820-830 @appendixsec Upgrading from 8.2 to 8.3 (or 8.4) @cindex Upgrading from 8.2 to 8.3 |