Compare commits
10 Commits
006aab3a70
...
babdb3dec6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
babdb3dec6 | ||
|
|
95bb708320 | ||
|
|
bb40a9c4ae | ||
|
|
83f3056cb2 | ||
|
|
338516d76e | ||
|
|
ddaf49d190 | ||
|
|
fb0da65b82 | ||
|
|
8f3cc6082d | ||
|
|
0cfc549c1d | ||
|
|
a4fefbdcb0 |
22
postfix-set-default_data_type-to-lmdb.patch
Normal file
22
postfix-set-default_data_type-to-lmdb.patch
Normal file
@ -0,0 +1,22 @@
|
||||
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
|
||||
34
postfix-use-lmdb-by-default-instead-of-libdb.patch
Normal file
34
postfix-use-lmdb-by-default-instead-of-libdb.patch
Normal file
@ -0,0 +1,34 @@
|
||||
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
|
||||
|
||||
53
postfix.spec
53
postfix.spec
@ -23,7 +23,7 @@
|
||||
Name: postfix
|
||||
Summary: Postfix Mail Transport Agent
|
||||
Version: 3.3.1
|
||||
Release: 16
|
||||
Release: 21
|
||||
Epoch: 2
|
||||
URL: http://www.postfix.org
|
||||
License: (IPL-1.0 and GPLv2+) or (EPL-2.0 and GPLv2+)
|
||||
@ -46,15 +46,17 @@ 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: perl-generators pkgconfig zlib-devel systemd-units libicu-devel libnsl2-devel gcc m4 openldap-devel
|
||||
BuildRequires: lmdb-devel 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
|
||||
Requires: diffutils %{name}-help
|
||||
|
||||
Provides: MTA smtpd smtpdaemon server(smtp)
|
||||
Provides: %{name}-mysql %{name}-sqlite %{name}-ldap %{name}-pcre
|
||||
@ -110,6 +112,8 @@ 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"|' \
|
||||
@ -129,11 +133,13 @@ for f in README_FILES/TLS_{LEGACY_,}README TLS_ACKNOWLEDGEMENTS; do
|
||||
done
|
||||
|
||||
%build
|
||||
unset AUXLIBS AUXLIBS_LDAP AUXLIBS_PCRE AUXLIBS_MYSQL AUXLIBS_PGSQL AUXLIBS_SQLITE AUXLIBS_CDB
|
||||
unset AUXLIBS AUXLIBS_LDAP AUXLIBS_LMDB 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"
|
||||
@ -162,7 +168,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_PCRE="${AUXLIBS_PCRE}" \
|
||||
AUXLIBS_LDAP="${AUXLIBS_LDAP}" AUXLIBS_LMDB="${AUXLIBS_LMDB}" 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" \
|
||||
@ -321,7 +327,7 @@ function split_file
|
||||
}
|
||||
|
||||
pushd %{buildroot}%{postfix_config_dir}
|
||||
for map in mysql pgsql sqlite ldap pcre; do
|
||||
for map in mysql pgsql sqlite ldap lmdb 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"
|
||||
@ -377,7 +383,7 @@ if [ ! -f %{sslcert} ]; then
|
||||
FQDN=localhost.localdomain
|
||||
fi
|
||||
|
||||
%{_bindir}/openssl req -new -key %{sslkey} -x509 -sha256 -days 365 -set_serial $RANDOM -out %{sslcert} \
|
||||
%{_bindir}/openssl req -new -key %{sslkey} -x509 -sha256 -days 730 -set_serial $RANDOM -out %{sslcert} \
|
||||
-subj "/C=--/ST=SomeState/L=SomeCity/O=SomeOrganization/OU=SomeOrganizationalUnit/CN=${FQDN}/emailAddress=root@${FQDN}"
|
||||
chmod 644 %{sslcert}
|
||||
fi
|
||||
@ -499,6 +505,9 @@ 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
|
||||
@ -548,6 +557,36 @@ 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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user