aboutsummaryrefslogtreecommitdiffstats
path: root/main/postfix
diff options
context:
space:
mode:
Diffstat (limited to 'main/postfix')
-rw-r--r--main/postfix/APKBUILD10
-rw-r--r--main/postfix/dynamic-maps3.patch (renamed from main/postfix/0001-support-for-dynamic-maps.patch)258
-rw-r--r--main/postfix/mail_params.patch11
3 files changed, 120 insertions, 159 deletions
diff --git a/main/postfix/APKBUILD b/main/postfix/APKBUILD
index 54f67ab321..4757cfd0fa 100644
--- a/main/postfix/APKBUILD
+++ b/main/postfix/APKBUILD
@@ -1,6 +1,6 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=postfix
-pkgver=2.8.8
+pkgver=2.9.0
pkgrel=0
pkgdesc="Secure and fast drop-in replacement for Sendmail (MTA)"
url="http://www.postfix.org/"
@@ -14,8 +14,7 @@ subpackages="$pkgname-doc $pkgname-ldap $pkgname-mysql $pkgname-pcre
$pkgname-pgsql $pkgname-sqlite"
source="ftp://ftp.porcupine.org/mirrors/$pkgname-release/official/$pkgname-$pkgver.tar.gz
$pkgname.initd
- 0001-support-for-dynamic-maps.patch
- mail_params.patch
+ dynamic-maps3.patch
dynamicmaps.cf
postfix-ldap.post-install
postfix-mysql.post-install
@@ -157,10 +156,9 @@ pcre() { _mv_dict pcre ; }
pgsql() { _mv_dict pgsql ; }
sqlite() { _mv_dict sqlite ; }
-md5sums="b5ab8ba2691620dd31b1295b1e21ee23 postfix-2.8.8.tar.gz
+md5sums="43a5ea2d6fb39185a60b4635e016967e postfix-2.9.0.tar.gz
d773f01dcc965d219a8a37b88f89c5bf postfix.initd
-632fce950f64aa0794f9c2af85d45423 0001-support-for-dynamic-maps.patch
-c0f9552a6cfb1e23dedb8d5a12a45ee4 mail_params.patch
+8de3f108639eda995162c590053a1278 dynamic-maps3.patch
442efd1a95b0c061dfb8ab75456e0f24 dynamicmaps.cf
2ebe51a882eb9d6d7866583eb6af3969 postfix-ldap.post-install
2ebe51a882eb9d6d7866583eb6af3969 postfix-mysql.post-install
diff --git a/main/postfix/0001-support-for-dynamic-maps.patch b/main/postfix/dynamic-maps3.patch
index a15a62bf11..0e5a3c95db 100644
--- a/main/postfix/0001-support-for-dynamic-maps.patch
+++ b/main/postfix/dynamic-maps3.patch
@@ -1,35 +1,5 @@
-From 7e51893c53eca9bb0e952941e5f50163131c21eb Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Fri, 11 Mar 2011 15:33:18 +0000
-Subject: [PATCH] support for dynamic maps
-
-forward ported
----
- conf/postfix-files | 11 +++
- src/dns/Makefile.in | 5 +-
- src/global/Makefile.in | 44 +++++++++--
- src/global/mail_conf.c | 6 ++
- src/global/mail_dict.c | 2 +
- src/global/mail_params.c | 4 +
- src/global/mkmap_open.c | 11 +++-
- src/master/Makefile.in | 6 +-
- src/milter/Makefile.in | 6 +-
- src/postconf/postconf.c | 10 +++
- src/postmap/postmap.c | 51 +++++++++++--
- src/tls/Makefile.in | 6 +-
- src/util/Makefile.in | 29 +++++---
- src/util/dict.h | 6 ++
- src/util/dict_db.c | 6 ++
- src/util/dict_dbm.c | 4 +
- src/util/dict_open.c | 183 +++++++++++++++++++++++++++++++++++++++++++++-
- src/util/load_lib.c | 135 ++++++++++++++++++++++++++++++++++
- src/util/load_lib.h | 41 ++++++++++
- 19 files changed, 520 insertions(+), 46 deletions(-)
- create mode 100644 src/util/load_lib.c
- create mode 100644 src/util/load_lib.h
-
diff --git a/conf/postfix-files b/conf/postfix-files
-index d3911d6..7a7b619 100644
+index 90ef957..c4c522a 100644
--- a/conf/postfix-files
+++ b/conf/postfix-files
@@ -65,6 +65,11 @@ $queue_directory/saved:d:$mail_owner:-:700:ucr
@@ -65,7 +35,7 @@ index d3911d6..7a7b619 100644
$config_directory/generic:f:root:-:644:p1
$config_directory/generics:f:root:-:644:o
diff --git a/src/dns/Makefile.in b/src/dns/Makefile.in
-index bbc5e98..b71082e 100644
+index bbc5e98..e14c6fe 100644
--- a/src/dns/Makefile.in
+++ b/src/dns/Makefile.in
@@ -14,7 +14,7 @@ LIBS = ../../lib/libutil.a
@@ -77,10 +47,11 @@ index bbc5e98..b71082e 100644
all: $(LIB)
-@@ -32,11 +32,10 @@ root_tests:
+@@ -31,12 +31,10 @@ tests: test dns_rr_to_pa_test dns_rr_to_sa_test dns_sa_to_rr_test \
+ root_tests:
$(LIB): $(OBJS)
- $(AR) $(ARFL) $(LIB) $?
+- $(AR) $(ARFL) $(LIB) $?
- $(RANLIB) $(LIB)
+ $(CC) -shared -Wl,-soname,libpostfix-dns.so.1 -o $(LIB) $(OBJS) $(LIBS) $(SYSLIBS)
@@ -91,10 +62,10 @@ index bbc5e98..b71082e 100644
update: $(LIB_DIR)/$(LIB) $(HDRS)
-for i in $(HDRS); \
diff --git a/src/global/Makefile.in b/src/global/Makefile.in
-index 1a35114..bc4b643 100644
+index d8fb3db..0b26b6f 100644
--- a/src/global/Makefile.in
+++ b/src/global/Makefile.in
-@@ -35,8 +35,8 @@ OBJS = abounce.o anvil_clnt.o been_here.o bounce.o bounce_log.o \
+@@ -37,8 +37,8 @@ OBJS = abounce.o anvil_clnt.o been_here.o bounce.o bounce_log.o \
canon_addr.o cfg_parser.o cleanup_strerror.o cleanup_strflags.o \
clnt_stream.o conv_time.o db_common.o debug_peer.o debug_process.o \
defer.o deliver_completed.o deliver_flock.o deliver_pass.o \
@@ -105,7 +76,7 @@ index 1a35114..bc4b643 100644
dsb_scan.o dsn.o dsn_buf.o dsn_mask.o dsn_print.o dsn_util.o \
ehlo_mask.o ext_prop.o file_id.o flush_clnt.o header_opts.o \
header_token.o input_transp.o int_filt.o is_header.o log_adhoc.o \
-@@ -106,10 +106,14 @@ LIBS = ../../lib/libutil.a
+@@ -112,10 +112,14 @@ LIBS = ../../lib/libutil.a
LIB_DIR = ../../lib
INC_DIR = ../../include
MAKES =
@@ -122,7 +93,7 @@ index 1a35114..bc4b643 100644
$(OBJS): ../../conf/makedefs.out
-@@ -119,14 +123,36 @@ Makefile: Makefile.in
+@@ -125,14 +129,36 @@ Makefile: Makefile.in
test: $(TESTPROG)
$(LIB): $(OBJS)
@@ -163,7 +134,7 @@ index 1a35114..bc4b643 100644
-for i in $(HDRS); \
do \
cmp -s $$i $(INC_DIR)/$$i 2>/dev/null || cp $$i $(INC_DIR); \
-@@ -497,7 +523,7 @@ lint:
+@@ -577,7 +603,7 @@ lint:
lint $(DEFS) $(SRCS) $(LINTFIX)
clean:
@@ -173,12 +144,12 @@ index 1a35114..bc4b643 100644
tidy: clean
diff --git a/src/global/mail_conf.c b/src/global/mail_conf.c
-index 1fc7847..2af757f 100644
+index ae0ae98..f414c47 100644
--- a/src/global/mail_conf.c
+++ b/src/global/mail_conf.c
@@ -190,6 +190,12 @@ void mail_conf_suck(void)
- path = concatenate(var_config_dir, "/", "main.cf", (char *) 0);
- dict_load_file(CONFIG_DICT, path);
+ if (dict_load_file_xt(CONFIG_DICT, path) == 0)
+ msg_fatal("open %s: %m", path);
myfree(path);
+
+#ifndef NO_DYNAMIC_MAPS
@@ -190,10 +161,10 @@ index 1fc7847..2af757f 100644
/* mail_conf_flush - discard configuration dictionary */
diff --git a/src/global/mail_dict.c b/src/global/mail_dict.c
-index 337861d..663f90f 100644
+index 6dbf6ee..ff0eee6 100644
--- a/src/global/mail_dict.c
+++ b/src/global/mail_dict.c
-@@ -46,6 +46,7 @@ typedef struct {
+@@ -47,6 +47,7 @@ typedef struct {
static const DICT_OPEN_INFO dict_open_info[] = {
DICT_TYPE_PROXY, dict_proxy_open,
@@ -201,16 +172,16 @@ index 337861d..663f90f 100644
#ifdef HAS_LDAP
DICT_TYPE_LDAP, dict_ldap_open,
#endif
-@@ -58,6 +59,7 @@ static const DICT_OPEN_INFO dict_open_info[] = {
+@@ -59,6 +60,7 @@ static const DICT_OPEN_INFO dict_open_info[] = {
#ifdef HAS_SQLITE
DICT_TYPE_SQLITE, dict_sqlite_open,
#endif
+#endif /* NO_DYNAMIC_MAPS */
+ DICT_TYPE_MEMCACHE, dict_memcache_open,
0,
};
-
diff --git a/src/global/mail_params.c b/src/global/mail_params.c
-index f5350a1..db33da1 100644
+index 0e098b3..dac095d 100644
--- a/src/global/mail_params.c
+++ b/src/global/mail_params.c
@@ -79,6 +79,7 @@
@@ -229,7 +200,7 @@ index f5350a1..db33da1 100644
/* char *var_trace_service;
/* char *var_proxymap_service;
/* char *var_proxywrite_service;
-@@ -265,6 +267,7 @@ char *var_import_environ;
+@@ -268,6 +270,7 @@ char *var_import_environ;
char *var_export_environ;
char *var_debug_peer_list;
int var_debug_peer_level;
@@ -237,7 +208,7 @@ index f5350a1..db33da1 100644
int var_fault_inj_code;
char *var_bounce_service;
char *var_cleanup_service;
-@@ -276,6 +279,7 @@ char *var_showq_service;
+@@ -279,6 +282,7 @@ char *var_showq_service;
char *var_error_service;
char *var_flush_service;
char *var_verify_service;
@@ -246,10 +217,10 @@ index f5350a1..db33da1 100644
char *var_proxymap_service;
char *var_proxywrite_service;
diff --git a/src/global/mkmap_open.c b/src/global/mkmap_open.c
-index 69a0d57..eb8de71 100644
+index d939d44..b2e729e 100644
--- a/src/global/mkmap_open.c
+++ b/src/global/mkmap_open.c
-@@ -81,7 +81,7 @@
+@@ -82,7 +82,7 @@
* We use a different table (in dict_open.c) when querying maps.
*/
typedef struct {
@@ -258,7 +229,7 @@ index 69a0d57..eb8de71 100644
MKMAP *(*before_open) (const char *);
} MKMAP_OPEN_INFO;
-@@ -156,7 +156,16 @@ MKMAP *mkmap_open(const char *type, const char *path,
+@@ -161,7 +161,16 @@ MKMAP *mkmap_open(const char *type, const char *path,
*/
for (mp = mkmap_types; /* void */ ; mp++) {
if (mp->type == 0)
@@ -276,7 +247,7 @@ index 69a0d57..eb8de71 100644
break;
}
diff --git a/src/master/Makefile.in b/src/master/Makefile.in
-index 53f65bd..6a562cf 100644
+index f1a59f6..0eb5d2d 100644
--- a/src/master/Makefile.in
+++ b/src/master/Makefile.in
@@ -20,7 +20,7 @@ LIB_DIR = ../../lib
@@ -329,29 +300,41 @@ index c28263a..c475629 100644
update: $(LIB_DIR)/$(LIB) $(HDRS)
-for i in $(HDRS); \
-diff --git a/src/postconf/postconf.c b/src/postconf/postconf.c
-index 82d8be0..e12baa9 100644
---- a/src/postconf/postconf.c
-+++ b/src/postconf/postconf.c
-@@ -1013,6 +1013,16 @@ static void show_maps(void)
+diff --git a/src/postconf/postconf_other.c b/src/postconf/postconf_other.c
+index 04f9404..1752450 100644
+--- a/src/postconf/postconf_other.c
++++ b/src/postconf/postconf_other.c
+@@ -55,6 +55,10 @@
+
+ #include <xsasl.h>
+
++/* Global library. */
++
++#include <mail_params.h>
++
+ /* Application-specific. */
+
+ #include <postconf.h>
+@@ -65,7 +69,16 @@ void show_maps(void)
{
ARGV *maps_argv;
int i;
+-
+#ifndef NO_DYNAMIC_MAPS
+ char *path;
+ char *config_dir;
+
-+ var_config_dir = mystrdup((config_dir = safe_getenv(CONF_ENV_PATH)) != 0 ?
-+ config_dir : DEF_CONFIG_DIR); /* XXX */
++ if (var_config_dir == 0)
++ set_config_dir();
+ path = concatenate(var_config_dir, "/", "dynamicmaps.cf", (char *) 0);
+ dict_open_dlinfo(path);
+ myfree(path);
+#endif
-
maps_argv = dict_mapnames();
for (i = 0; i < maps_argv->argc; i++)
+ vstream_printf("%s\n", maps_argv->argv[i]);
diff --git a/src/postmap/postmap.c b/src/postmap/postmap.c
-index e956aed..0981c7e 100644
+index 8249d79..8833dc4 100644
--- a/src/postmap/postmap.c
+++ b/src/postmap/postmap.c
@@ -5,7 +5,7 @@
@@ -372,7 +355,7 @@ index e956aed..0981c7e 100644
/* .IP \fB-v\fR
/* Enable verbose logging for debugging purposes. Multiple \fB-v\fR
/* options make the software increasingly verbose.
-@@ -723,6 +725,18 @@ static void postmap_seq(const char *map_type, const char *map_name,
+@@ -748,6 +750,18 @@ static void postmap_seq(const char *map_type, const char *map_name,
dict_close(dict);
}
@@ -391,7 +374,7 @@ index e956aed..0981c7e 100644
/* usage - explain */
static NORETURN usage(char *myname)
-@@ -743,6 +757,7 @@ int main(int argc, char **argv)
+@@ -768,6 +782,7 @@ int main(int argc, char **argv)
int postmap_flags = POSTMAP_FLAG_AS_OWNER | POSTMAP_FLAG_SAVE_PERM;
int open_flags = O_RDWR | O_CREAT | O_TRUNC;
int dict_flags = DICT_FLAG_DUP_WARN | DICT_FLAG_FOLD_FIX;
@@ -399,7 +382,7 @@ index e956aed..0981c7e 100644
char *query = 0;
char *delkey = 0;
int sequence = 0;
-@@ -787,7 +802,7 @@ int main(int argc, char **argv)
+@@ -817,7 +832,7 @@ int main(int argc, char **argv)
/*
* Parse JCL.
*/
@@ -408,7 +391,7 @@ index e956aed..0981c7e 100644
switch (ch) {
default:
usage(argv[0]);
-@@ -804,8 +819,8 @@ int main(int argc, char **argv)
+@@ -834,8 +849,8 @@ int main(int argc, char **argv)
msg_fatal("out of memory");
break;
case 'd':
@@ -419,7 +402,7 @@ index e956aed..0981c7e 100644
delkey = optarg;
break;
case 'f':
-@@ -831,8 +846,8 @@ int main(int argc, char **argv)
+@@ -861,8 +876,8 @@ int main(int argc, char **argv)
postmap_flags &= ~POSTMAP_FLAG_SAVE_PERM;
break;
case 'q':
@@ -430,7 +413,7 @@ index e956aed..0981c7e 100644
query = optarg;
break;
case 'r':
-@@ -840,10 +855,15 @@ int main(int argc, char **argv)
+@@ -870,10 +885,15 @@ int main(int argc, char **argv)
dict_flags |= DICT_FLAG_DUP_REPLACE;
break;
case 's':
@@ -448,7 +431,7 @@ index e956aed..0981c7e 100644
case 'v':
msg_verbose++;
break;
-@@ -914,6 +934,21 @@ int main(int argc, char **argv)
+@@ -944,6 +964,21 @@ int main(int argc, char **argv)
exit(0);
}
exit(1);
@@ -498,16 +481,21 @@ index 1dbe154..b952aa4 100644
update: $(LIB_DIR)/$(LIB) $(HDRS)
-for i in $(HDRS); \
diff --git a/src/util/Makefile.in b/src/util/Makefile.in
-index 4455fbf..481ec42 100644
+index dc7a4bb..4454085 100644
--- a/src/util/Makefile.in
+++ b/src/util/Makefile.in
-@@ -33,21 +33,22 @@ SRCS = alldig.c allprint.c argv.c argv_split.c attr_clnt.c attr_print0.c \
- allascii.c load_file.c killme_after.c vstream_tweak.c \
- unix_pass_listen.c unix_pass_trigger.c edit_file.c inet_windowsize.c \
- unix_pass_fd_fix.c dict_cache.c valid_utf_8.c dict_thash.c \
-- ip_match.c nbbio.c stream_pass_connect.c
-+ ip_match.c nbbio.c stream_pass_connect.c load_lib.c
+@@ -1,5 +1,6 @@
+ SHELL = /bin/sh
+ SRCS = alldig.c allprint.c argv.c argv_split.c attr_clnt.c attr_print0.c \
++ load_lib.c \
+ attr_print64.c attr_print_plain.c attr_scan0.c attr_scan64.c \
+ attr_scan_plain.c auto_clnt.c base64_code.c basename.c binhash.c \
+ chroot_uid.c cidr_match.c clean_env.c close_on_exec.c concatenate.c \
+@@ -36,13 +37,14 @@ SRCS = alldig.c allprint.c argv.c argv_split.c attr_clnt.c attr_print0.c \
+ ip_match.c nbbio.c stream_pass_connect.c base32_code.c dict_test.c \
+ dict_fail.c msg_rate_delay.c dict_surrogate.c warn_stat.c
OBJS = alldig.o allprint.o argv.o argv_split.o attr_clnt.o attr_print0.o \
++ load_lib.o \
attr_print64.o attr_print_plain.o attr_scan0.o attr_scan64.o \
attr_scan_plain.o auto_clnt.o base64_code.o basename.o binhash.o \
chroot_uid.o cidr_match.o clean_env.o close_on_exec.o concatenate.o \
@@ -520,22 +508,15 @@ index 4455fbf..481ec42 100644
dummy_write.o duplex_pipe.o environ.o events.o exec_command.o \
fifo_listen.o fifo_trigger.o file_limit.o find_inet.o fsspace.o \
fullname.o get_domainname.o get_hostname.o hex_code.o hex_quote.o \
- host_port.o htable.o inet_addr_host.o inet_addr_list.o \
- inet_addr_local.o inet_connect.o inet_listen.o inet_proto.o \
- inet_trigger.o line_wrap.o lowercase.o lstat_as.o mac_expand.o \
-+ load_lib.o \
- mac_parse.o make_dirs.o mask_addr.o match_list.o match_ops.o msg.o \
- msg_output.o msg_syslog.o msg_vstream.o mvect.o myaddrinfo.o myflock.o \
- mymalloc.o myrand.o mystrtok.o name_code.o name_mask.o netstring.o \
-@@ -89,13 +90,14 @@ HDRS = argv.h attr.h attr_clnt.h auto_clnt.h base64_code.h binhash.h \
- username.h valid_hostname.h vbuf.h vbuf_print.h vstream.h vstring.h \
- vstring_vstream.h watchdog.h format_tv.h load_file.h killme_after.h \
- edit_file.h dict_cache.h dict_thash.h \
-- ip_match.h nbbio.h
-+ ip_match.h nbbio.h load_lib.h
- TESTSRC = fifo_open.c fifo_rdwr_bug.c fifo_rdonly_bug.c select_bug.c \
- stream_test.c dup2_pass_on_exec.c
- DEFS = -I. -D$(SYSTYPE)
+@@ -72,6 +74,7 @@ OBJS = alldig.o allprint.o argv.o argv_split.o attr_clnt.o attr_print0.o \
+ ip_match.o nbbio.o stream_pass_connect.o base32_code.o dict_test.o \
+ dict_fail.o msg_rate_delay.o dict_surrogate.o warn_stat.o
+ HDRS = argv.h attr.h attr_clnt.h auto_clnt.h base64_code.h binhash.h \
++ load_lib.h \
+ chroot_uid.h cidr_match.h clean_env.h connect.h ctable.h dict.h \
+ dict_cdb.h dict_cidr.h dict_db.h dict_dbm.h dict_env.h dict_ht.h \
+ dict_ni.h dict_nis.h dict_nisplus.h dict_pcre.h dict_regexp.h \
+@@ -98,6 +101,7 @@ DEFS = -I. -D$(SYSTYPE)
CFLAGS = $(DEBUG) $(OPT) $(DEFS)
FILES = Makefile $(SRCS) $(HDRS)
INCL =
@@ -543,7 +524,7 @@ index 4455fbf..481ec42 100644
LIB = libutil.a
TESTPROG= dict_open dup2_pass_on_exec events exec_command fifo_open \
fifo_rdonly_bug fifo_rdwr_bug fifo_trigger fsspace fullname \
-@@ -111,10 +113,11 @@ TESTPROG= dict_open dup2_pass_on_exec events exec_command fifo_open \
+@@ -113,10 +117,11 @@ TESTPROG= dict_open dup2_pass_on_exec events exec_command fifo_open \
LIB_DIR = ../../lib
INC_DIR = ../../include
@@ -557,7 +538,7 @@ index 4455fbf..481ec42 100644
$(OBJS): ../../conf/makedefs.out
-@@ -123,15 +126,19 @@ Makefile: Makefile.in
+@@ -125,15 +130,19 @@ Makefile: Makefile.in
test: $(TESTPROG)
@@ -581,7 +562,7 @@ index 4455fbf..481ec42 100644
-for i in $(HDRS); \
do \
cmp -s $$i $(INC_DIR)/$$i 2>/dev/null || cp $$i $(INC_DIR); \
-@@ -153,7 +160,7 @@ lint:
+@@ -155,7 +164,7 @@ lint:
lint $(DEFS) $(SRCS) $(LINTFIX)
clean:
@@ -591,18 +572,18 @@ index 4455fbf..481ec42 100644
tidy: clean
diff --git a/src/util/dict.h b/src/util/dict.h
-index 9829d28..d7dc53c 100644
+index f8e91a4..d7ae8fe 100644
--- a/src/util/dict.h
+++ b/src/util/dict.h
-@@ -66,6 +66,7 @@ extern DICT *dict_debug(DICT *);
+@@ -80,6 +80,7 @@ extern DICT *dict_debug(DICT *);
#define DICT_FLAG_NO_UNAUTH (1<<13) /* disallow unauthenticated data */
#define DICT_FLAG_FOLD_FIX (1<<14) /* case-fold key with fixed-case map */
#define DICT_FLAG_FOLD_MUL (1<<15) /* case-fold key with multi-case map */
+#define DICT_FLAG_UPGRADE (1<<30) /* Upgrade the db */
#define DICT_FLAG_FOLD_ANY (DICT_FLAG_FOLD_FIX | DICT_FLAG_FOLD_MUL)
+ #define DICT_FLAG_OPEN_LOCK (1<<16) /* open file with exclusive lock */
- /* IMPORTANT: Update the dict_mask[] table when the above changes */
-@@ -138,6 +139,11 @@ extern const char *dict_eval(const char *, const char *, int);
+@@ -166,6 +167,11 @@ extern int dict_error(const char *);
extern DICT *dict_open(const char *, int, int);
extern DICT *dict_open3(const char *, const char *, int, int);
extern void dict_open_register(const char *, DICT *(*) (const char *, int, int));
@@ -615,10 +596,10 @@ index 9829d28..d7dc53c 100644
#define dict_get(dp, key) ((const char *) (dp)->lookup((dp), (key)))
#define dict_put(dp, key, val) (dp)->update((dp), (key), (val))
diff --git a/src/util/dict_db.c b/src/util/dict_db.c
-index c827b8d..e33fc24 100644
+index 93ee480..cf382e3 100644
--- a/src/util/dict_db.c
+++ b/src/util/dict_db.c
-@@ -676,6 +676,12 @@ static DICT *dict_db_open(const char *class, const char *path, int open_flags,
+@@ -693,6 +693,12 @@ static DICT *dict_db_open(const char *class, const char *path, int open_flags,
msg_fatal("set DB cache size %d: %m", dict_db_cache_size);
if (type == DB_HASH && db->set_h_nelem(db, DICT_DB_NELM) != 0)
msg_fatal("set DB hash element count %d: %m", DICT_DB_NELM);
@@ -630,12 +611,12 @@ index c827b8d..e33fc24 100644
+ }
#if DB_VERSION_MAJOR == 5 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR > 0)
if ((errno = db->open(db, 0, db_path, 0, type, db_flags, 0644)) != 0)
- msg_fatal("open database %s: %m", db_path);
+ FREE_RETURN(dict_surrogate(class, path, open_flags, dict_flags,
diff --git a/src/util/dict_dbm.c b/src/util/dict_dbm.c
-index 3603e44..1958556 100644
+index 37e1463..56fd3dc 100644
--- a/src/util/dict_dbm.c
+++ b/src/util/dict_dbm.c
-@@ -409,6 +409,10 @@ DICT *dict_dbm_open(const char *path, int open_flags, int dict_flags)
+@@ -417,6 +417,10 @@ DICT *dict_dbm_open(const char *path, int open_flags, int dict_flags)
char *dbm_path;
int lock_fd;
@@ -647,7 +628,7 @@ index 3603e44..1958556 100644
* Note: DICT_FLAG_LOCK is used only by programs that do fine-grained (in
* the time domain) locking while accessing individual database records.
diff --git a/src/util/dict_open.c b/src/util/dict_open.c
-index 9e1358f..19e40bf 100644
+index 7b7c0c5..241c337 100644
--- a/src/util/dict_open.c
+++ b/src/util/dict_open.c
@@ -44,6 +44,8 @@
@@ -659,7 +640,7 @@ index 9e1358f..19e40bf 100644
/* DESCRIPTION
/* This module implements a low-level interface to multiple
/* physical dictionary types.
-@@ -161,6 +163,9 @@
+@@ -166,6 +168,9 @@
/*
/* dict_mapnames() returns a sorted list with the names of all available
/* dictionary types.
@@ -669,7 +650,7 @@ index 9e1358f..19e40bf 100644
/* DIAGNOSTICS
/* Fatal error: open error, unsupported dictionary type, attempt to
/* update non-writable dictionary.
-@@ -185,6 +190,9 @@
+@@ -213,6 +218,9 @@
#include <strings.h>
#endif
@@ -679,9 +660,9 @@ index 9e1358f..19e40bf 100644
/* Utility library. */
#include <argv.h>
-@@ -211,6 +219,27 @@
- #include <split_at.h>
+@@ -241,6 +249,27 @@
#include <htable.h>
+ #include <myflock.h>
+#ifndef NO_DYNAMIC_MAPS
+#include <load_lib.h>
@@ -707,7 +688,7 @@ index 9e1358f..19e40bf 100644
/*
* lookup table for available map types.
*/
-@@ -226,7 +255,9 @@ static const DICT_OPEN_INFO dict_open_info[] = {
+@@ -256,7 +285,9 @@ static const DICT_OPEN_INFO dict_open_info[] = {
DICT_TYPE_ENVIRON, dict_env_open,
DICT_TYPE_HT, dict_ht_open,
DICT_TYPE_UNIX, dict_unix_open,
@@ -717,7 +698,7 @@ index 9e1358f..19e40bf 100644
#ifdef HAS_SDBM
DICT_TYPE_SDBM, dict_sdbm_open,
#endif
-@@ -246,9 +277,11 @@ static const DICT_OPEN_INFO dict_open_info[] = {
+@@ -276,9 +307,11 @@ static const DICT_OPEN_INFO dict_open_info[] = {
#ifdef HAS_NETINFO
DICT_TYPE_NETINFO, dict_ni_open,
#endif
@@ -729,41 +710,37 @@ index 9e1358f..19e40bf 100644
#ifdef HAS_POSIX_REGEXP
DICT_TYPE_REGEXP, dict_regexp_open,
#endif
-@@ -307,8 +340,31 @@ DICT *dict_open3(const char *dict_type, const char *dict_name,
+@@ -338,9 +371,28 @@ DICT *dict_open3(const char *dict_type, const char *dict_name,
dict_type, dict_name);
if (dict_open_hash == 0)
dict_open_init();
- if ((dp = (DICT_OPEN_INFO *) htable_find(dict_open_hash, dict_type)) == 0)
-- msg_fatal("unsupported dictionary type: %s", dict_type);
+ if ((dp = (DICT_OPEN_INFO *) htable_find(dict_open_hash, dict_type)) == 0) {
+#ifdef NO_DYNAMIC_MAPS
-+ msg_fatal("%s: unsupported dictionary type: %s", myname, dict_type);
+ return (dict_surrogate(dict_type, dict_name, open_flags, dict_flags,
+ "unsupported dictionary type: %s", dict_type));
+#else
-+ struct stat st;
-+ LIB_FN fn[2];
-+ DICT *(*open) (const char *, int, int);
-+ DLINFO *dl=dict_open_dlfind(dict_type);
-+ if (!dl)
-+ msg_fatal("%s: unsupported dictionary type: %s: Is the postfix-%s package installed?", myname, dict_type, dict_type);
-+ if (stat(dl->soname,&st) < 0) {
-+ msg_fatal("%s: unsupported dictionary type: %s (%s not found. Is the postfix-%s package installed?)",
-+ myname, dict_type, dl->soname, dict_type);
-+ }
-+ fn[0].name = dl->openfunc;
-+ fn[0].ptr = (void**)&open;
-+ fn[1].name = NULL;
-+ load_library_symbols(dl->soname, fn, NULL);
-+ dict_open_register(dict_type, open);
-+ dp = (DICT_OPEN_INFO *) htable_find(dict_open_hash, dict_type);
++ struct stat st;
++ LIB_FN fn[2];
++ DICT *(*open) (const char *, int, int);
++ DLINFO *dl=dict_open_dlfind(dict_type);
++ if ((!dl) || (stat(dl->soname, &st) < 0))
++ return (dict_surrogate(dict_type, dict_name, open_flags, dict_flags,
++ "unsupported dictionary type: %s: "
++ "Is the postfix-%s package installed?",
++ dict_type, dict_type));
++ fn[0].name = dl->openfunc;
++ fn[0].ptr = (void**)&open;
++ fn[1].name = NULL;
++ load_library_symbols(dl->soname, fn, NULL);
++ dict_open_register(dict_type, open);
++ dp = (DICT_OPEN_INFO *) htable_find(dict_open_hash, dict_type);
+#endif
+ }
-+ if (msg_verbose>1) {
-+ msg_info("%s: calling %s open routine",myname,dict_type);
-+ }
if ((dict = dp->open(dict_name, open_flags, dict_flags)) == 0)
- msg_fatal("opening %s:%s %m", dict_type, dict_name);
- if (msg_verbose)
-@@ -316,6 +372,36 @@ DICT *dict_open3(const char *dict_type, const char *dict_name,
+ return (dict_surrogate(dict_type, dict_name, open_flags, dict_flags,
+ "cannot open %s:%s: %m", dict_type, dict_name));
+@@ -359,6 +411,36 @@ DICT *dict_open3(const char *dict_type, const char *dict_name,
return (dict);
}
@@ -800,7 +777,7 @@ index 9e1358f..19e40bf 100644
/* dict_open_register - register dictionary type */
void dict_open_register(const char *type,
-@@ -349,6 +435,9 @@ ARGV *dict_mapnames()
+@@ -392,6 +474,9 @@ ARGV *dict_mapnames()
HTABLE_INFO **ht;
DICT_OPEN_INFO *dp;
ARGV *mapnames;
@@ -810,7 +787,7 @@ index 9e1358f..19e40bf 100644
if (dict_open_hash == 0)
dict_open_init();
-@@ -357,6 +446,13 @@ ARGV *dict_mapnames()
+@@ -400,6 +485,13 @@ ARGV *dict_mapnames()
dp = (DICT_OPEN_INFO *) ht[0]->value;
argv_add(mapnames, dp->type, ARGV_END);
}
@@ -824,7 +801,7 @@ index 9e1358f..19e40bf 100644
qsort((void *) mapnames->argv, mapnames->argc, sizeof(mapnames->argv[0]),
dict_sort_alpha_cpp);
myfree((char *) ht_info);
-@@ -364,6 +460,89 @@ ARGV *dict_mapnames()
+@@ -407,6 +499,89 @@ ARGV *dict_mapnames()
return mapnames;
}
@@ -1102,6 +1079,3 @@ index 0000000..adebd25
+/*--*/
+
+#endif
---
-1.7.4.1
-
diff --git a/main/postfix/mail_params.patch b/main/postfix/mail_params.patch
deleted file mode 100644
index d37a2f28ae..0000000000
--- a/main/postfix/mail_params.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./src/global/mail_params.h.orig
-+++ ./src/global/mail_params.h
-@@ -2224,7 +2224,7 @@
-
- #define VAR_PROXY_WRITE_MAPS "proxy_write_maps"
- #define DEF_PROXY_WRITE_MAPS "$" VAR_SMTP_SASL_AUTH_CACHE_NAME \
-- " $" VAR_LMTP_SASL_AUTH_CACHE_NAME
-+ " $" VAR_LMTP_SASL_AUTH_CACHE_NAME \
- " $" VAR_VERIFY_MAP \
- " $" VAR_PSC_CACHE_MAP
- extern char *var_proxy_write_maps;