summaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog18
-rw-r--r--debian/control11
-rw-r--r--debian/patches/05_debian_defaults.diff2
-rw-r--r--debian/patches/05_debian_manpage_differences.diff10
-rw-r--r--debian/patches/05_debian_readme_differences.diff27
-rw-r--r--debian/patches/06_debian_paths.diff8
-rw-r--r--debian/patches/07_sasl_config.diff38
-rw-r--r--debian/patches/10_openssl_version_check.diff2
-rw-r--r--debian/patches/70_postfix-check.diff2
-rw-r--r--debian/patches/Disable-LD_LIBRARY_PATH-check.patch10
-rw-r--r--debian/patches/Sort-list-of-AUXLIBS-for-reproducible-builds.patch31
-rw-r--r--debian/patches/series1
-rw-r--r--debian/postfix-mongodb.README.debian2
-rw-r--r--debian/postfix-mongodb.dirs1
-rw-r--r--debian/postfix-mongodb.postinst56
-rw-r--r--debian/postfix-mongodb.prerm40
-rw-r--r--debian/postfix.postinst2
-rwxr-xr-xdebian/rules6
-rw-r--r--debian/tests/test-postfix.py6
19 files changed, 188 insertions, 85 deletions
diff --git a/debian/changelog b/debian/changelog
index 5233852..c74e488 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,21 @@
+postfix (3.9.0-1~exp1) experimental; urgency=medium
+
+ [Scott Kitterman]
+
+ * Refresh patches
+ * Delete d/p/Sort-list-of-AUXLIBS-for-reproducible-builds.patch,
+ incorporated upstream
+ * Update test-postfix.py for implementation of HELP in postfix 3.9
+ * Add support for mongodb
+ - New postfix-mongodb binary
+ - Add libmongoc-dev to build-depends
+
+ [Wietse Venema]
+
+ * 3.9.0
+
+ -- Scott Kitterman <scott@kitterman.com> Sun, 10 Mar 2024 04:47:22 -0400
+
postfix (3.8.6-1~progress7.99u1) graograman-backports; urgency=medium
* Uploading to graograman-backports, remaining changes:
diff --git a/debian/control b/debian/control
index 450f54e..3c3ddfd 100644
--- a/debian/control
+++ b/debian/control
@@ -19,6 +19,7 @@ Build-Depends: debhelper-compat (= 13),
libicu-dev,
libldap-dev,
liblmdb-dev,
+ libmongoc-dev,
libnsl-dev | libc6-dev (<<2.37-15.1),
libpcre2-dev,
libpq-dev,
@@ -56,6 +57,7 @@ Suggests: libsasl2-modules | dovecot-common,
postfix-ldap,
postfix-lmdb,
postfix-mta-sts-resolver,
+ postfix-mongodb,
postfix-mysql,
postfix-pcre,
postfix-pgsql,
@@ -108,6 +110,15 @@ Description: PCRE map support for Postfix
This provides support for PCRE (perl compatible regular expression) maps in
Postfix. If you plan to use PCRE maps with Postfix, you need this.
+Package: postfix-mongodb
+Architecture: any
+Depends: postfix (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: MongoDB map support for Postfix
+ ${Description}
+ .
+ This provides support for MongoDB maps in Postfix. If you plan to use MongDB
+ maps with Postfix, you need this.
+
Package: postfix-mysql
Architecture: any
Depends: postfix (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
diff --git a/debian/patches/05_debian_defaults.diff b/debian/patches/05_debian_defaults.diff
index d44c98c..3dd3121 100644
--- a/debian/patches/05_debian_defaults.diff
+++ b/debian/patches/05_debian_defaults.diff
@@ -72,7 +72,7 @@ Index: postfix/conf/postfix-files
===================================================================
--- postfix.orig/conf/postfix-files
+++ postfix/conf/postfix-files
-@@ -143,27 +143,28 @@ $newaliases_path:l:$sendmail_path
+@@ -144,27 +144,28 @@ $newaliases_path:l:$sendmail_path
$mailq_path:l:$sendmail_path
$config_directory/LICENSE:f:root:-:644:1
$config_directory/TLS_LICENSE:f:root:-:644:1
diff --git a/debian/patches/05_debian_manpage_differences.diff b/debian/patches/05_debian_manpage_differences.diff
index da7c086..a2494b8 100644
--- a/debian/patches/05_debian_manpage_differences.diff
+++ b/debian/patches/05_debian_manpage_differences.diff
@@ -1,11 +1,11 @@
From: Scott Kitterman <scott@kitterman.com>
Subject: Update postfix-files for Debian man page naming specifics
Forwarded: not-needed
-Index: postfix-dev/conf/postfix-files
+Index: postfix/conf/postfix-files
===================================================================
---- postfix-dev.orig/conf/postfix-files 2019-03-01 11:07:21.045697994 -0500
-+++ postfix-dev/conf/postfix-files 2019-03-01 11:17:55.721711534 -0500
-@@ -166,79 +166,81 @@
+--- postfix.orig/conf/postfix-files
++++ postfix/conf/postfix-files
+@@ -167,80 +167,82 @@ $config_directory/postfix-script:f:root:
#$config_directory/postfix-script-sgid:f:root:-:755:o
#$config_directory/postfix-script-nosgid:f:root:-:755:o
$config_directory/post-install:f:root:-:755:o
@@ -38,6 +38,7 @@ Index: postfix-dev/conf/postfix-files
-$manpage_directory/man5/lmdb_table.5:f:root:-:644
-$manpage_directory/man5/master.5:f:root:-:644
-$manpage_directory/man5/memcache_table.5:f:root:-:644
+-$manpage_directory/man5/mongodb_table.5:f:root:-:644
-$manpage_directory/man5/mysql_table.5:f:root:-:644
-$manpage_directory/man5/socketmap_table.5:f:root:-:644
-$manpage_directory/man5/sqlite_table.5:f:root:-:644
@@ -111,6 +112,7 @@ Index: postfix-dev/conf/postfix-files
+$manpage_directory/man5/lmdb_table.5.gz:f:root:-:644
+$manpage_directory/man5/master.5.gz:f:root:-:644
+$manpage_directory/man5/memcache_table.5.gz:f:root:-:644
++$manpage_directory/man5/mongodb_table.5.gz:f:root:-:644
+$manpage_directory/man5/mysql_table.5.gz:f:root:-:644
+$manpage_directory/man5/socketmap_table.5.gz:f:root:-:644
+$manpage_directory/man5/sqlite_table.5.gz:f:root:-:644
diff --git a/debian/patches/05_debian_readme_differences.diff b/debian/patches/05_debian_readme_differences.diff
index 74f8789..3a0ac63 100644
--- a/debian/patches/05_debian_readme_differences.diff
+++ b/debian/patches/05_debian_readme_differences.diff
@@ -5,7 +5,7 @@ Index: postfix/conf/postfix-files
===================================================================
--- postfix.orig/conf/postfix-files
+++ postfix/conf/postfix-files
-@@ -273,69 +273,68 @@ $sample_directory/sample-tls.cf:f:root:-
+@@ -275,71 +275,71 @@ $sample_directory/sample-tls.cf:f:root:-
$sample_directory/sample-transport.cf:f:root:-:644:o
$sample_directory/sample-verify.cf:f:root:-:644:o
$sample_directory/sample-virtual.cf:f:root:-:644:o
@@ -23,6 +23,7 @@ Index: postfix/conf/postfix-files
+$readme_directory/ADDRESS_VERIFICATION_README.gz:f:root:-:644
+$readme_directory/BACKSCATTER_README.gz:f:root:-:644
+$readme_directory/BASIC_CONFIGURATION_README.gz:f:root:-:644
++$readme_directory/BDAT_README.gz:f:root:-:644
+$readme_directory/BUILTIN_FILTER_README.gz:f:root:-:644
$readme_directory/CDB_README:f:root:-:644
-$readme_directory/COMPATIBILITY_README:f:root:-:644
@@ -30,26 +31,26 @@ Index: postfix/conf/postfix-files
+$readme_directory/COMPATIBILITY_README.gz:f:root:-:644
+$readme_directory/CONNECTION_CACHE_README.gz:f:root:-:644
$readme_directory/CONTENT_INSPECTION_README:f:root:-:644
--$readme_directory/DATABASE_README:f:root:-:644
+ $readme_directory/DATABASE_README:f:root:-:644
-$readme_directory/DB_README:f:root:-:644
-$readme_directory/DEBUG_README:f:root:-:644
+-$readme_directory/DEPRECATION_README:f:root:-:644
-$readme_directory/DSN_README:f:root:-:644
-$readme_directory/ETRN_README:f:root:-:644
-$readme_directory/FILTER_README:f:root:-:644
-$readme_directory/FORWARD_SECRECY_README:f:root:-:644
-$readme_directory/HOSTING_README:f:root:-:644:o
--$readme_directory/INSTALL:f:root:-:644
--$readme_directory/IPV6_README:f:root:-:644
--$readme_directory/LDAP_README:f:root:-:644
-+$readme_directory/DATABASE_README.gz:f:root:-:644
+$readme_directory/DB_README.gz:f:root:-:644
+$readme_directory/DEBUG_README.gz:f:root:-:644
++$readme_directory/DEPRECATION_README.gz:f:root:-:644
+$readme_directory/DSN_README.gz:f:root:-:644
+$readme_directory/ETRN_README.gz:f:root:-:644
+$readme_directory/FILTER_README.gz:f:root:-:644
+$readme_directory/FORWARD_SECRECY_README.gz:f:root:-:644
-+#$readme_directory/HOSTING_README:f:root:-:644:o
-+#$readme_directory/INSTALL:f:root:-:644
++$readme_directory/HOSTING_README.gz:f:root:-:644:o
+ $readme_directory/INSTALL:f:root:-:644
+-$readme_directory/IPV6_README:f:root:-:644
+-$readme_directory/LDAP_README:f:root:-:644
+$readme_directory/IPV6_README.gz:f:root:-:644
+$readme_directory/LDAP_README.gz:f:root:-:644
$readme_directory/LINUX_README:f:root:-:644
@@ -58,14 +59,16 @@ Index: postfix/conf/postfix-files
+$readme_directory/LMDB_README.gz:f:root:-:644
+$readme_directory/LOCAL_RECIPIENT_README.gz:f:root:-:644
$readme_directory/MACOSX_README:f:root:-:644:o
--$readme_directory/MAILDROP_README:f:root:-:644
-+$readme_directory/MAILDROP_README.gz:f:root:-:644
- $readme_directory/MAILLOG_README:f:root:-:644
+ $readme_directory/MAILDROP_README:f:root:-:644
+-$readme_directory/MAILLOG_README:f:root:-:644
++$readme_directory/MAILLOG_README.gz:f:root:-:644
$readme_directory/MEMCACHE_README:f:root:-:644
-$readme_directory/MILTER_README:f:root:-:644
+-$readme_directory/MONGODB_README:f:root:-:644
-$readme_directory/MULTI_INSTANCE_README:f:root:-:644
-$readme_directory/MYSQL_README:f:root:-:644
+$readme_directory/MILTER_README.gz:f:root:-:644
++$readme_directory/MONGODB_README.gz:f:root:-:644
+$readme_directory/MULTI_INSTANCE_README.gz:f:root:-:644
+$readme_directory/MYSQL_README.gz:f:root:-:644
$readme_directory/SMTPUTF8_README:f:root:-:644
@@ -75,7 +78,7 @@ Index: postfix/conf/postfix-files
-$readme_directory/PACKAGE_README:f:root:-:644
+$readme_directory/NFS_README.gz:f:root:-:644
+$readme_directory/OVERVIEW.gz:f:root:-:644
-+$readme_directory/PACKAGE_README.gz:f:root:-:64
++$readme_directory/PACKAGE_README.gz:f:root:-:644
$readme_directory/PCRE_README:f:root:-:644
-$readme_directory/PGSQL_README:f:root:-:644
+$readme_directory/PGSQL_README.gz:f:root:-:644
diff --git a/debian/patches/06_debian_paths.diff b/debian/patches/06_debian_paths.diff
index 4a9a6ee..a441f75 100644
--- a/debian/patches/06_debian_paths.diff
+++ b/debian/patches/06_debian_paths.diff
@@ -5,7 +5,7 @@ Index: postfix/conf/main.cf
===================================================================
--- postfix.orig/conf/main.cf
+++ postfix/conf/main.cf
-@@ -51,7 +51,7 @@ compatibility_level = 3.8
+@@ -51,7 +51,7 @@ compatibility_level = 3.9
# See the files in examples/chroot-setup for setting up Postfix chroot
# environments on different UNIX systems.
#
@@ -51,7 +51,7 @@ Index: postfix/makedefs
===================================================================
--- postfix.orig/makedefs
+++ postfix/makedefs
-@@ -570,11 +570,18 @@ case "$SYSTEM.$RELEASE" in
+@@ -574,11 +574,18 @@ case "$SYSTEM.$RELEASE" in
exit 1
fi
SYSLIBS="-ldb"
@@ -71,7 +71,7 @@ Index: postfix/makedefs
do
test -e $lib/lib$name.a -o -e $lib/lib$name.so && {
SYSLIBS="$SYSLIBS -l$name"
-@@ -650,11 +657,18 @@ EOF
+@@ -654,11 +661,18 @@ EOF
exit 1
fi
SYSLIBS="-ldb"
@@ -91,7 +91,7 @@ Index: postfix/makedefs
do
test -e $lib/lib$name.a -o -e $lib/lib$name.so && {
SYSLIBS="$SYSLIBS -l$name"
-@@ -688,11 +702,18 @@ EOF
+@@ -692,11 +706,18 @@ EOF
exit 1
fi
SYSLIBS="-ldb"
diff --git a/debian/patches/07_sasl_config.diff b/debian/patches/07_sasl_config.diff
index e1ab0fc..29c6658 100644
--- a/debian/patches/07_sasl_config.diff
+++ b/debian/patches/07_sasl_config.diff
@@ -9,11 +9,11 @@ Forwarded: not-needed
src/xsasl/xsasl_cyrus_server.c | 3 +++
4 files changed, 25 insertions(+)
-diff --git a/src/xsasl/xsasl_cyrus_client.c b/src/xsasl/xsasl_cyrus_client.c
-index fc799c9..e76f0db 100644
---- a/src/xsasl/xsasl_cyrus_client.c
-+++ b/src/xsasl/xsasl_cyrus_client.c
-@@ -229,6 +229,9 @@ XSASL_CLIENT_IMPL *xsasl_cyrus_client_init(const char *unused_client_type,
+Index: postfix/src/xsasl/xsasl_cyrus_client.c
+===================================================================
+--- postfix.orig/src/xsasl/xsasl_cyrus_client.c
++++ postfix/src/xsasl/xsasl_cyrus_client.c
+@@ -229,6 +229,9 @@ XSASL_CLIENT_IMPL *xsasl_cyrus_client_in
*/
static sasl_callback_t callbacks[] = {
{SASL_CB_LOG, (XSASL_CYRUS_CB) &xsasl_cyrus_log, 0},
@@ -23,10 +23,10 @@ index fc799c9..e76f0db 100644
{SASL_CB_LIST_END, 0, 0}
};
-diff --git a/src/xsasl/xsasl_cyrus_common.h b/src/xsasl/xsasl_cyrus_common.h
-index 5447378..1cd2251 100644
---- a/src/xsasl/xsasl_cyrus_common.h
-+++ b/src/xsasl/xsasl_cyrus_common.h
+Index: postfix/src/xsasl/xsasl_cyrus_common.h
+===================================================================
+--- postfix.orig/src/xsasl/xsasl_cyrus_common.h
++++ postfix/src/xsasl/xsasl_cyrus_common.h
@@ -16,12 +16,17 @@
*/
#if defined(USE_SASL_AUTH) && defined(USE_CYRUS_SASL)
@@ -45,10 +45,10 @@ index 5447378..1cd2251 100644
#endif
-diff --git a/src/xsasl/xsasl_cyrus_log.c b/src/xsasl/xsasl_cyrus_log.c
-index 7bf25c3..6d1e413 100644
---- a/src/xsasl/xsasl_cyrus_log.c
-+++ b/src/xsasl/xsasl_cyrus_log.c
+Index: postfix/src/xsasl/xsasl_cyrus_log.c
+===================================================================
+--- postfix.orig/src/xsasl/xsasl_cyrus_log.c
++++ postfix/src/xsasl/xsasl_cyrus_log.c
@@ -28,10 +28,16 @@
/* System library. */
@@ -66,7 +66,7 @@ index 7bf25c3..6d1e413 100644
/* Application-specific */
-@@ -101,4 +107,12 @@ int xsasl_cyrus_log(void *unused_context, int priority,
+@@ -101,4 +107,12 @@ int xsasl_cyrus_log(void *unused_con
return (SASL_OK);
}
@@ -79,11 +79,11 @@ index 7bf25c3..6d1e413 100644
+#endif
+
#endif
-diff --git a/src/xsasl/xsasl_cyrus_server.c b/src/xsasl/xsasl_cyrus_server.c
-index 89e1fc9..8f5edae 100644
---- a/src/xsasl/xsasl_cyrus_server.c
-+++ b/src/xsasl/xsasl_cyrus_server.c
-@@ -181,6 +181,9 @@ static const char *xsasl_cyrus_server_get_username(XSASL_SERVER *);
+Index: postfix/src/xsasl/xsasl_cyrus_server.c
+===================================================================
+--- postfix.orig/src/xsasl/xsasl_cyrus_server.c
++++ postfix/src/xsasl/xsasl_cyrus_server.c
+@@ -185,6 +185,9 @@ static const char *xsasl_cyrus_server_ge
static sasl_callback_t callbacks[] = {
{SASL_CB_LOG, (XSASL_CYRUS_CB) &xsasl_cyrus_log, NO_CALLBACK_CONTEXT},
diff --git a/debian/patches/10_openssl_version_check.diff b/debian/patches/10_openssl_version_check.diff
index 1c6271f..2be413f 100644
--- a/debian/patches/10_openssl_version_check.diff
+++ b/debian/patches/10_openssl_version_check.diff
@@ -5,7 +5,7 @@ Index: postfix/src/tls/tls_misc.c
===================================================================
--- postfix.orig/src/tls/tls_misc.c
+++ postfix/src/tls/tls_misc.c
-@@ -1386,26 +1386,7 @@ static void tls_version_split(unsigned l
+@@ -1431,26 +1431,7 @@ static void tls_version_split(unsigned l
void tls_check_version(void)
{
diff --git a/debian/patches/70_postfix-check.diff b/debian/patches/70_postfix-check.diff
index 34ab906..8a89467 100644
--- a/debian/patches/70_postfix-check.diff
+++ b/debian/patches/70_postfix-check.diff
@@ -5,7 +5,7 @@ Index: postfix/conf/postfix-script
===================================================================
--- postfix.orig/conf/postfix-script
+++ postfix/conf/postfix-script
-@@ -314,9 +314,17 @@ check-warn)
+@@ -327,9 +327,17 @@ check-warn)
find $todo ! -user root \
-exec $WARN not owned by root: {} \;
diff --git a/debian/patches/Disable-LD_LIBRARY_PATH-check.patch b/debian/patches/Disable-LD_LIBRARY_PATH-check.patch
index 5579bb4..726830d 100644
--- a/debian/patches/Disable-LD_LIBRARY_PATH-check.patch
+++ b/debian/patches/Disable-LD_LIBRARY_PATH-check.patch
@@ -9,11 +9,11 @@ Forwarded: not-needed
makedefs | 5 -----
1 file changed, 5 deletions(-)
-diff --git a/makedefs b/makedefs
-index 4feea3d..972b89f 100644
---- a/makedefs
-+++ b/makedefs
-@@ -194,11 +194,6 @@ error() {
+Index: postfix/makedefs
+===================================================================
+--- postfix.orig/makedefs
++++ postfix/makedefs
+@@ -198,11 +198,6 @@ error() {
exit 1
}
diff --git a/debian/patches/Sort-list-of-AUXLIBS-for-reproducible-builds.patch b/debian/patches/Sort-list-of-AUXLIBS-for-reproducible-builds.patch
deleted file mode 100644
index 3532879..0000000
--- a/debian/patches/Sort-list-of-AUXLIBS-for-reproducible-builds.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From: =?utf-8?q?Christian_G=C3=B6ttsche?= <cgzones@googlemail.com>
-Date: Mon, 1 Jan 2024 19:45:09 +0100
-Subject: Sort list of AUXLIBS for reproducible builds
-
-Forwarded: https://www.mail-archive.com/postfix-users@postfix.org/msg101292.html
----
- makedefs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: postfix/makedefs
-===================================================================
---- postfix.orig/makedefs
-+++ postfix/makedefs
-@@ -184,6 +184,8 @@
- # New York, NY 10011, USA
- #--
-
-+LC_ALL=C; export LC_ALL
-+
- # By now all shells must have functions.
-
- error() {
-@@ -211,7 +213,7 @@ echo "#---------------------------------
- echo "# Start of summary of user-configurable 'make makefiles' options."
- echo "# CCARGS=$CCARGS"
- echo "# AUXLIBS=$AUXLIBS"
--env | grep '^AUXLIBS_' | sed 's/^/# /'
-+env | grep '^AUXLIBS_' | sed 's/^/# /' | sort
- echo "# shared=$shared"
- echo "# dynamicmaps=$dynamicmaps"
- echo "# pie=$pie"
diff --git a/debian/patches/series b/debian/patches/series
index 1971fe5..3f7eee0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -12,4 +12,3 @@
debian-man-name.diff
71_debianize_collate.pl.diff
Disable-LD_LIBRARY_PATH-check.patch
-Sort-list-of-AUXLIBS-for-reproducible-builds.patch
diff --git a/debian/postfix-mongodb.README.debian b/debian/postfix-mongodb.README.debian
new file mode 100644
index 0000000..94407df
--- /dev/null
+++ b/debian/postfix-mongodb.README.debian
@@ -0,0 +1,2 @@
+The postfix-doc package contains documentation on how to configure this
+map type. See /usr/share/doc/postfix/html/MONGODB_README.html
diff --git a/debian/postfix-mongodb.dirs b/debian/postfix-mongodb.dirs
new file mode 100644
index 0000000..fb3a177
--- /dev/null
+++ b/debian/postfix-mongodb.dirs
@@ -0,0 +1 @@
+usr/lib/postfix
diff --git a/debian/postfix-mongodb.postinst b/debian/postfix-mongodb.postinst
new file mode 100644
index 0000000..dd3bdc3
--- /dev/null
+++ b/debian/postfix-mongodb.postinst
@@ -0,0 +1,56 @@
+#! /bin/sh
+# postinst script for #PACKAGE#
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see /usr/share/doc/packaging-manual/
+#
+# quoting from the policy:
+# Any necessary prompting should almost always be confined to the
+# post-installation script, and should be protected with a conditional
+# so that unnecessary prompting doesn't happen if a package's
+# installation fails and the `postinst' is called with `abort-upgrade',
+# `abort-remove' or `abort-deconfigure'.
+
+
+# Use debconf.
+. /usr/share/debconf/confmodule
+# Common postfix functions
+. /usr/share/postfix/postinst.functions
+
+case "$1" in
+ configure)
+ addmap mongodb
+ if [ "$(postconf -h alias_database | cut -f1 -d:)" = "mongodb" ]; then
+ runnewaliases
+ fi
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/postfix-mongodb.prerm b/debian/postfix-mongodb.prerm
new file mode 100644
index 0000000..00b9078
--- /dev/null
+++ b/debian/postfix-mongodb.prerm
@@ -0,0 +1,40 @@
+#! /bin/sh
+# prerm script for #PACKAGE#
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <prerm> `remove'
+# * <old-prerm> `upgrade' <new-version>
+# * <new-prerm> `failed-upgrade' <old-version>
+# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+# * <deconfigured's-prerm> `deconfigure' `in-favour'
+# <package-being-installed> <version> `removing'
+# <conflicting-package> <version>
+# for details, see /usr/share/doc/packaging-manual/
+
+. /usr/share/postfix/postinst.functions
+
+case "$1" in
+ remove|purge|upgrade)
+ delmap mongodb
+# install-info --quiet --remove /usr/info/#PACKAGE#.info.gz
+ ;;
+ deconfigure|failed-upgrade)
+ ;;
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/postfix.postinst b/debian/postfix.postinst
index 816bb7f..6168a9f 100644
--- a/debian/postfix.postinst
+++ b/debian/postfix.postinst
@@ -520,7 +520,7 @@ if [ "$mailer" != "No configuration" ] || [ -f /etc/postfix/main.cf ]; then
if [ "$aliastype" != "ldap" ] && [ "$aliastype" != "lmdb" ] && \
[ "$aliastype" != "cdb" ] && [ "$aliastype" != "pcre" ] && \
[ "$aliastype" != "mysql" ] && [ "$aliastype" != "pgsql" ] && \
- [ "$aliastype" != "sqlite" ] ; then
+ [ "$aliastype" != "sqlite" ] && [ "$aliastype" != "mongodb" ] ; then
runnewaliases
else
echo "Newaliases not run - external map type. Ensure postfix-$aliastype is installed."
diff --git a/debian/rules b/debian/rules
index d5d6535..e9dee96 100755
--- a/debian/rules
+++ b/debian/rules
@@ -42,6 +42,7 @@ CCARGS += -DDEBIAN \
$(shell getconf LFS_CFLAGS) \
-DHAS_CDB \
-DHAS_LMDB \
+ -DHAS_MONGODB -I/usr/include/libmongoc-1.0 -I/usr/include/libbson-1.0 \
-DHAS_MYSQL -I/usr/include/mysql \
-DHAS_PGSQL -I$(shell pg_config --includedir) \
-DHAS_SQLITE \
@@ -73,6 +74,7 @@ override_dh_auto_configure:
AUXLIBS_CDB="-lcdb" \
AUXLIBS_LDAP="-lldap -llber" \
AUXLIBS_LMDB="-llmdb" \
+ AUXLIBS_MONGODB="-lmongoc-1.0 -lbson-1.0" \
AUXLIBS_MYSQL="-lmysqlclient" \
AUXLIBS_PCRE="$(shell pcre2-config --libs8)" \
AUXLIBS_PGSQL="-lpq" \
@@ -143,7 +145,7 @@ override_dh_install-arch:
grep -v $${i} postfix-files > postfix-files.$$ ; \
mv postfix-files.$$ postfix-files ; \
done
- for j in cdb ldap lmdb mysql pcre pgsql sqlite ; do \
+ for j in cdb ldap lmdb mongodb mysql pcre pgsql sqlite ; do \
mkdir -m 755 -p $(base)-$${j}/etc/postfix/postfix-files.d ; \
grep $${j} $(confdir)/postfix-files >> $(base)-$${j}/etc/postfix/postfix-files.d/$${j}.files ; \
grep -v $${j} $(confdir)/postfix-files > $(confdir)/postfix-files.$$ ; \
@@ -179,7 +181,7 @@ override_dh_install-arch:
txt2man -t postfix-collate -r postfix-$(DEB_VERSION_UPSTREAM) -d '$(shell date -s @$(SOURCE_DATE_EPOCH))' -s 1 auxiliary/collate/README > ${base}/usr/share/man/man1/postfix-collate.1
install man/man1/*.1 ${base}/usr/share/man/man1
install man/man5/*.5 ${base}/usr/share/man/man5
- for j in ldap lmdb mysql pcre pgsql sqlite ; do \
+ for j in ldap lmdb mongodb mysql pcre pgsql sqlite ; do \
mkdir -m 755 -p $(base)-$${j}/usr/share/man/man5 ; \
mv ${base}/usr/share/man/man5/$${j}_table.5 ${base}-$${j}/usr/share/man/man5 ; \
done
diff --git a/debian/tests/test-postfix.py b/debian/tests/test-postfix.py
index b3cbdc2..4809095 100644
--- a/debian/tests/test-postfix.py
+++ b/debian/tests/test-postfix.py
@@ -256,12 +256,12 @@ mech_list: %s %s
self.assertEqual(code, 250, reply)
self.assertEqual(self.s.does_esmtp, 1, reply)
self.assertTrue(b'8BITMIME' in self.s.ehlo_resp, reply)
- # No help available
+ # Help available as of postfix 3.9
self.s.putcmd("help")
code, msg = self.s.getreply()
reply = '%d %s' % (code, msg)
- self.assertEqual(code, 500, reply)
- self.assertTrue(b'Error' in msg, reply)
+ self.assertEqual(code, 214, reply)
+ self.assertTrue(b'2.0.0 Commands:' in msg, reply)
# VRFY addresses
self._vrfy('address@example.com', valid=True)
self._vrfy('does-not-exist', valid=False)