update: $(LIB_DIR)/$(LIB) $(HDRS)
-for i in $(HDRS); \
-diff -durN postfix-2.1.3.orig/src/global/Makefile.in postfix-2.1.3/src/global/Makefile.in
---- postfix-2.1.3.orig/src/global/Makefile.in 2004-06-22 15:38:56.931476412 +0200
-+++ postfix-2.1.3/src/global/Makefile.in 2004-06-22 15:39:56.167971280 +0200
-@@ -90,8 +90,11 @@
- LIB_DIR = ../../lib
- INC_DIR = ../../include
- MAKES =
-+LDAPSO = dict_ldap.so
-+MYSQLSO = dict_mysql.so
-+PGSQLSO = dict_pgsql.so
-
--.c.o:; $(CC) $(CFLAGS) -c $*.c
-+.c.o:; $(CC) -fPIC $(CFLAGS) -c $*.c
-
- all: $(LIB)
-
-@@ -101,14 +104,30 @@
- test: $(TESTPROG)
-
- $(LIB): $(OBJS)
-- $(AR) $(ARFL) $(LIB) $?
-- $(RANLIB) $(LIB)
-+ gcc -shared -Wl,-soname,libpostfix-global.so.1 -o $(LIB) $(OBJS)
-+
-+$(LDAPSO): dict_ldap.o
-+ gcc -shared -Wl,-soname,dict_ldap.so -o $@ $? -lldap -llber -L../../lib -lutil -L. -lglobal
-+
-+$(MYSQLSO): dict_mysql.o
-+ gcc -shared -Wl,-soname,dict_ldap.so -o $@ $? -lmysqlclient -L../../lib -lutil -L. -lglobal
-+
-+$(PGSQLSO): dict_pgsql.o
-+ gcc -shared -Wl,-soname,dict_ldap.so -o $@ $? -lpq -L../../lib -lutil -L. -lglobal
-
- $(LIB_DIR)/$(LIB): $(LIB)
- cp $(LIB) $(LIB_DIR)
-- $(RANLIB) $(LIB_DIR)/$(LIB)
-
--update: $(LIB_DIR)/$(LIB) $(HDRS)
-+$(LIB_DIR)/$(LDAPSO): $(LDAPSO)
-+ cp $(LDAPSO) $(LIB_DIR)
-+
-+$(LIB_DIR)/$(MYSQLSO): $(MYSQLSO)
-+ cp $(MYSQLSO) $(LIB_DIR)
-+
-+$(LIB_DIR)/$(PGSQLSO): $(PGSQLSO)
-+ cp $(PGSQLSO) $(LIB_DIR)
-+
-+update: $(LIB_DIR)/$(LIB) $(LIB_DIR)/${LDAPSO} $(LIB_DIR)/${MYSQLSO} $(LIB_DIR)/${PGSQLSO} $(HDRS)
- -for i in $(HDRS); \
- do \
- cmp -s $$i $(INC_DIR)/$$i 2>/dev/null || cp $$i $(INC_DIR); \
-@@ -360,7 +379,7 @@
- lint $(DEFS) $(SRCS) $(LINTFIX)
-
- clean:
-- rm -f *.o $(LIB) *core $(TESTPROG) junk
-+ rm -f *.o $(LIB) $(LDAPSO) $(MYSQLSO) $(PGSQLSO) *core $(TESTPROG) junk
- rm -rf printfck
-
- tidy: clean
diff -durN postfix-2.1.3.orig/src/global/mail_conf.c postfix-2.1.3/src/global/mail_conf.c
--- postfix-2.1.3.orig/src/global/mail_conf.c 2004-04-10 16:52:51.000000000 +0200
+++ postfix-2.1.3/src/global/mail_conf.c 2004-06-22 15:39:24.247860093 +0200
/*
* High-level interface, with logical dictionary names.
*/
-diff -durN postfix-2.1.3.orig/src/util/dict_open.c postfix-2.1.3/src/util/dict_open.c
---- postfix-2.1.3.orig/src/util/dict_open.c 2004-06-22 15:38:57.069468247 +0200
-+++ postfix-2.1.3/src/util/dict_open.c 2004-06-22 15:39:24.254859679 +0200
-@@ -158,6 +158,9 @@
- #include <strings.h>
- #endif
-
-+#include <sys/stat.h>
-+#include <unistd.h>
-+
- /* Utility library. */
-
- #include <argv.h>
-@@ -181,6 +184,14 @@
- #include <split_at.h>
- #include <htable.h>
-
-+#ifndef NO_DYNAMIC_MAPS
-+#include <load_lib.h>
-+#include <vstring.h>
-+#include <vstream.h>
-+#include <vstring_vstream.h>
-+#include <mvect.h>
-+#endif
-+
- /*
- * lookup table for available map types.
- */
-@@ -212,9 +223,11 @@
- #ifdef HAS_NETINFO
- DICT_TYPE_NETINFO, dict_ni_open,
- #endif
-+#ifndef MAX_DYNAMIC_MAPS
- #ifdef HAS_PCRE
- DICT_TYPE_PCRE, dict_pcre_open,
- #endif
-+#endif /* MAX_DYNAMIC_MAPS */
- #ifdef HAS_POSIX_REGEXP
- DICT_TYPE_REGEXP, dict_regexp_open,
- #endif
-@@ -269,8 +282,38 @@
-
- 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) {
-+#ifndef NO_DYNAMIC_MAPS
-+ struct stat st;
-+ VSTRING *lib, *func;
-+ LIB_FN fn[2];
-+ DICT *(*open) (const char *, int, int);
-+ DLINFO *dl=dict_open_dlfind(dict_type);
-+ if (!dl)
-+#endif
-+ msg_fatal("%s: unsupported dictionary type: %s", myname, dict_type);
-+#ifndef NO_DYNAMIC_MAPS
-+ lib=vstring_alloc(1);
-+ vstring_sprintf(lib,dl->soname,dict_type);
-+ if (stat(vstring_str(lib),&st) < 0) {
-+ msg_fatal("%s: unsupported dictionary type: %s (%s not found. Is the postfix-%s package installed?)",
-+ myname, dict_type, vstring_str(lib), dict_type);
-+ }
-+ func=vstring_alloc(1);
-+ vstring_sprintf(func,dl->openfunc,dict_type);
-+ fn[0].name = vstring_str(func);
-+ fn[0].ptr = (void**)&open;
-+ fn[1].name = NULL;
-+ load_library_symbols(vstring_str(lib), fn, NULL);
-+ dict_open_register(dict_type, open);
-+ dp = (DICT_OPEN_INFO *) htable_find(dict_open_hash, dict_type);
-+ vstring_free(lib);
-+ vstring_free(func);
-+#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)
-@@ -317,6 +360,76 @@
- return mapnames;
- }
-
-+#ifndef NO_DYNAMIC_MAPS
-+static DLINFO *dict_dlinfo;
-+
-+void dict_open_dlinfo(const char *path)
-+{
-+ char *myname="dict_open_dlinfo";
-+ VSTREAM *conf_fp=vstream_fopen(path,O_RDONLY,0);
-+ VSTRING *buf = vstring_alloc(100);
-+ char *cp;
-+ ARGV *argv;
-+ MVECT vector;
-+ int nelm=0;
-+ int linenum=0;
-+
-+ dict_dlinfo=(DLINFO*)mvect_alloc(&vector,sizeof(DLINFO),3,NULL,NULL);
-+
-+ if (!conf_fp) {
-+ msg_warn("%s: cannot open %s. No dynamic maps will be allowed.",
-+ myname, path);
-+ } else {
-+ while (vstring_get_nonl(buf,conf_fp) != VSTREAM_EOF) {
-+ cp = vstring_str(buf);
-+ linenum++;
-+ if (*cp == '#' || *cp == '\0')
-+ continue;
-+ argv = argv_split(cp, " \t");
-+ if (argv->argc != 3) {
-+ msg_fatal("%s: Expected \"pattern .so-name function\" at line %d",
-+ myname, linenum);
-+ }
-+ if (argv->argv[1][0] != '/') {
-+ msg_fatal("%s: .so name must begin with a \"/\" at line %d",
-+ myname, linenum);
-+ }
-+ if (nelm >= vector.nelm) {
-+ dict_dlinfo=(DLINFO*)mvect_realloc(&vector,vector.nelm+3);
-+ }
-+ dict_dlinfo[nelm].pattern = mystrdup(argv->argv[0]);
-+ dict_dlinfo[nelm].soname = mystrdup(argv->argv[1]);
-+ dict_dlinfo[nelm].openfunc = mystrdup(argv->argv[2]);
-+ nelm++;
-+ argv_free(argv);
-+ }
-+ }
-+ if (nelm >= vector.nelm) {
-+ dict_dlinfo=(DLINFO*)mvect_realloc(&vector,vector.nelm+1);
-+ }
-+ dict_dlinfo[nelm].pattern = NULL;
-+ dict_dlinfo[nelm].soname = NULL;
-+ dict_dlinfo[nelm].openfunc = NULL;
-+ if (conf_fp)
-+ vstream_fclose(conf_fp);
-+ vstring_free(buf);
-+}
-+
-+DLINFO *dict_open_dlfind(const char *type)
-+{
-+ DLINFO *dp;
-+
-+ if (!dict_dlinfo)
-+ return NULL;
-+
-+ for (dp=dict_dlinfo; dp->pattern; dp++) {
-+ if (strcmp(dp->pattern,type)==0 || strcmp(dp->pattern,"*")==0)
-+ return dp;
-+ }
-+ return NULL;
-+}
-+#endif /* !NO_DYNAMIC_MAPS */
-+
- #ifdef TEST
-
- /*
diff -durN postfix-2.1.3.orig/src/util/load_lib.c postfix-2.1.3/src/util/load_lib.c
--- postfix-2.1.3.orig/src/util/load_lib.c 1970-01-01 01:00:00.000000000 +0100
+++ postfix-2.1.3/src/util/load_lib.c 2004-06-22 15:39:24.257859501 +0200
+/*--*/
+
+#endif
-diff -dur postfix-2.1.3.orig/src/global/mail_dict.c postfix-2.1.3/src/global/mail_dict.c
---- postfix-2.1.3.orig/src/global/mail_dict.c 2004-01-04 19:53:27.000000000 +0100
-+++ postfix-2.1.3/src/global/mail_dict.c 2004-06-22 15:47:45.259202712 +0200
-@@ -45,15 +45,6 @@
-
- static DICT_OPEN_INFO dict_open_info[] = {
- DICT_TYPE_PROXY, dict_proxy_open,
--#ifdef HAS_LDAP
-- DICT_TYPE_LDAP, dict_ldap_open,
--#endif
--#ifdef HAS_MYSQL
-- DICT_TYPE_MYSQL, dict_mysql_open,
--#endif
--#ifdef HAS_PGSQL
-- DICT_TYPE_PGSQL, dict_pgsql_open,
--#endif
- 0,
- };
-
-
--- postfix-2.0.16.orig/conf/dynamicmaps.cf 1970-01-01 01:00:00.000000000 +0100
+++ postfix-2.0.16/conf/dynamicmaps.cf 2003-11-08 19:52:14.000000000 +0100
@@ -0,0 +1,9 @@
/* mail_params_init - configure built-in parameters */
void mail_params_init()
-@@ -584,6 +619,9 @@
- * Variables that are needed by almost every program.
- */
- get_mail_conf_str_table(other_str_defaults);
-+ if (*var_myorigin=='/') {
-+ var_myorigin=read_file(var_myorigin);
-+ }
- get_mail_conf_int_table(other_int_defaults);
- get_mail_conf_bool_table(bool_defaults);
- get_mail_conf_time_table(time_defaults);
---- postfix-2.3.0/src/global/Makefile.in 2006-07-17 03:28:25.732653648 +0200
-+++ postfix-2.3.0/src/global/Makefile.in-new 2006-07-17 03:29:31.805609032 +0200
-@@ -32,7 +32,7 @@
+diff -durN postfix-2.1.3.orig/src/util/sys_defs.h postfix-2.1.3/src/util/sys_defs.h
+--- postfix-2.1.3.orig/src/util/sys_defs.h 2004-06-22 15:38:57.190461088 +0200
++++ postfix-2.1.3/src/util/sys_defs.h 2004-06-22 15:39:24.255859620 +0200
+@@ -700,6 +700,7 @@
+ #define STATFS_IN_SYS_VFS_H
+ #define PREPEND_PLUS_TO_OPTSTRING
+ #define HAS_POSIX_REGEXP
++#define HAS_DLOPEN
+ #define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
+ #define NATIVE_MAILQ_PATH "/usr/bin/mailq"
+ #define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
+@@ -754,6 +755,7 @@
+ #define STATFS_IN_SYS_VFS_H
+ #define PREPEND_PLUS_TO_OPTSTRING
+ #define HAS_POSIX_REGEXP
++#define HAS_DLOPEN
+ #define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
+ #define NATIVE_MAILQ_PATH "/usr/bin/mailq"
+ #define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
+@@ -638,6 +640,7 @@
+ #define USE_STATFS
+ #define STATFS_IN_SYS_VFS_H
+ #define HAS_POSIX_REGEXP
++#define HAS_SHL_LOAD
+ #define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
+ #define NATIVE_MAILQ_PATH "/usr/bin/mailq"
+ #define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
+@@ -673,6 +676,7 @@
+ #define USE_STATFS
+ #define STATFS_IN_SYS_VFS_H
+ #define HAS_POSIX_REGEXP
++#define HAS_SHL_LOAD
+ #define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
+ #define NATIVE_MAILQ_PATH "/usr/bin/mailq"
+ #define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
+--- postfix-2.8.3/src/global/Makefile.in~ 2011-05-17 14:11:58.243333401 +0200
++++ postfix-2.8.3/src/global/Makefile.in 2011-05-17 14:27:36.783333538 +0200
+@@ -35,7 +35,7 @@
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 \
- deliver_request.o dict_ldap.o dict_mysql.o dict_pgsql.o \
+ deliver_request.o \
- dict_proxy.o domain_list.o dot_lockfile.o dot_lockfile_as.o \
+ dict_proxy.o dict_sqlite.o domain_list.o dot_lockfile.o dot_lockfile_as.o \
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 \
---- postfix-2.3.12/src/util/Makefile.in.orig 2007-07-31 01:18:35.000000000 +0200
-+++ postfix-2.3.12/src/util/Makefile.in 2007-08-26 17:34:55.300706718 +0200
-@@ -30,14 +30,14 @@
+@@ -106,8 +106,12 @@
+ LIB_DIR = ../../lib
+ INC_DIR = ../../include
+ MAKES =
++LDAPSO = dict_ldap.so
++MYSQLSO = dict_mysql.so
++PGSQLSO = dict_pgsql.so
++SQLITESO= dict_sqlite.so
+
+-.c.o:; $(CC) $(CFLAGS) -c $*.c
++.c.o:; $(CC) -fPIC $(CFLAGS) -c $*.c
+
+ all: $(LIB)
+
+@@ -119,14 +123,36 @@
+ test: $(TESTPROG)
+
+ $(LIB): $(OBJS)
+- $(AR) $(ARFL) $(LIB) $?
+- $(RANLIB) $(LIB)
++ gcc -shared -Wl,-soname,libpostfix-global.so.1 -o $(LIB) $(OBJS)
++
++$(LDAPSO): dict_ldap.o $(LIB)
++ gcc -shared -Wl,-soname,dict_ldap.so -o $@ $? -lldap -llber -L../../lib -lutil -L. -lglobal
++
++$(MYSQLSO): dict_mysql.o $(LIB)
++ gcc -shared -Wl,-soname,dict_mysql.so -o $@ $? -lmysqlclient -L../../lib -lutil -L. -lglobal
++
++$(PGSQLSO): dict_pgsql.o $(LIB)
++ gcc -shared -Wl,-soname,dict_pgsql.so -o $@ $? -lpq -L../../lib -lutil -L. -lglobal
++
++$(SQLITESO): dict_sqlite.o $(LIB)
++ gcc -shared -Wl,-soname,dict_sqlite.so -o $@ $? -lsqlite3 -L../../lib -lutil -L. -lglobal
+
+ $(LIB_DIR)/$(LIB): $(LIB)
+ cp $(LIB) $(LIB_DIR)
+- $(RANLIB) $(LIB_DIR)/$(LIB)
+
+-update: $(LIB_DIR)/$(LIB) $(HDRS)
++$(LIB_DIR)/$(LDAPSO): $(LDAPSO)
++ cp $(LDAPSO) $(LIB_DIR)
++
++$(LIB_DIR)/$(MYSQLSO): $(MYSQLSO)
++ cp $(MYSQLSO) $(LIB_DIR)
++
++$(LIB_DIR)/$(PGSQLSO): $(PGSQLSO)
++ cp $(PGSQLSO) $(LIB_DIR)
++
++$(LIB_DIR)/$(SQLITESO): $(SQLITESO)
++ cp $(SQLITESO) $(LIB_DIR)
++
++update: $(LIB_DIR)/$(LIB) $(LIB_DIR)/${LDAPSO} $(LIB_DIR)/${MYSQLSO} $(LIB_DIR)/${PGSQLSO} $(LIB_DIR)/${SQLITESO} $(HDRS)
+ -for i in $(HDRS); \
+ do \
+ cmp -s $$i $(INC_DIR)/$$i 2>/dev/null || cp $$i $(INC_DIR); \
+@@ -497,7 +523,7 @@
+ lint $(DEFS) $(SRCS) $(LINTFIX)
+
+ clean:
+- rm -f *.o $(LIB) *core $(TESTPROG) junk
++ rm -f *.o $(LIB) $(LDAPSO) $(MYSQLSO) $(PGSQLSO) $(SQLITESO) *core $(TESTPROG) junk
+ rm -rf printfck
+
+ tidy: clean
+--- postfix-2.9.0/src/util/dict_open.c.orig 2012-02-04 19:16:54.231837262 +0100
++++ postfix-2.9.0/src/util/dict_open.c 2012-02-04 19:27:54.884124599 +0100
+@@ -213,6 +213,9 @@
+ #include <strings.h>
+ #endif
+
++#include <sys/stat.h>
++#include <unistd.h>
++
+ /* Utility library. */
+
+ #include <argv.h>
+@@ -241,6 +244,14 @@
+ #include <htable.h>
+ #include <myflock.h>
+
++#ifndef NO_DYNAMIC_MAPS
++#include <load_lib.h>
++#include <vstring.h>
++#include <vstream.h>
++#include <vstring_vstream.h>
++#include <mvect.h>
++#endif
++
+ /*
+ * lookup table for available map types.
+ */
+@@ -276,9 +287,11 @@
+ #ifdef HAS_NETINFO
+ DICT_TYPE_NETINFO, dict_ni_open,
+ #endif
++#ifndef MAX_DYNAMIC_MAPS
+ #ifdef HAS_PCRE
+ DICT_TYPE_PCRE, dict_pcre_open,
+ #endif
++#endif /* MAX_DYNAMIC_MAPS */
+ #ifdef HAS_POSIX_REGEXP
+ DICT_TYPE_REGEXP, dict_regexp_open,
+ #endif
+@@ -338,9 +351,38 @@
+ 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)
+- return (dict_surrogate(dict_type, dict_name, open_flags, dict_flags,
+- "unsupported dictionary type: %s", dict_type));
++ if ((dp = (DICT_OPEN_INFO *) htable_find(dict_open_hash, dict_type)) == 0) {
++#ifndef NO_DYNAMIC_MAPS
++ struct stat st;
++ VSTRING *lib, *func;
++ LIB_FN fn[2];
++ DICT *(*open) (const char *, int, int);
++ DLINFO *dl=dict_open_dlfind(dict_type);
++ if (!dl)
++#endif
++ msg_fatal("%s: unsupported dictionary type: %s", myname, dict_type);
++#ifndef NO_DYNAMIC_MAPS
++ lib=vstring_alloc(1);
++ vstring_sprintf(lib,dl->soname,dict_type);
++ if (stat(vstring_str(lib),&st) < 0) {
++ msg_fatal("%s: unsupported dictionary type: %s (%s not found. Is the postfix-%s package installed?)",
++ myname, dict_type, vstring_str(lib), dict_type);
++ }
++ func=vstring_alloc(1);
++ vstring_sprintf(func,dl->openfunc,dict_type);
++ fn[0].name = vstring_str(func);
++ fn[0].ptr = (void**)&open;
++ fn[1].name = NULL;
++ load_library_symbols(vstring_str(lib), fn, NULL);
++ dict_open_register(dict_type, open);
++ dp = (DICT_OPEN_INFO *) htable_find(dict_open_hash, dict_type);
++ vstring_free(lib);
++ vstring_free(func);
++#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)
+ return (dict_surrogate(dict_type, dict_name, open_flags, dict_flags,
+ "cannot open %s:%s: %m", dict_type, dict_name));
+@@ -407,6 +449,76 @@
+ return mapnames;
+ }
+
++#ifndef NO_DYNAMIC_MAPS
++static DLINFO *dict_dlinfo;
++
++void dict_open_dlinfo(const char *path)
++{
++ char *myname="dict_open_dlinfo";
++ VSTREAM *conf_fp=vstream_fopen(path,O_RDONLY,0);
++ VSTRING *buf = vstring_alloc(100);
++ char *cp;
++ ARGV *argv;
++ MVECT vector;
++ int nelm=0;
++ int linenum=0;
++
++ dict_dlinfo=(DLINFO*)mvect_alloc(&vector,sizeof(DLINFO),3,NULL,NULL);
++
++ if (!conf_fp) {
++ msg_warn("%s: cannot open %s. No dynamic maps will be allowed.",
++ myname, path);
++ } else {
++ while (vstring_get_nonl(buf,conf_fp) != VSTREAM_EOF) {
++ cp = vstring_str(buf);
++ linenum++;
++ if (*cp == '#' || *cp == '\0')
++ continue;
++ argv = argv_split(cp, " \t");
++ if (argv->argc != 3) {
++ msg_fatal("%s: Expected \"pattern .so-name function\" at line %d",
++ myname, linenum);
++ }
++ if (argv->argv[1][0] != '/') {
++ msg_fatal("%s: .so name must begin with a \"/\" at line %d",
++ myname, linenum);
++ }
++ if (nelm >= vector.nelm) {
++ dict_dlinfo=(DLINFO*)mvect_realloc(&vector,vector.nelm+3);
++ }
++ dict_dlinfo[nelm].pattern = mystrdup(argv->argv[0]);
++ dict_dlinfo[nelm].soname = mystrdup(argv->argv[1]);
++ dict_dlinfo[nelm].openfunc = mystrdup(argv->argv[2]);
++ nelm++;
++ argv_free(argv);
++ }
++ }
++ if (nelm >= vector.nelm) {
++ dict_dlinfo=(DLINFO*)mvect_realloc(&vector,vector.nelm+1);
++ }
++ dict_dlinfo[nelm].pattern = NULL;
++ dict_dlinfo[nelm].soname = NULL;
++ dict_dlinfo[nelm].openfunc = NULL;
++ if (conf_fp)
++ vstream_fclose(conf_fp);
++ vstring_free(buf);
++}
++
++DLINFO *dict_open_dlfind(const char *type)
++{
++ DLINFO *dp;
++
++ if (!dict_dlinfo)
++ return NULL;
++
++ for (dp=dict_dlinfo; dp->pattern; dp++) {
++ if (strcmp(dp->pattern,type)==0 || strcmp(dp->pattern,"*")==0)
++ return dp;
++ }
++ return NULL;
++}
++#endif /* !NO_DYNAMIC_MAPS */
++
+ #ifdef TEST
+
+ /*
+--- postfix-2.9.0/src/util/Makefile.in.orig 2012-02-04 19:16:54.187276228 +0100
++++ postfix-2.9.0/src/util/Makefile.in 2012-02-04 19:30:39.503837753 +0100
+@@ -30,7 +30,7 @@
username.c valid_hostname.c vbuf.c vbuf_print.c vstream.c \
vstream_popen.c vstring.c vstring_vstream.c watchdog.c writable.c \
write_buf.c write_wait.c sane_basename.c format_tv.c allspace.c \
-- allascii.c load_file.c killme_after.c vstream_tweak.c
-+ allascii.c load_file.c killme_after.c vstream_tweak.c load_lib.c
- OBJS = alldig.o allprint.o argv.o argv_split.o attr_clnt.o attr_print0.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 \
+- allascii.c load_file.c killme_after.c vstream_tweak.c \
++ allascii.c load_file.c killme_after.c vstream_tweak.c load_lib.c \
+ 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 base32_code.c dict_test.c \
+@@ -41,7 +41,7 @@
chroot_uid.o cidr_match.o clean_env.o close_on_exec.o concatenate.o \
ctable.o dict.o dict_alloc.o dict_cdb.o dict_cidr.o dict_db.o \
dict_dbm.o dict_debug.o dict_env.o dict_ht.o dict_ni.o dict_nis.o \
dict_static.o dict_tcp.o dict_unix.o dir_forest.o doze.o dummy_read.o \
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 \
-@@ -62,7 +62,7 @@
+@@ -66,7 +66,7 @@
username.o valid_hostname.o vbuf.o vbuf_print.o vstream.o \
vstream_popen.o vstring.o vstring_vstream.o watchdog.o writable.o \
write_buf.o write_wait.o sane_basename.o format_tv.o allspace.o \
-- allascii.o load_file.o killme_after.o vstream_tweak.o
-+ allascii.o load_file.o killme_after.o vstream_tweak.o load_lib.o
- HDRS = argv.h attr.h attr_clnt.h auto_clnt.h base64_code.h binhash.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 \
-@@ -81,13 +81,14 @@
+- allascii.o load_file.o killme_after.o vstream_tweak.o \
++ allascii.o load_file.o killme_after.o vstream_tweak.o load_lib.o \
+ pass_trigger.o edit_file.o inet_windowsize.o \
+ unix_pass_fd_fix.o dict_cache.o valid_utf_8.o dict_thash.o \
+ ip_match.o nbbio.o base32_code.o dict_test.o \
+@@ -89,7 +89,7 @@
sigdelay.h sock_addr.h spawn_command.h split_at.h stat_as.h \
stringops.h sys_defs.h timed_connect.h timed_wait.h trigger.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
-+ vstring_vstream.h watchdog.h format_tv.h load_file.h killme_after.h load_lib.h
+- vstring_vstream.h watchdog.h format_tv.h load_file.h killme_after.h \
++ vstring_vstream.h watchdog.h format_tv.h load_file.h killme_after.h load_lib.h \
+ edit_file.h dict_cache.h dict_thash.h ip_match.h nbbio.h base32_code.h \
+ dict_fail.h warn_stat.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)
+@@ -98,6 +98,7 @@
CFLAGS = $(DEBUG) $(OPT) $(DEFS)
FILES = Makefile $(SRCS) $(HDRS)
INCL =
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 \
-@@ -102,8 +103,9 @@
+@@ -113,8 +114,9 @@
LIB_DIR = ../../lib
INC_DIR = ../../include
+LIBS = $(LIB_DIR)/$(LIB) $(LIB_DIR)/$(PCRESO)
-.c.o:; $(CC) $(CFLAGS) -c $*.c
-+.c.o:; $(CC) -fPIC $(CFLAGS) -c $*.c
++.c.o:; $(CC) -fPIC $(CFLAGS) -c $*.c
all: $(LIB)
-@@ -114,15 +116,19 @@
+@@ -125,15 +127,19 @@
test: $(TESTPROG)
-for i in $(HDRS); \
do \
cmp -s $$i $(INC_DIR)/$$i 2>/dev/null || cp $$i $(INC_DIR); \
-@@ -144,7 +150,8 @@
- lint $(SRCS)
+@@ -155,7 +161,8 @@
+ lint $(DEFS) $(SRCS) $(LINTFIX)
clean:
- rm -f *.o $(LIB) *core $(TESTPROG) junk $(MAKES) *.tmp
rm -rf printfck
tidy: clean
-diff -durN postfix-2.1.3.orig/src/util/sys_defs.h postfix-2.1.3/src/util/sys_defs.h
---- postfix-2.1.3.orig/src/util/sys_defs.h 2004-06-22 15:38:57.190461088 +0200
-+++ postfix-2.1.3/src/util/sys_defs.h 2004-06-22 15:39:24.255859620 +0200
-@@ -700,6 +700,7 @@
- #define STATFS_IN_SYS_VFS_H
- #define PREPEND_PLUS_TO_OPTSTRING
- #define HAS_POSIX_REGEXP
-+#define HAS_DLOPEN
- #define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
- #define NATIVE_MAILQ_PATH "/usr/bin/mailq"
- #define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
-@@ -754,6 +755,7 @@
- #define STATFS_IN_SYS_VFS_H
- #define PREPEND_PLUS_TO_OPTSTRING
- #define HAS_POSIX_REGEXP
-+#define HAS_DLOPEN
- #define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
- #define NATIVE_MAILQ_PATH "/usr/bin/mailq"
- #define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
-@@ -638,6 +640,7 @@
- #define USE_STATFS
- #define STATFS_IN_SYS_VFS_H
- #define HAS_POSIX_REGEXP
-+#define HAS_SHL_LOAD
- #define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
- #define NATIVE_MAILQ_PATH "/usr/bin/mailq"
- #define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
-@@ -673,6 +676,7 @@
- #define USE_STATFS
- #define STATFS_IN_SYS_VFS_H
- #define HAS_POSIX_REGEXP
-+#define HAS_SHL_LOAD
- #define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
- #define NATIVE_MAILQ_PATH "/usr/bin/mailq"
- #define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
+--- postfix-2.9.0/src/global/mail_dict.c.orig 2012-02-04 19:16:53.000000000 +0100
++++ postfix-2.9.0/src/global/mail_dict.c 2012-02-04 19:33:20.047179113 +0100
+@@ -47,18 +47,6 @@
+
+ static const DICT_OPEN_INFO dict_open_info[] = {
+ DICT_TYPE_PROXY, dict_proxy_open,
+-#ifdef HAS_LDAP
+- DICT_TYPE_LDAP, dict_ldap_open,
+-#endif
+-#ifdef HAS_MYSQL
+- DICT_TYPE_MYSQL, dict_mysql_open,
+-#endif
+-#ifdef HAS_PGSQL
+- DICT_TYPE_PGSQL, dict_pgsql_open,
+-#endif
+-#ifdef HAS_SQLITE
+- DICT_TYPE_SQLITE, dict_sqlite_open,
+-#endif
+ DICT_TYPE_MEMCACHE, dict_memcache_open,
+ 0,
+ };