Compare commits

..

No commits in common. "babdb3dec6aacff15bc8ad054ae6a17e350cf9ba" and "006aab3a70ea1fc3d42d727134917e1f21ff82bd" have entirely different histories.

3 changed files with 7 additions and 102 deletions

View File

@ -1,22 +0,0 @@
From 063980f92ca5963e8ed76e78d661bcbb3a381fa3 Mon Sep 17 00:00:00 2001
From: eaglegai <eaglegai@163.com>
Date: Thu, 3 Mar 2022 09:05:20 +0800
Subject: [PATCH] set default_data_tpye to lmdb
---
conf/main.cf | 3 +++
1 file changed, 3 insertions(+)
diff --git a/conf/main.cf b/conf/main.cf
index 6d7b236..e27687e 100644
--- a/conf/main.cf
+++ b/conf/main.cf
@@ -734,3 +734,6 @@ smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt
# plaintext (opportunistic TLS outbound).
#
smtp_tls_security_level = may
+
+
+default_database_type = lmdb
--
2.33.0

View File

@ -1,34 +0,0 @@
From 771dfac772b6d4893b6043b70336fae46e60351f Mon Sep 17 00:00:00 2001
From: eaglegai <eaglegai@163.com>
Date: Mon, 24 May 2021 20:11:06 +0800
Subject: [PATCH] use lmdb by default instead of libdb
---
conf/main.cf | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/conf/main.cf b/conf/main.cf
index 495e346..6d7b236 100644
--- a/conf/main.cf
+++ b/conf/main.cf
@@ -402,7 +402,7 @@ unknown_local_recipient_reject_code = 550
# "postfix reload" to eliminate the delay.
#
#alias_maps = dbm:/etc/aliases
-alias_maps = hash:/etc/aliases
+alias_maps = lmdb:/etc/aliases
#alias_maps = hash:/etc/aliases, nis:mail.aliases
#alias_maps = netinfo:/aliases
@@ -413,7 +413,7 @@ alias_maps = hash:/etc/aliases
#
#alias_database = dbm:/etc/aliases
#alias_database = dbm:/etc/mail/aliases
-alias_database = hash:/etc/aliases
+alias_database = lmdb:/etc/aliases
#alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases
# ADDRESS EXTENSIONS (e.g., user+foo)
--
1.8.3.1

View File

@ -23,7 +23,7 @@
Name: postfix
Summary: Postfix Mail Transport Agent
Version: 3.3.1
Release: 21
Release: 16
Epoch: 2
URL: http://www.postfix.org
License: (IPL-1.0 and GPLv2+) or (EPL-2.0 and GPLv2+)
@ -46,17 +46,15 @@ Patch7: fix-postfix-build-failed.patch
Patch8: fix-build-error-with_glibc2.30-ftbfs.patch
Patch9: fix-multiple-definition-error-with-gcc-10.patch
Patch10: postfix-3.6.2-glibc-234-build-fix.patch
Patch11: postfix-use-lmdb-by-default-instead-of-libdb.patch
Patch12: postfix-set-default_data_type-to-lmdb.patch
BuildRequires: lmdb-devel perl-generators pkgconfig zlib-devel systemd-units libicu-devel libnsl2-devel gcc m4 openldap-devel
BuildRequires: perl-generators pkgconfig zlib-devel systemd-units libicu-devel libnsl2-devel gcc m4 openldap-devel
BuildRequires: cyrus-sasl-devel pcre-devel mariadb-connector-c-devel postgresql-devel sqlite-devel openssl-devel procps-ng
BuildRequires: chrpath
Requires(post): systemd-sysv %{_sbindir}/alternatives %{_bindir}/openssl
Requires(pre): %{_sbindir}/groupadd %{_sbindir}/useradd
Requires(preun): %{_sbindir}/alternatives
%{?systemd_requires}
Requires: diffutils %{name}-help
Requires: diffutils
Provides: MTA smtpd smtpdaemon server(smtp)
Provides: %{name}-mysql %{name}-sqlite %{name}-ldap %{name}-pcre
@ -112,8 +110,6 @@ PostgreSQL maps with Postfix, you need this.
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
sed -i \
's|^\(\s*#define\s\+DEF_SHLIB_DIR\s\+\)"/usr/lib/postfix"|\1"%{_libdir}/postfix"|' \
@ -133,13 +129,11 @@ for f in README_FILES/TLS_{LEGACY_,}README TLS_ACKNOWLEDGEMENTS; do
done
%build
unset AUXLIBS AUXLIBS_LDAP AUXLIBS_LMDB AUXLIBS_PCRE AUXLIBS_MYSQL AUXLIBS_PGSQL AUXLIBS_SQLITE AUXLIBS_CDB
unset AUXLIBS AUXLIBS_LDAP AUXLIBS_PCRE AUXLIBS_MYSQL AUXLIBS_PGSQL AUXLIBS_SQLITE AUXLIBS_CDB
CCARGS="-fPIC"
AUXLIBS="-lnsl"
CCARGS="${CCARGS} -DHAS_LDAP -DLDAP_DEPRECATED=1 %{?with_sasl:-DUSE_LDAP_SASL}"
AUXLIBS_LDAP="-lldap -llber"
CCARGS="${CCARGS} -DHAS_LMDB"
AUXLIBS_LMDB="-llmdb"
CCARGS="${CCARGS} -DHAS_PCRE -I%{_includedir}/pcre"
AUXLIBS_PCRE="-lpcre"
CCARGS="${CCARGS} -DHAS_MYSQL -I%{_includedir}/mysql"
@ -168,7 +162,7 @@ LDFLAGS="%{?__global_ldflags} %{?_hardened_build:-Wl,-z,relro,-z,now}"
make -f Makefile.init makefiles shared=yes dynamicmaps=yes \
%{?_hardened_build:pie=yes} CCARGS="${CCARGS}" AUXLIBS="${AUXLIBS}" \
AUXLIBS_LDAP="${AUXLIBS_LDAP}" AUXLIBS_LMDB="${AUXLIBS_LMDB}" AUXLIBS_PCRE="${AUXLIBS_PCRE}" \
AUXLIBS_LDAP="${AUXLIBS_LDAP}" AUXLIBS_PCRE="${AUXLIBS_PCRE}" \
AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \
AUXLIBS_SQLITE="${AUXLIBS_SQLITE}" AUXLIBS_CDB="${AUXLIBS_CDB}"\
DEBUG="" SHLIB_RPATH="-Wl,-rpath,%{postfix_shlib_dir} $LDFLAGS" \
@ -327,7 +321,7 @@ function split_file
}
pushd %{buildroot}%{postfix_config_dir}
for map in mysql pgsql sqlite ldap lmdb pcre; do
for map in mysql pgsql sqlite ldap pcre; do
rm -f dynamicmaps.cf.d/"$map" "postfix-files.d/$map"
split_file "^\s*$map\b" "$map" dynamicmaps.cf
sed -i "s|postfix-$map\\.so|%{postfix_shlib_dir}/\\0|" "dynamicmaps.cf.d/$map"
@ -383,7 +377,7 @@ if [ ! -f %{sslcert} ]; then
FQDN=localhost.localdomain
fi
%{_bindir}/openssl req -new -key %{sslkey} -x509 -sha256 -days 730 -set_serial $RANDOM -out %{sslcert} \
%{_bindir}/openssl req -new -key %{sslkey} -x509 -sha256 -days 365 -set_serial $RANDOM -out %{sslcert} \
-subj "/C=--/ST=SomeState/L=SomeCity/O=SomeOrganization/OU=SomeOrganizationalUnit/CN=${FQDN}/emailAddress=root@${FQDN}"
chmod 644 %{sslcert}
fi
@ -505,9 +499,6 @@ fi
%{_bindir}/rmail.postfix
%{_sbindir}/sendmail.postfix
/usr/lib/sendmail.postfix
%attr(0644, root, root) %{postfix_config_dir}/dynamicmaps.cf.d/lmdb
%attr(0644, root, root) %{postfix_config_dir}/postfix-files.d/lmdb
%attr(0755, root, root) %{postfix_shlib_dir}/postfix-lmdb.so
%ghost %{_sysconfdir}/pam.d/smtp
%ghost %attr(0755, root, root) %{_bindir}/mailq
%ghost %attr(0755, root, root) %{_bindir}/newaliases
@ -557,36 +548,6 @@ fi
%{postfix_doc_dir}/README_FILES/*
%changelog
* Tue Jun 13 2023 zhouyihang <zhouyihang3@h-partners.com> - 2:3.3.1-21
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add require of help to fix empty symlink
* Fri Mar 10 2023 gaihuiying <eaglegai@163.com> - 2:3.3.1-20
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:modify Certificate validity period
* Thu Mar 03 2022 gaihuiying <eaglegai@163.com> - 2:3.3.1-19
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:set default_data_tpye to lmdb
* Tue Mar 01 2022 zhujunhao<zhujunhao11@huawei.com> - 2:3.3.1-18
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:set lmdb db in main.cf
* Tue Mar 01 2022 zhouyihang<zhouyihang3@h-partners.com> - 2:3.3.1-17
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add build require of lmdb
* Wed Feb 23 2022 xihaochen<xihaochen@h-partner.com> - 2:3.3.1-16
- Type:bugfix
- ID:NA