diff --git a/postfix-3.8.1.tar.gz b/postfix-3.8.1.tar.gz deleted file mode 100644 index ceb39df..0000000 Binary files a/postfix-3.8.1.tar.gz and /dev/null differ diff --git a/postfix-3.8.4.tar.gz b/postfix-3.8.4.tar.gz new file mode 100644 index 0000000..c7898cd Binary files /dev/null and b/postfix-3.8.4.tar.gz differ diff --git a/postfix-etc-init.d-postfix b/postfix-etc-init.d-postfix index c609b0a..52bd7bd 100644 --- a/postfix-etc-init.d-postfix +++ b/postfix-etc-init.d-postfix @@ -51,15 +51,20 @@ conf_check() { } make_aliasesdb() { - if [ "$(/usr/sbin/postconf -h alias_database)" == "hash:/etc/aliases" ] + local MAP="" + local ALIASESDB="$(/usr/sbin/postconf -h alias_database)" + [ "$ALIASESDB" = "hash:/etc/aliases" ] && MAP="db" + [ "$ALIASESDB" = "lmdb:/etc/aliases" ] && MAP="lmdb" + + if [ "$MAP" = "db" -o "$MAP" = "lmdb" ] then - # /etc/aliases.db may be used by other MTA, make sure nothing + # /etc/aliases.db|lmdb may be used by other MTA, make sure nothing # has touched it since our last newaliases call - [ /etc/aliases -nt /etc/aliases.db ] || - [ "$ALIASESDB_STAMP" -nt /etc/aliases.db ] || - [ "$ALIASESDB_STAMP" -ot /etc/aliases.db ] || return + [ /etc/aliases -nt /etc/aliases.$MAP ] || + [ "$ALIASESDB_STAMP" -nt /etc/aliases.$MAP ] || + [ "$ALIASESDB_STAMP" -ot /etc/aliases.$MAP ] || return /usr/bin/newaliases - touch -r /etc/aliases.db "$ALIASESDB_STAMP" + touch -r /etc/aliases.$MAP "$ALIASESDB_STAMP" else /usr/bin/newaliases fi diff --git a/postfix.aliasesdb b/postfix.aliasesdb index 8c0156e..863b405 100644 --- a/postfix.aliasesdb +++ b/postfix.aliasesdb @@ -3,15 +3,20 @@ ALIASESDB_STAMP=/var/lib/misc/postfix.aliasesdb-stamp make_aliasesdb() { - if [ "$(/usr/sbin/postconf -h alias_database)" == "hash:/etc/aliases" ] + local MAP="" + local ALIASESDB="$(/usr/sbin/postconf -h alias_database)" + [ "$ALIASESDB" = "hash:/etc/aliases" ] && MAP="db" + [ "$ALIASESDB" = "lmdb:/etc/aliases" ] && MAP="lmdb" + + if [ "$MAP" = "db" -o "$MAP" = "lmdb" ] then - # /etc/aliases.db may be used by other MTA, make sure nothing + # /etc/aliases.db|lmdb may be used by other MTA, make sure nothing # has touched it since our last newaliases call - [ /etc/aliases -nt /etc/aliases.db ] || - [ "$ALIASESDB_STAMP" -nt /etc/aliases.db ] || - [ "$ALIASESDB_STAMP" -ot /etc/aliases.db ] || return 0 + [ /etc/aliases -nt /etc/aliases.$MAP ] || + [ "$ALIASESDB_STAMP" -nt /etc/aliases.$MAP ] || + [ "$ALIASESDB_STAMP" -ot /etc/aliases.$MAP ] || return 0 /usr/bin/newaliases - touch -r /etc/aliases.db "$ALIASESDB_STAMP" + touch -r /etc/aliases.$MAP "$ALIASESDB_STAMP" else /usr/bin/newaliases fi diff --git a/postfix.spec b/postfix.spec index 7d22753..035b7f2 100644 --- a/postfix.spec +++ b/postfix.spec @@ -22,8 +22,8 @@ Name: postfix Summary: Postfix Mail Transport Agent -Version: 3.8.1 -Release: 2 +Version: 3.8.4 +Release: 1 Epoch: 2 URL: http://www.postfix.org License: (IPL-1.0 and GPLv2+) or (EPL-2.0 and GPLv2+) @@ -312,9 +312,6 @@ chrpath -d %{buildroot}%{_sbindir}/postconf chrpath -d %{buildroot}%{_sbindir}/postsuper chrpath -d %{buildroot}%{_sbindir}/postmulti -strip -s %{buildroot}%{_libexecdir}/postfix/qmgr -strip -s %{buildroot}%{_libexecdir}/postfix/smtp - mkdir -p %{buildroot}/etc/ld.so.conf.d echo "%{_libdir}/postfix" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf @@ -559,6 +556,12 @@ fi %{postfix_doc_dir}/README_FILES/* %changelog +* Tue Jan 02 2024 gaihuiying - 2:3.8.4-1 +- Type:requirements +- ID:NA +- SUG:NA +- DESC:update postfix to 3.8.4 + * Mon Aug 28 2023 gaihuiying - 2:3.8.1-2 - Type:bugfix - ID:NA