SHA256
1
0
forked from pool/postfix
Dominique Leuenberger 2021-02-02 13:14:54 +00:00 committed by Git OBS Bridge
parent aa0714b890
commit 436d1a5c55
13 changed files with 198 additions and 6191 deletions

3
postfix-3.5.8.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:22582628cf3edc18c5155c9ff44543dd95a9435fb68135d76a99f572cb07456f
size 4614733

7
postfix-3.5.8.tar.gz.asc Normal file
View File

@ -0,0 +1,7 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)
iFcDBQBfpx7vDAtZDoDKFacRCoWNAP48whcIl3p06B6xosrFuNgN4SIvY3DAKAZi
7pKaMyPhbAEAhYVQhtaheHNcWbPnWAj8Z9hRQvLGbEDlnEjkNlYmKQc=
=F5E8
-----END PGP SIGNATURE-----

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:51ced5a3165a415beba812b6c9ead0496b7172ac6c3beb654d2ccd9a1b00762b
size 4620852

View File

@ -1,7 +0,0 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)
iFcDBQBgBFwoDAtZDoDKFacRCvzhAP4yix6R51EeNGV+lGfzsS2NEgDnoGvdoXIp
m8O0ocFIXAD9HgylqBBdTnAm3PnDawYVJS6vWPUKJRGrqjwnTJ4Ikqc=
=ncG3
-----END PGP SIGNATURE-----

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:29f27b1ca45410e63d64f880135d6e6b396528cf719a1e334a7fc138e62906d5 oid sha256:6fc0d9079d0fabb16191c3d2e3af9bd6bb06317abe07d30c65017b8537f3cbf0
size 24017 size 24077

View File

@ -1,153 +0,0 @@
Index: conf/main.cf
===================================================================
--- conf/main.cf.orig
+++ conf/main.cf
@@ -567,6 +567,7 @@ unknown_local_recipient_reject_code = 55
#
#smtpd_banner = $myhostname ESMTP $mail_name
#smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
+smtpd_banner = $myhostname ESMTP
# PARALLEL DELIVERY TO THE SAME DESTINATION
#
@@ -673,4 +674,140 @@ sample_directory =
# readme_directory: The location of the Postfix README files.
#
readme_directory =
+
+############################################################
+#
+# before changing values manually consider editing
+# /etc/sysconfig/postfix
+# and run
+# config.postfix
+#
+# if you miss a feature of config.postfix then just send a
+# mail to chris@computersalat.de
+# patches for new feature(s) are also welcome :)
+#
+############################################################
+
+biff = no
+content_filter =
+delay_warning_time = 0h
+disable_dns_lookups = no
+disable_mime_output_conversion = no
+disable_vrfy_command = yes
+inet_interfaces = all
inet_protocols = ipv4
+masquerade_classes = envelope_sender, header_sender, header_recipient
+masquerade_domains =
+masquerade_exceptions =
+mydestination = $myhostname, localhost.$mydomain
+myhostname = localhost
+mynetworks_style = subnet
+relayhost =
+
+alias_maps =
+canonical_maps =
+relocated_maps =
+sender_canonical_maps =
+transport_maps =
+mail_spool_directory = /var/mail
+message_strip_characters =
+defer_transports =
+mailbox_command =
+mailbox_transport =
+mailbox_size_limit = 0
+message_size_limit = 0
+strict_8bitmime = no
+strict_rfc821_envelopes = no
+smtpd_delay_reject = yes
+smtpd_helo_required = no
+
+smtpd_client_restrictions =
+
+smtpd_helo_restrictions =
+
+smtpd_sender_restrictions =
+
+smtpd_recipient_restrictions =
+
+
+############################################################
+# SASL stuff
+############################################################
+smtp_sasl_auth_enable = no
+smtp_sasl_security_options =
+smtp_sasl_password_maps =
+smtpd_sasl_auth_enable = no
+# cyrus : smtpd_sasl_type = cyrus
+# smtpd_sasl_path = smtpd
+# dovecot : smtpd_sasl_type = dovecot
+# smtpd_sasl_path = private/auth
+smtpd_sasl_type = cyrus
+smtpd_sasl_path = smtpd
+############################################################
+# TLS stuff
+############################################################
+#tls_append_default_CA = no
+relay_clientcerts =
+#tls_random_source = dev:/dev/urandom
+
+smtp_use_tls = no
+#smtp_tls_loglevel = 0
+smtp_enforce_tls = no
+smtp_tls_CAfile =
+smtp_tls_CApath =
+smtp_tls_cert_file =
+smtp_tls_key_file =
+#smtp_tls_policy_maps = hash:/etc/postfix/tls_policy
+#smtp_tls_session_cache_timeout = 3600s
+smtp_tls_session_cache_database =
+
+smtpd_use_tls = no
+#smtpd_tls_loglevel = 0
+smtpd_tls_CAfile =
+smtpd_tls_CApath =
+smtpd_tls_cert_file =
+smtpd_tls_key_file =
+smtpd_tls_ask_ccert = no
+smtpd_tls_exclude_ciphers = RC4
+smtpd_tls_received_header = no
+############################################################
+# Start MySQL from postfixwiki.org
+############################################################
+relay_domains = $mydestination, hash:/etc/postfix/relay
+#virtual_alias_domains =
+#virtual_alias_maps = hash:/etc/postfix/virtual
+#virtual_uid_maps = static:303
+#virtual_gid_maps = static:303
+#virtual_minimum_uid = 303
+#virtual_mailbox_base = /srv/maildirs
+#virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
+#virtual_mailbox_limit = 0
+#virtual_mailbox_limit_inbox = no
+#virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
+## For dovecot LMTP replace 'virtual' with 'lmtp:unix:private/dovecot-lmtp'
+#virtual_transport = virtual
+## Additional for quota support
+#virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
+#virtual_mailbox_limit_override = yes
+### Needs Maildir++ compatible IMAP servers, like Courier-IMAP
+#virtual_maildir_filter = yes
+#virtual_maildir_filter_maps = hash:/etc/postfix/vfilter
+#virtual_maildir_limit_message = Sorry, the user's maildir has overdrawn his diskspace quota, please try again later.
+#virtual_maildir_limit_message_maps = hash:/etc/postfix/vmsg
+#virtual_overquota_bounce = yes
+#virtual_trash_count = yes
+#virtual_trash_name = ".Trash"
+############################################################
+# End MySQL from postfixwiki.org
+############################################################
+# Rewrite reject codes
+############################################################
+#unknown_address_reject_code = 550
+#unknown_client_reject_code = 550
+#unknown_hostname_reject_code = 550
+#unverified_recipient_reject_code = 550
+#soft_bounce = yes
+############################################################
+#debug_peer_list = example.com
+#debug_peer_level = 3
+

File diff suppressed because it is too large Load Diff

View File

@ -1,547 +0,0 @@
#
# spec file for package postfix-bdb
#
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define pf_docdir %{_docdir}/postfix-doc
%define pf_config_directory %{_sysconfdir}/postfix
%define pf_daemon_directory %{_prefix}/lib/postfix/bin/
%define _libexecdir %{_prefix}/lib
%define pf_shlib_directory %{_prefix}/lib/postfix
%define pf_command_directory %{_sbindir}
%define pf_queue_directory var/spool/postfix
%define pf_sendmail_path %{_sbindir}/sendmail
%define pf_newaliases_path %{_bindir}/newaliases
%define pf_mailq_path %{_bindir}/mailq
%define pf_setgid_group maildrop
%define pf_readme_directory %{_docdir}/postfix-doc/README_FILES
%define pf_html_directory %{_docdir}/postfix-doc/html
%define pf_sample_directory %{_docdir}/postfix-doc/samples
%define pf_data_directory %{_localstatedir}/lib/postfix
%if 0%{?suse_version} < 1330
%define pf_uid 51
%define pf_gid 51
%define maildrop_gid 59
%define vmusr vmail
%define vmgid 303
%define vmid 303
%define vmdir /srv/maildirs
%endif
%define mail_group mail
%define conf_backup_dir %{_localstatedir}/adm/backup/postfix
%define unitdir %{_prefix}/lib/systemd
#Compat macro for new _fillupdir macro introduced in Nov 2017
%if ! %{defined _fillupdir}
%define _fillupdir %{_localstatedir}/adm/fillup-templates
%endif
%if 0%{?suse_version} >= 1320 || ( 0%{?suse_version} == 1315 && 0%{?is_opensuse} )
%bcond_without lmdb
%bcond_without libnsl
%else
%bcond_with lmdb
%bcond_with libnsl
%endif
%bcond_without ldap
Name: postfix-bdb
Version: 3.5.9
Release: 0
Summary: A fast, secure, and flexible mailer
License: IPL-1.0 OR EPL-2.0
Group: Productivity/Networking/Email/Servers
URL: http://www.postfix.org
Source0: http://cdn.postfix.johnriley.me/mirrors/postfix-release/official/postfix-%{version}.tar.gz
Source1: http://cdn.postfix.johnriley.me/mirrors/postfix-release/official/postfix-%{version}.tar.gz.gpg2#/postfix-%{version}.tar.gz.asc
Source2: postfix-SUSE.tar.gz
Source3: postfix-mysql.tar.bz2
#Source4: http://cdn.postfix.johnriley.me/mirrors/postfix-release/wietse.pgp#/postfix.keyring
Source4: postfix.keyring
Source10: postfix-rpmlintrc
Source11: check_mail_queue
Source12: postfix-user.conf
Source13: postfix-vmail-user.conf
Patch1: postfix-no-md5.patch
Patch2: pointer_to_literals.patch
Patch3: ipv6_disabled.patch
Patch4: postfix-bdb-main.cf.patch
Patch5: postfix-master.cf.patch
Patch6: postfix-linux45.patch
Patch7: postfix-ssl-release-buffers.patch
Patch8: postfix-vda-v14-3.0.3.patch
Patch9: fix-postfix-script.patch
Patch10: postfix-avoid-infinit-loop-if-no-permission.patch
BuildRequires: ca-certificates
BuildRequires: cyrus-sasl-devel
BuildRequires: db-devel
BuildRequires: diffutils
BuildRequires: fdupes
BuildRequires: libicu-devel
BuildRequires: libopenssl-devel
BuildRequires: m4
BuildRequires: mysql-devel
%if %{with ldap}
BuildRequires: openldap2-devel
%endif
BuildRequires: pcre-devel
BuildRequires: pkgconfig
BuildRequires: postgresql-devel
BuildRequires: shadow
BuildRequires: zlib-devel
BuildRequires: pkgconfig(systemd)
Requires: iproute2
Requires(post): permissions
Requires(pre): %fillup_prereq
Requires(pre): permissions
Conflicts: exim
Conflicts: sendmail
Conflicts: postfix
Provides: smtp_daemon
%{?systemd_ordering}
%if %{with lmdb}
BuildRequires: lmdb-devel
%endif
%if %{with libnsl}
BuildRequires: libnsl-devel
%endif
%if 0%{?suse_version} >= 1330
BuildRequires: sysuser-tools
Requires: system-user-nobody
Requires: group(%{mail_group})
Requires(pre): group(%{mail_group})
%sysusers_requires
%else
Requires(pre): shadow
%endif
%description
Postfix aims to be an alternative to the widely-used sendmail program with bdb support
%if %{with lmdb}
%package lmdb
Summary: Postfix plugin to support LMDB maps
Group: Productivity/Networking/Email/Servers
Requires(pre): postfix-bdb = %{version}
Conflicts: postfix
Provides: postfix-lmdb = %{version}-%{release}
Obsoletes: postfix-lmdb < %{version}-%{release}
Conflicts: postfix-lmdb < %{version}-%{release}
%description lmdb
Postfix plugin to support LMDB maps. This library will be loaded
by starting postfix if you'll access a postmap which is stored in
lmdb.
%endif
%prep
%setup -n postfix-%{version} -a 2 -a 3
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
%patch7
%patch8
%patch9
%patch10
# ---------------------------------------------------------------------------
%build
unset AUXLIBS AUXLIBS_LDAP AUXLIBS_PCRE AUXLIBS_MYSQL AUXLIBS_PGSQL AUXLIBS_SQLITE AUXLIBS_CDB
export CCARGS="${CCARGS} %{optflags} -fcommon -Wno-comments -Wno-missing-braces -fPIC"
%ifarch s390 s390x ppc
export CCARGS="${CCARGS} -fsigned-char"
%endif
#
if pkg-config openssl ; then
export CCARGS="${CCARGS} -DUSE_TLS $(pkg-config --cflags openssl)"
export AUXLIBS="$AUXLIBS $(pkg-config --libs openssl)"
else
export CCARGS="${CCARGS} -DUSE_TLS"
export AUXLIBS="${AUXLIBS} -lssl -lcrypto"
fi
#
%if %{with ldap}
export CCARGS="${CCARGS} -DHAS_LDAP -DLDAP_DEPRECATED=1 -DUSE_LDAP_SASL"
export AUXLIBS_LDAP="-lldap -llber"
%endif
#
export CCARGS="${CCARGS} -DHAS_PCRE"
export AUXLIBS_PCRE="-lpcre"
#
export CCARGS="${CCARGS} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I%{_includedir}/sasl"
if pkg-config libsasl2 ; then
export AUXLIBS="$AUXLIBS $(pkg-config --libs libsasl2)"
else
export AUXLIBS="$AUXLIBS -lsasl2"
fi
#
export CCARGS="${CCARGS} -DHAS_MYSQL $(mysql_config --cflags)"
export AUXLIBS_MYSQL="$(mysql_config --libs)"
#
if pkg-config --exists libpq ; then
export CCARGS="${CCARGS} -DHAS_PGSQL $(pkg-config libpq --cflags)"
export AUXLIBS_PGSQL="$(pkg-config libpq --libs)"
else
export CCARGS="${CCARGS} -DHAS_PGSQL -I$(pg_config --includedir)"
export AUXLIBS_PGSQL="-lpq"
fi
#
%if %{with lmdb}
export CCARGS="${CCARGS} -DHAS_LMDB -I/usr/local/include" \
export AUXLIBS_LMDB="-llmdb"
%endif
#
# TODO
#export AUXLIBS_SQLITE
#export AUXLIBS_CDB
#export AUXLIBS_SDBM
export PIE=-pie
# using SHLIB_RPATH to specify unrelated linker flags, because LDFLAGS is
# ignored
make makefiles pie=yes shared=yes dynamicmaps=yes \
shlib_directory=%{_prefix}/lib/postfix \
meta_directory=%{_prefix}/lib/postfix \
config_directory=%{_sysconfdir}/postfix \
SHLIB_RPATH="-Wl,-rpath,%{pf_shlib_directory} -Wl,-z,relro,-z,now"
make %{?_smp_mflags}
%if 0%{?suse_version} >= 1330
# Create postfix user
%sysusers_generate_pre %{SOURCE12} postfix
%sysusers_generate_pre %{SOURCE13} vmail
%endif
# ---------------------------------------------------------------------------
%install
mkdir -p %{buildroot}/%{_libdir}
mkdir -p %{buildroot}%{_sysconfdir}/postfix
cp conf/* %{buildroot}%{_sysconfdir}/postfix
# create our default postfix ssl DIR (/etc/postfix/ssl)
mkdir -p %{buildroot}%{_sysconfdir}/postfix/ssl/certs
# link cacerts to /etc/ssl/certs
ln -sf ../../ssl/certs %{buildroot}%{_sysconfdir}/postfix/ssl/cacerts
cp lib/libpostfix-* %{buildroot}/%{_libdir}
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}/%{_libdir}
sh postfix-install -non-interactive \
install_root=%{buildroot} \
config_directory=%{pf_config_directory} \
daemon_directory=%{pf_daemon_directory} \
command_directory=%{pf_command_directory} \
queue_directory=/%{pf_queue_directory} \
sendmail_path=%{pf_sendmail_path} \
newaliases_path=%{pf_newaliases_path} \
mailq_path=%{pf_mailq_path} \
manpage_directory=%{_mandir} \
setgid_group=%{pf_setgid_group} \
readme_directory=%{pf_readme_directory} \
data_directory=%{pf_data_directory}
ln -sf ../sbin/sendmail %{buildroot}%{_libexecdir}/sendmail
for i in qmqp-source smtp-sink smtp-source; do
install -m 755 bin/$i %{buildroot}%{_sbindir}/$i
done
mkdir -p %{buildroot}/sbin/conf.d
mkdir -p %{buildroot}%{_sysconfdir}/permissions.d
mkdir -p %{buildroot}/%{_libdir}/sasl2
mkdir -p %{buildroot}%{_sbindir}
mkdir -p %{buildroot}/%{conf_backup_dir}
mkdir -p %{buildroot}/%{pf_sample_directory}
mkdir -p %{buildroot}/%{pf_html_directory}
mkdir -p %{buildroot}%{_includedir}/postfix
mkdir -p %{buildroot}%{_sysconfdir}/pam.d
install -m 644 postfix-SUSE/smtp %{buildroot}%{_sysconfdir}/pam.d/smtp
mkdir -p %{buildroot}%{_fillupdir}
sed -e 's;@lib@;%{_lib};g' postfix-SUSE/sysconfig.postfix > %{buildroot}%{_fillupdir}/sysconfig.postfix
install -m 644 postfix-SUSE/sysconfig.mail-postfix %{buildroot}%{_fillupdir}/sysconfig.mail-postfix
sed -e 's;@lib@;%{_lib};g' \
-e 's;@conf_backup_dir@;%{conf_backup_dir};' \
-e 's;@daemon_directory@;%{pf_daemon_directory};' \
-e 's;@readme_directory@;%{pf_readme_directory};' \
-e 's;@html_directory@;%{pf_html_directory};' \
-e 's;@sendmail_path@;%{pf_sendmail_path};' \
-e 's;@setgid_group@;%{pf_setgid_group};' \
-e 's;@manpage_directory@;%{_mandir};' \
-e 's;@newaliases_path@;%{pf_newaliases_path};' \
-e 's;@sample_directory@;%{pf_sample_directory};' \
-e 's;@mailq_path@;%{pf_mailq_path};' postfix-SUSE/config.postfix > %{buildroot}%{_sbindir}/config.postfix
chmod 755 %{buildroot}%{_sbindir}/config.postfix
install -m 644 postfix-SUSE/dynamicmaps.cf %{buildroot}%{_sysconfdir}/postfix/dynamicmaps.cf
install -m 644 postfix-SUSE/ldap_aliases.cf %{buildroot}%{_sysconfdir}/postfix/ldap_aliases.cf
install -m 644 postfix-SUSE/helo_access %{buildroot}%{_sysconfdir}/postfix/helo_access
install -m 644 postfix-SUSE/permissions %{buildroot}%{_sysconfdir}/permissions.d/postfix
install -m 644 postfix-SUSE/sender_canonical %{buildroot}%{_sysconfdir}/postfix/sender_canonical
install -m 644 postfix-SUSE/relay %{buildroot}%{_sysconfdir}/postfix/relay
install -m 644 postfix-SUSE/relay_ccerts %{buildroot}%{_sysconfdir}/postfix/relay_ccerts
install -m 600 postfix-SUSE/sasl_passwd %{buildroot}%{_sysconfdir}/postfix/sasl_passwd
mkdir -p %{buildroot}%{_sysconfdir}/sasl2
install -m 600 postfix-SUSE/smtpd.conf %{buildroot}%{_sysconfdir}/sasl2/smtpd.conf
install -m 644 postfix-SUSE/openssl_postfix.conf.in %{buildroot}%{_sysconfdir}/postfix/openssl_postfix.conf.in
install -m 755 postfix-SUSE/mkpostfixcert %{buildroot}%{_sbindir}/mkpostfixcert
{
cat<<EOF
#
# -----------------------------------------------------------------------
# NOTE: Many parameters have already been added to the end of this file
# by config.postfix. So take care that you don't uncomment
# and set a parameter without checking whether it has been added
# to the end of this file.
# -----------------------------------------------------------------------
#
EOF
cat conf/main.cf
} > %{buildroot}%{_sysconfdir}/postfix/main.cf
%{buildroot}%{_sbindir}/postconf -c %{buildroot}%{_sysconfdir}/postfix \
-e "manpage_directory = %{_mandir}" \
"setgid_group = %{pf_setgid_group}" \
"mailq_path = %{pf_mailq_path}" \
"newaliases_path = %{pf_newaliases_path}" \
"sendmail_path = %{pf_sendmail_path}" \
"readme_directory = %{pf_readme_directory}" \
"html_directory = %{pf_html_directory}" \
"sample_directory = %{pf_sample_directory}" \
"daemon_directory = %{pf_daemon_directory}" \
"smtpd_helo_required = yes" \
"smtpd_delay_reject = yes" \
"disable_vrfy_command = yes" \
'smtpd_banner = $myhostname ESMTP'
#Set Permissions
install -m 644 postfix-SUSE/postfix-files %{buildroot}%{pf_shlib_directory}/postfix-files
# create paranoid permissions file
printf '%%-38s %%-18s %%s\n' %{_sbindir}/postdrop "root.%{pf_setgid_group}" "0755" >> %{buildroot}%{_sysconfdir}/permissions.d/postfix.paranoid
printf '%%-38s %%-18s %%s\n' %{_sbindir}/postqueue "root.%{pf_setgid_group}" "0755" >> %{buildroot}%{_sysconfdir}/permissions.d/postfix.paranoid
install -m 644 include/*.h %{buildroot}%{_includedir}/postfix/
# some rpmlint stuff
# remove unneeded examples/chroot-setup
for example in AIX42 BSDI* F* HPUX* IRIX* NETBSD1 NEXTSTEP3 OPENSTEP4 OSF1 Solaris*; do
rm examples/chroot-setup/${example}
done
cp -a examples/* %{buildroot}%{pf_sample_directory}
cp -a html/* %{buildroot}%{pf_html_directory}
cp -a auxiliary %{buildroot}%{pf_docdir}
rm %{buildroot}%{pf_docdir}/README_FILES/INSTALL
# Fix build for Leap 42.3.
rm -f %{buildroot}%{_sysconfdir}/postfix/*.orig
mkdir -p %{buildroot}%{_unitdir}
mkdir -p %{buildroot}%{pf_shlib_directory}/systemd
install -m 0644 postfix-SUSE/postfix.service %{buildroot}%{_unitdir}/postfix.service
install -m 0755 postfix-SUSE/config_postfix.systemd %{buildroot}%{pf_shlib_directory}/systemd/config_postfix
install -m 0755 postfix-SUSE/update_chroot.systemd %{buildroot}%{pf_shlib_directory}/systemd/update_chroot
install -m 0755 postfix-SUSE/update_postmaps.systemd %{buildroot}%{pf_shlib_directory}/systemd/update_postmaps
install -m 0755 postfix-SUSE/wait_qmgr.systemd %{buildroot}%{pf_shlib_directory}/systemd/wait_qmgr
install -m 0755 postfix-SUSE/cond_slp.systemd %{buildroot}%{pf_shlib_directory}/systemd/cond_slp
ln -sv %{_sbindir}/service %{buildroot}%{_sbindir}/rcpostfix
%fdupes %{buildroot}%{pf_docdir}
%fdupes %{buildroot}%{_mandir}
for path in %{buildroot}%{pf_shlib_directory}/libpostfix-*.so
do
test -e "$path" || continue
name=${path##*/}
cmp "$path" %{buildroot}%{_libdir}/$name || continue
rm -vf $path
ln -sf %{_libdir}/$name $path
done
# ---------------------------------------------------------------------------
install -m 755 %{SOURCE11} %{buildroot}%{_sbindir}/
%if 0%{?suse_version} >= 1330
mkdir -p %{buildroot}%{_sysusersdir}
install -m 644 %{SOURCE12} %{buildroot}%{_sysusersdir}/
install -m 644 %{SOURCE13} %{buildroot}%{_sysusersdir}/
%endif
#Clean up for postfix-bdb
rm -rf %{buildroot}/etc/postfix/ldap_aliases.cf
rm -rf %{buildroot}/usr/lib/debug/usr/lib/postfix/postfix-ldap.so-3.5.8-2.11.1.x86_64.debug
rm -rf %{buildroot}/usr/lib/debug/usr/lib/postfix/postfix-mysql.so-3.5.8-2.11.1.x86_64.debug
rm -rf %{buildroot}/usr/lib/debug/usr/lib/postfix/postfix-pgsql.so-3.5.8-2.11.1.x86_64.debug
rm -rf %{buildroot}/usr/lib/postfix/postfix-ldap.so
rm -rf %{buildroot}/usr/lib/postfix/postfix-mysql.so
rm -rf %{buildroot}/usr/lib/postfix/postfix-pgsql.so
rm -rf %{buildroot}/usr/lib/sysusers.d/postfix-vmail-user.conf
rm -rf %{buildroot}/usr/share/doc/packages/postfix-doc/
rm -rf %{buildroot}/%{_includedir}/postfix/
%if 0%{?suse_version} >= 1330
%pre -f postfix.pre
%else
%pre
getent group postfix >/dev/null || groupadd -g %{pf_gid} -o -r postfix
getent group maildrop >/dev/null || groupadd -g %{maildrop_gid} -o -r maildrop
getent passwd postfix >/dev/null || useradd -r -o -g postfix -u %{pf_uid} -s /bin/false -c "Postfix Daemon" -d /%{pf_queue_directory} postfix
usermod -a -G %{maildrop_gid},%{mail_group} postfix
%endif
%service_add_pre postfix.service
VERSIONTEST=$(test -x usr/sbin/postconf && usr/sbin/postconf proxy_read_maps 2>/dev/null || :)
if [ -z "$VERSIONTEST" -a -f %{pf_queue_directory}/pid/master.pid ]; then
if checkproc -p %{pf_queue_directory}/pid/master.pid usr/lib/postfix/master; then
echo "postfix is still running. You have to stop postfix in order to"
echo "install a newer version."
exit 1
fi
fi
# ---------------------------------------------------------------------------
%preun
%stop_on_removal postfix
%service_del_preun postfix.service
# ---------------------------------------------------------------------------
%post
# We never have to run suseconfig for postfix after installation
# We only start postfix own upgrade-configuration by update
if [ ${1:-0} -gt 1 ]; then
touch %{_localstatedir}/adm/postfix.configured
echo "Executing upgrade-configuration."
%{_sbindir}/postfix set-permissions upgrade-configuration setgid_group=%{pf_setgid_group} || :
if [ "$(%{_sbindir}/postconf -h daemon_directory)" != "%{pf_daemon_directory}" ]; then
%{_sbindir}/postconf daemon_directory=%{pf_daemon_directory}
fi
fi
%service_add_post postfix.service
%set_permissions %{_sbindir}/postqueue
%set_permissions %{_sbindir}/postdrop
%set_permissions %{_sysconfdir}/postfix/sasl_passwd
%set_permissions %{_sbindir}/sendmail
%{fillup_only postfix}
%{fillup_only -an mail}
/sbin/ldconfig
%verifyscript
%verify_permissions -e %{_sbindir}/postqueue
%verify_permissions -e %{_sbindir}/postdrop
%verify_permissions -e %{_sysconfdir}/postfix/sasl_passwd
%verify_permissions -e %{_sbindir}/sendmail
%postun
%service_del_postun postfix.service
/sbin/ldconfig
# ---------------------------------------------------------------------------
%files
%license LICENSE
%config %{_sysconfdir}/pam.d/*
%{_fillupdir}/sysconfig.postfix
%{_fillupdir}/sysconfig.mail-postfix
%{_sbindir}/config.postfix
%dir %{_sysconfdir}/postfix
%config %{_sysconfdir}/postfix/main.cf.default
%config(noreplace) %{_sysconfdir}/postfix/[^mysql]*[^mysql]
%config(noreplace) %{_sysconfdir}/postfix/access
%config(noreplace) %{_sysconfdir}/postfix/aliases
%config(noreplace) %{_sysconfdir}/postfix/canonical
%config(noreplace) %{_sysconfdir}/postfix/header_checks
%config(noreplace) %{_sysconfdir}/postfix/helo_access
%config(noreplace) %{_sysconfdir}/postfix/main.cf
%config(noreplace) %{_sysconfdir}/postfix/master.cf
%attr(0750,root,root) %config %{_sysconfdir}/postfix/post-install
%attr(0750,root,root) %config %{_sysconfdir}/postfix/postfix-tls-script
%attr(0750,root,root) %config %{_sysconfdir}/postfix/postfix-wrapper
%attr(0750,root,root) %config %{_sysconfdir}/postfix/postmulti-script
%config(noreplace) %{_sysconfdir}/postfix/postfix-files
%config(noreplace) %{_sysconfdir}/postfix/relay
%config(noreplace) %{_sysconfdir}/postfix/relay_ccerts
%config(noreplace) %{_sysconfdir}/postfix/sasl_passwd
%config(noreplace) %{_sysconfdir}/postfix/sender_canonical
%config(noreplace) %{_sysconfdir}/postfix/virtual
%dir %{_sysconfdir}/sasl2
%config(noreplace) %{_sysconfdir}/sasl2/smtpd.conf
%config %{_sysconfdir}/postfix/LICENSE
%config %{_sysconfdir}/postfix/TLS_LICENSE
%config %{_sysconfdir}/permissions.d/postfix
%config %{_sysconfdir}/permissions.d/postfix.paranoid
%attr(0644, root, root) %config %{_sysconfdir}/postfix/makedefs.out
%{pf_shlib_directory}/postfix-files
# create our default postfix ssl DIR (/etc/postfix/ssl)
%dir %{_sysconfdir}/postfix/ssl
%dir %{_sysconfdir}/postfix/ssl/certs
%{_sysconfdir}/postfix/ssl/cacerts
%dir %{pf_shlib_directory}/systemd
%attr(0755,root,root) %{pf_shlib_directory}/systemd/*
%{_unitdir}/postfix.service
%verify(not mode) %attr(2755,root,%{pf_setgid_group}) %{_sbindir}/postdrop
%verify(not mode) %attr(2755,root,%{pf_setgid_group}) %{_sbindir}/postqueue
%{_bindir}/mailq
%{_bindir}/newaliases
%attr(0755,root,root) %{_sbindir}/sendmail
%attr(0755,root,root) %{_sbindir}/postalias
%attr(0755,root,root) %{_sbindir}/postcat
%attr(0755,root,root) %{_sbindir}/postconf
%attr(0755,root,root) %{_sbindir}/postfix
%attr(0755,root,root) %{_sbindir}/postkick
%attr(0755,root,root) %{_sbindir}/postlock
%attr(0755,root,root) %{_sbindir}/postlog
%attr(0755,root,root) %{_sbindir}/postmap
%attr(0755,root,root) %{_sbindir}/postmulti
%attr(0755,root,root) %{_sbindir}/postsuper
%attr(0755,root,root) %{_sbindir}/qmqp-source
%attr(0755,root,root) %{_sbindir}/smtp-sink
%attr(0755,root,root) %{_sbindir}/smtp-source
%attr(0755,root,root) %{_sbindir}/mkpostfixcert
%attr(0755,root,root) %{_sbindir}/check_mail_queue
%attr(0755,root,root) %{_sbindir}/config.postfix
%{_sbindir}/rcpostfix
%{_libdir}/lib*
%{_libexecdir}/sendmail
%dir %{pf_shlib_directory}
%{pf_shlib_directory}/*[^.so]
%{pf_shlib_directory}/postfix-pcre.so
%{pf_shlib_directory}/libpostfix-dns.so
%{pf_shlib_directory}/libpostfix-global.so
%{pf_shlib_directory}/libpostfix-master.so
%{pf_shlib_directory}/libpostfix-tls.so
%{pf_shlib_directory}/libpostfix-util.so
%{pf_shlib_directory}/main.cf.proto
%{pf_shlib_directory}/master.cf.proto
%{conf_backup_dir}
%dir %attr(0700,postfix,root) %{pf_data_directory}
%exclude %{_mandir}/man5/ldap_table.5*
%exclude %{_mandir}/man5/lmdb_table.5*
%exclude %{_mandir}/man5/mysql_table.5*
%exclude %{_mandir}/man5/pgsql_table.5*
%{_mandir}/man?/*%{?ext_man}
%dir %attr(0755,root,root) /%{pf_queue_directory}
%dir %attr(0700,postfix,root) /%{pf_queue_directory}/active
%dir %attr(0700,postfix,root) /%{pf_queue_directory}/bounce
%dir %attr(0700,postfix,root) /%{pf_queue_directory}/corrupt
%dir %attr(0700,postfix,root) /%{pf_queue_directory}/defer
%dir %attr(0700,postfix,root) /%{pf_queue_directory}/deferred
%dir %attr(0700,postfix,root) /%{pf_queue_directory}/flush
%dir %attr(0700,postfix,root) /%{pf_queue_directory}/hold
%dir %attr(0700,postfix,root) /%{pf_queue_directory}/incoming
%dir %attr(0700,postfix,root) /%{pf_queue_directory}/private
%dir %attr(0700,postfix,root) /%{pf_queue_directory}/saved
%dir %attr(0700,postfix,root) /%{pf_queue_directory}/trace
%dir %attr(0730,postfix,maildrop) /%{pf_queue_directory}/maildrop
%dir %attr(0710,postfix,maildrop) /%{pf_queue_directory}/public
%if 0%{?suse_version} >= 1330
%{_sysusersdir}/postfix-user.conf
%endif
%if %{with lmdb}
%files lmdb
%{pf_shlib_directory}/postfix-lmdb.so
%{_mandir}/man5/lmdb_table.5%{?ext_man}
%endif
%changelog

View File

@ -1,46 +1,8 @@
--- conf/main.cf-orig 2020-11-26 19:22:10.273349060 +0100 Index: conf/main.cf
+++ conf/main.cf 2020-11-26 19:22:57.917974110 +0100 ===================================================================
@@ -278,7 +278,7 @@ --- conf/main.cf.orig
# +++ conf/main.cf
#mynetworks = 168.100.189.0/28, 127.0.0.0/8 @@ -567,6 +567,7 @@ unknown_local_recipient_reject_code = 55
#mynetworks = $config_directory/mynetworks
-#mynetworks = hash:/etc/postfix/network_table
+#mynetworks = lmdb:/etc/postfix/network_table
# The relay_domains parameter restricts what destinations this system will
# relay mail to. See the smtpd_recipient_restrictions description in
@@ -343,7 +343,7 @@
# In the left-hand side, specify an @domain.tld wild-card, or specify
# a user@domain.tld address.
#
-#relay_recipient_maps = hash:/etc/postfix/relay_recipients
+#relay_recipient_maps = lmdb:/etc/postfix/relay_recipients
# INPUT RATE CONTROL
#
@@ -398,8 +398,8 @@
# "postfix reload" to eliminate the delay.
#
#alias_maps = dbm:/etc/aliases
-#alias_maps = hash:/etc/aliases
-#alias_maps = hash:/etc/aliases, nis:mail.aliases
+#alias_maps = lmdb:/etc/aliases
+#alias_maps = lmdb:/etc/aliases, nis:mail.aliases
#alias_maps = netinfo:/aliases
# The alias_database parameter specifies the alias database(s) that
@@ -409,8 +409,8 @@
#
#alias_database = dbm:/etc/aliases
#alias_database = dbm:/etc/mail/aliases
-#alias_database = hash:/etc/aliases
-#alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases
+#alias_database = lmdb:/etc/aliases
+#alias_database = lmdb:/etc/aliases, lmdb:/opt/majordomo/aliases
# ADDRESS EXTENSIONS (e.g., user+foo)
#
@@ -567,6 +567,7 @@
# #
#smtpd_banner = $myhostname ESMTP $mail_name #smtpd_banner = $myhostname ESMTP $mail_name
#smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) #smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
@ -48,7 +10,7 @@
# PARALLEL DELIVERY TO THE SAME DESTINATION # PARALLEL DELIVERY TO THE SAME DESTINATION
# #
@@ -673,4 +674,140 @@ @@ -673,4 +674,140 @@ sample_directory =
# readme_directory: The location of the Postfix README files. # readme_directory: The location of the Postfix README files.
# #
readme_directory = readme_directory =
@ -135,7 +97,7 @@
+smtp_tls_CApath = +smtp_tls_CApath =
+smtp_tls_cert_file = +smtp_tls_cert_file =
+smtp_tls_key_file = +smtp_tls_key_file =
+#smtp_tls_policy_maps = lmdb:/etc/postfix/tls_policy +#smtp_tls_policy_maps = hash:/etc/postfix/tls_policy
+#smtp_tls_session_cache_timeout = 3600s +#smtp_tls_session_cache_timeout = 3600s
+smtp_tls_session_cache_database = +smtp_tls_session_cache_database =
+ +
@ -151,9 +113,9 @@
+############################################################ +############################################################
+# Start MySQL from postfixwiki.org +# Start MySQL from postfixwiki.org
+############################################################ +############################################################
+relay_domains = $mydestination, lmdb:/etc/postfix/relay +relay_domains = $mydestination, hash:/etc/postfix/relay
+#virtual_alias_domains = +#virtual_alias_domains =
+#virtual_alias_maps = lmdb:/etc/postfix/virtual +#virtual_alias_maps = hash:/etc/postfix/virtual
+#virtual_uid_maps = static:303 +#virtual_uid_maps = static:303
+#virtual_gid_maps = static:303 +#virtual_gid_maps = static:303
+#virtual_minimum_uid = 303 +#virtual_minimum_uid = 303
@ -169,9 +131,9 @@
+#virtual_mailbox_limit_override = yes +#virtual_mailbox_limit_override = yes
+### Needs Maildir++ compatible IMAP servers, like Courier-IMAP +### Needs Maildir++ compatible IMAP servers, like Courier-IMAP
+#virtual_maildir_filter = yes +#virtual_maildir_filter = yes
+#virtual_maildir_filter_maps = lmdb:/etc/postfix/vfilter +#virtual_maildir_filter_maps = hash:/etc/postfix/vfilter
+#virtual_maildir_limit_message = Sorry, the user's maildir has overdrawn his diskspace quota, please try again later. +#virtual_maildir_limit_message = Sorry, the user's maildir has overdrawn his diskspace quota, please try again later.
+#virtual_maildir_limit_message_maps = lmdb:/etc/postfix/vmsg +#virtual_maildir_limit_message_maps = hash:/etc/postfix/vmsg
+#virtual_overquota_bounce = yes +#virtual_overquota_bounce = yes
+#virtual_trash_count = yes +#virtual_trash_count = yes
+#virtual_trash_name = ".Trash" +#virtual_trash_name = ".Trash"

View File

@ -1,81 +1,3 @@
-------------------------------------------------------------------
Wed Jan 27 15:14:50 UTC 2021 - Peter Varkoly <varkoly@suse.com>
- bsc#1180473 - [Build 20201230] postfix has invalid default config
Fixing config.postfix and sysconfig.postfix
-------------------------------------------------------------------
Mon Jan 25 10:28:26 UTC 2021 - Paolo Stivanin <info@paolostivanin.com>
- Update to 3.5.9
* improves the reporting of DNSSEC problems that may affect
DANE security
-------------------------------------------------------------------
Thu Jan 7 12:26:08 UTC 2021 - Arjen de Korte <suse+build@de-korte.org>
- Only do the conversion from the hash/btree databases to lmdb when
the default database type changes from hash to lmdb and do not
stop and start the service (the old compiled databases can live
together with the new ones)
- convert-bdb-to-lmdb.sh
- Clean up the specfile
* Remove < 1330 conditional builds
* Use generated postfix-files instead of the obsolete one from
postfix-SUSE.tar.gz
* Use dynamicmaps.cf.d instead of modifying dynamicmaps.cf upon
(de)installation of optional mysql, pgsql and ldap subpackages
* Use default location for post-install, postfix-tls-script,
postfix-wrapper and postmulti-script
-------------------------------------------------------------------
Mon Jan 4 12:17:03 UTC 2021 - Peter Varkoly <varkoly@suse.com>
- Set lmdb to be the default db.
- Convert btree tables to lmdb too. Stop postfix before converting from
bdb to lmdb
- This package is without bdb support. That's why convert must be done
without any suse release condition.
o remove patch postfix-no-btree.patch
o add set-default-db-type.patch
-------------------------------------------------------------------
Fri Dec 25 20:32:04 UTC 2020 - Arjen de Korte <suse+build@de-korte.org>
- Set database type for address_verify_map and postscreen_cache_map
to lmdb (btree requires Berkeley DB)
o add postfix-no-btree.patch
-------------------------------------------------------------------
Fri Dec 25 10:28:30 UTC 2020 - Arjen de Korte <suse+build@de-korte.org>
- Set default database type to lmdb and fix update_postmaps script
-------------------------------------------------------------------
Thu Dec 24 14:09:32 UTC 2020 - Arjen de Korte <suse+build@de-korte.org>
- Use variable substition instead of sed to remove .db suffix and
substitute hash: for lmdb: in /etc/postfix/master.cf as well.
Check before substitution if there is something to do (to keep
rpmcheck happy).
-------------------------------------------------------------------
Tue Dec 8 13:36:35 UTC 2020 - Peter Varkoly <varkoly@suse.com>
- bsc#1176650 L3: What is regularly triggering the "fillup"
command and changing modify-time of /etc/sysconfig/postfix?
o Remove miss placed fillup_only call from %verifyscript
-------------------------------------------------------------------
Thu Nov 26 15:30:10 UTC 2020 - Peter Varkoly <varkoly@suse.com>
- Remove Berkeley DB dependency (JIRA#SLE-12191)
The pacakges postfix is build without Berkely DB support.
lmdb will be used instead of BDB.
The pacakges postfix-bdb is build with Berkely DB support.
o add patch for main.cf for postfix-bdb package
postfix-bdb-main.cf.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Nov 8 20:59:23 UTC 2020 - Michael Ströder <michael@stroeder.com> Sun Nov 8 20:59:23 UTC 2020 - Michael Ströder <michael@stroeder.com>

View File

@ -31,7 +31,15 @@
%define pf_html_directory %{_docdir}/%{name}-doc/html %define pf_html_directory %{_docdir}/%{name}-doc/html
%define pf_sample_directory %{_docdir}/%{name}-doc/samples %define pf_sample_directory %{_docdir}/%{name}-doc/samples
%define pf_data_directory %{_localstatedir}/lib/%{name} %define pf_data_directory %{_localstatedir}/lib/%{name}
%define pf_database_convert %{_rundir}/%{name}-needs-convert %if 0%{?suse_version} < 1330
%define pf_uid 51
%define pf_gid 51
%define maildrop_gid 59
%define vmusr vmail
%define vmgid 303
%define vmid 303
%define vmdir /srv/maildirs
%endif
%define mail_group mail %define mail_group mail
%define conf_backup_dir %{_localstatedir}/adm/backup/%{name} %define conf_backup_dir %{_localstatedir}/adm/backup/%{name}
%define unitdir %{_prefix}/lib/systemd %define unitdir %{_prefix}/lib/systemd
@ -39,10 +47,16 @@
%if ! %{defined _fillupdir} %if ! %{defined _fillupdir}
%define _fillupdir %{_localstatedir}/adm/fillup-templates %define _fillupdir %{_localstatedir}/adm/fillup-templates
%endif %endif
%if 0%{?suse_version} >= 1320 || ( 0%{?suse_version} == 1315 && 0%{?is_opensuse} )
%bcond_without lmdb
%bcond_without libnsl %bcond_without libnsl
%else
%bcond_with lmdb
%bcond_with libnsl
%endif
%bcond_without ldap %bcond_without ldap
Name: postfix Name: postfix
Version: 3.5.9 Version: 3.5.8
Release: 0 Release: 0
Summary: A fast, secure, and flexible mailer Summary: A fast, secure, and flexible mailer
License: IPL-1.0 OR EPL-2.0 License: IPL-1.0 OR EPL-2.0
@ -68,10 +82,9 @@ Patch7: %{name}-ssl-release-buffers.patch
Patch8: %{name}-vda-v14-3.0.3.patch Patch8: %{name}-vda-v14-3.0.3.patch
Patch9: fix-postfix-script.patch Patch9: fix-postfix-script.patch
Patch10: %{name}-avoid-infinit-loop-if-no-permission.patch Patch10: %{name}-avoid-infinit-loop-if-no-permission.patch
Patch11: set-default-db-type.patch
BuildRequires: ca-certificates BuildRequires: ca-certificates
BuildRequires: cyrus-sasl-devel BuildRequires: cyrus-sasl-devel
#BuildRequires: db-devel BuildRequires: db-devel
BuildRequires: diffutils BuildRequires: diffutils
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: libicu-devel BuildRequires: libicu-devel
@ -81,7 +94,6 @@ BuildRequires: mysql-devel
%if %{with ldap} %if %{with ldap}
BuildRequires: openldap2-devel BuildRequires: openldap2-devel
%endif %endif
BuildRequires: lmdb-devel
BuildRequires: pcre-devel BuildRequires: pcre-devel
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: postgresql-devel BuildRequires: postgresql-devel
@ -94,19 +106,23 @@ Requires(pre): %fillup_prereq
Requires(pre): permissions Requires(pre): permissions
Conflicts: exim Conflicts: exim
Conflicts: sendmail Conflicts: sendmail
Conflicts: postfix-bdb
Provides: postfix-lmdb = %{version}-%{release}
Obsoletes: postfix-lmdb < %{version}-%{release}
Provides: smtp_daemon Provides: smtp_daemon
%{?systemd_ordering} %{?systemd_ordering}
%if %{with lmdb}
BuildRequires: lmdb-devel
%endif
%if %{with libnsl} %if %{with libnsl}
BuildRequires: libnsl-devel BuildRequires: libnsl-devel
%endif %endif
%if 0%{?suse_version} >= 1330
BuildRequires: sysuser-tools BuildRequires: sysuser-tools
Requires: system-user-nobody Requires: system-user-nobody
Requires: group(%{mail_group}) Requires: group(%{mail_group})
Requires(pre): group(%{mail_group}) Requires(pre): group(%{mail_group})
%sysusers_requires %sysusers_requires
%else
Requires(pre): shadow
%endif
%description %description
Postfix aims to be an alternative to the widely-used sendmail program. Postfix aims to be an alternative to the widely-used sendmail program.
@ -132,7 +148,11 @@ This package contains the documentation for %{name}
Summary: Postfix plugin to support MySQL maps Summary: Postfix plugin to support MySQL maps
Group: Productivity/Networking/Email/Servers Group: Productivity/Networking/Email/Servers
Requires(pre): %{name} = %{version} Requires(pre): %{name} = %{version}
%if 0%{?suse_version} >= 1330
%sysusers_requires %sysusers_requires
%else
Requires(pre): shadow
%endif
%description mysql %description mysql
Postfix plugin to support MySQL maps. This library will be loaded by Postfix plugin to support MySQL maps. This library will be loaded by
@ -160,6 +180,18 @@ This provides support for LDAP maps in Postfix. If you plan to use LDAP
maps with Postfix, you need this. maps with Postfix, you need this.
%endif %endif
%if %{with lmdb}
%package lmdb
Summary: Postfix plugin to support LMDB maps
Group: Productivity/Networking/Email/Servers
Requires(pre): %{name} = %{version}
%description lmdb
Postfix plugin to support LMDB maps. This library will be loaded
by starting %{name} if you'll access a postmap which is stored in
PostgreSQL.
%endif
%prep %prep
%setup -q -a 2 -a 3 %setup -q -a 2 -a 3
%patch1 %patch1
@ -172,7 +204,6 @@ maps with Postfix, you need this.
%patch8 %patch8
%patch9 %patch9
%patch10 %patch10
%patch11
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
@ -218,15 +249,15 @@ else
export AUXLIBS_PGSQL="-lpq" export AUXLIBS_PGSQL="-lpq"
fi fi
# #
%if %{with lmdb}
export CCARGS="${CCARGS} -DHAS_LMDB -I/usr/local/include" \ export CCARGS="${CCARGS} -DHAS_LMDB -I/usr/local/include" \
export AUXLIBS_LMDB="-llmdb" export AUXLIBS_LMDB="-llmdb"
%endif
# #
# TODO # TODO
#export AUXLIBS_SQLITE #export AUXLIBS_SQLITE
#export AUXLIBS_CDB #export AUXLIBS_CDB
#export AUXLIBS_SDBM #export AUXLIBS_SDBM
# Remove berkeley DB and set lmdb as default
export CCARGS="${CCARGS} -DNO_DB -DDEF_DB_TYPE=\\\"lmdb\\\""
export PIE=-pie export PIE=-pie
# using SHLIB_RPATH to specify unrelated linker flags, because LDFLAGS is # using SHLIB_RPATH to specify unrelated linker flags, because LDFLAGS is
@ -237,14 +268,17 @@ make makefiles pie=yes shared=yes dynamicmaps=yes \
config_directory=%{_sysconfdir}/%{name} \ config_directory=%{_sysconfdir}/%{name} \
SHLIB_RPATH="-Wl,-rpath,%{pf_shlib_directory} -Wl,-z,relro,-z,now" SHLIB_RPATH="-Wl,-rpath,%{pf_shlib_directory} -Wl,-z,relro,-z,now"
make %{?_smp_mflags} make %{?_smp_mflags}
%if 0%{?suse_version} >= 1330
# Create postfix user # Create postfix user
%sysusers_generate_pre %{SOURCE12} postfix %sysusers_generate_pre %{SOURCE12} postfix
%sysusers_generate_pre %{SOURCE13} vmail %sysusers_generate_pre %{SOURCE13} vmail
%endif
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
%install %install
mkdir -p %{buildroot}/%{_libdir} mkdir -p %{buildroot}/%{_libdir}
mkdir -p %{buildroot}%{_sysconfdir}/%{name} mkdir -p %{buildroot}%{_sysconfdir}/%{name}
cp conf/* %{buildroot}%{_sysconfdir}/%{name}
# create our default postfix ssl DIR (/etc/postfix/ssl) # create our default postfix ssl DIR (/etc/postfix/ssl)
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/ssl/certs mkdir -p %{buildroot}%{_sysconfdir}/%{name}/ssl/certs
# link cacerts to /etc/ssl/certs # link cacerts to /etc/ssl/certs
@ -293,6 +327,7 @@ sed -e 's;@lib@;%{_lib};g' \
-e 's;@sample_directory@;%{pf_sample_directory};' \ -e 's;@sample_directory@;%{pf_sample_directory};' \
-e 's;@mailq_path@;%{pf_mailq_path};' %{name}-SUSE/config.%{name} > %{buildroot}%{_sbindir}/config.%{name} -e 's;@mailq_path@;%{pf_mailq_path};' %{name}-SUSE/config.%{name} > %{buildroot}%{_sbindir}/config.%{name}
chmod 755 %{buildroot}%{_sbindir}/config.%{name} chmod 755 %{buildroot}%{_sbindir}/config.%{name}
install -m 644 %{name}-SUSE/dynamicmaps.cf %{buildroot}%{_sysconfdir}/%{name}/dynamicmaps.cf
install -m 644 %{name}-SUSE/ldap_aliases.cf %{buildroot}%{_sysconfdir}/%{name}/ldap_aliases.cf install -m 644 %{name}-SUSE/ldap_aliases.cf %{buildroot}%{_sysconfdir}/%{name}/ldap_aliases.cf
install -m 644 %{name}-SUSE/helo_access %{buildroot}%{_sysconfdir}/%{name}/helo_access install -m 644 %{name}-SUSE/helo_access %{buildroot}%{_sysconfdir}/%{name}/helo_access
install -m 644 %{name}-SUSE/permissions %{buildroot}%{_sysconfdir}/permissions.d/%{name} install -m 644 %{name}-SUSE/permissions %{buildroot}%{_sysconfdir}/permissions.d/%{name}
@ -332,15 +367,7 @@ cat conf/main.cf
"disable_vrfy_command = yes" \ "disable_vrfy_command = yes" \
'smtpd_banner = $myhostname ESMTP' 'smtpd_banner = $myhostname ESMTP'
#Set Permissions #Set Permissions
sed -i -e 's/\(.*ldap.*\)/#\1/g' \ install -m 644 %{name}-SUSE/%{name}-files %{buildroot}%{pf_shlib_directory}/%{name}-files
-e 's/\(.*mysql.*\)/#\1/g' \
-e 's/\(.*pgsql.*\)/#\1/g' \
-e 's/\(.*LICENSE.*\)/#\1/g' \
-e '/html_directory/d' \
-e '/manpage_directory/d' \
-e '/readme_directory/d' \
%{buildroot}%{pf_shlib_directory}/postfix-files
mkdir -p %{buildroot}%{pf_shlib_directory}/postfix-files.d
# postfix-mysql # postfix-mysql
install -m 644 %{name}-mysql/main.cf-mysql %{buildroot}%{_sysconfdir}/%{name}/main.cf-mysql install -m 644 %{name}-mysql/main.cf-mysql %{buildroot}%{_sysconfdir}/%{name}/main.cf-mysql
install -m 640 %{name}-mysql/*_maps.cf %{buildroot}%{_sysconfdir}/%{name}/ install -m 640 %{name}-mysql/*_maps.cf %{buildroot}%{_sysconfdir}/%{name}/
@ -378,101 +405,148 @@ do
rm -vf $path rm -vf $path
ln -sf %{_libdir}/$name $path ln -sf %{_libdir}/$name $path
done done
# ---------------------------------------------------------------------------
# create dynamicmaps.cf.d entries for optional modules
sed -n -e '/^#/p' -e '/mysql/p' %{buildroot}%{pf_shlib_directory}/dynamicmaps.cf > %{buildroot}%{pf_shlib_directory}/dynamicmaps.cf.d/%{name}-mysql.cf
sed -i -e '/mysql/d' %{buildroot}%{pf_shlib_directory}/dynamicmaps.cf
sed -n -e '/^#/p' -e '/pgsql/p' %{buildroot}%{pf_shlib_directory}/dynamicmaps.cf > %{buildroot}%{pf_shlib_directory}/dynamicmaps.cf.d/%{name}-pgsql.cf
sed -i -e '/pgsql/d' %{buildroot}%{pf_shlib_directory}/dynamicmaps.cf
%if %{with ldap}
sed -n -e '/^#/p' -e "/ldap/p" %{buildroot}%{pf_shlib_directory}/dynamicmaps.cf > %{buildroot}%{pf_shlib_directory}/dynamicmaps.cf.d/%{name}-ldap.cf
sed -i -e '/ldap/d' %{buildroot}%{pf_shlib_directory}/dynamicmaps.cf
%endif
install -m 755 %{SOURCE11} %{buildroot}%{_sbindir}/ install -m 755 %{SOURCE11} %{buildroot}%{_sbindir}/
%if 0%{?suse_version} >= 1330
mkdir -p %{buildroot}%{_sysusersdir} mkdir -p %{buildroot}%{_sysusersdir}
install -m 644 %{SOURCE12} %{buildroot}%{_sysusersdir}/ install -m 644 %{SOURCE12} %{buildroot}%{_sysusersdir}/
install -m 644 %{SOURCE13} %{buildroot}%{_sysusersdir}/ install -m 644 %{SOURCE13} %{buildroot}%{_sysusersdir}/
%endif
# --------------------------------------------------------------------------- %if 0%{?suse_version} >= 1330
%pre -f postfix.pre %pre -f postfix.pre
# If existing default database type is hash, we need to convert the %else
# databases because hash (and btree) is no longer supported after %pre
# the upgrade getent group %{name} >/dev/null || groupadd -g %{pf_gid} -o -r %{name}
if [ -x %{_sbindir}/postconf ]; then getent group maildrop >/dev/null || groupadd -g %{maildrop_gid} -o -r maildrop
DEF_DB_TYPE=$(postconf default_database_type) getent passwd %{name} >/dev/null || useradd -r -o -g %{name} -u %{pf_uid} -s /bin/false -c "Postfix Daemon" -d /%{pf_queue_directory} %{name}
case $DEF_DB_TYPE in *hash) usermod -a -G %{maildrop_gid},%{mail_group} %{name}
touch %{pf_database_convert} %endif
esac
fi
%service_add_pre %{name}.service %service_add_pre %{name}.service
VERSIONTEST=$(test -x usr/sbin/postconf && usr/sbin/postconf proxy_read_maps 2>/dev/null || :)
if [ -z "$VERSIONTEST" -a -f %{pf_queue_directory}/pid/master.pid ]; then
if checkproc -p %{pf_queue_directory}/pid/master.pid usr/lib/%{name}/master; then
echo "%{name} is still running. You have to stop %{name} in order to"
echo "install a newer version."
exit 1
fi
fi
# ---------------------------------------------------------------------------
%if 0%{?suse_version} >= 1330
%pre mysql -f vmail.pre
%else
%pre mysql
#echo "PARAM_pre: "$1
# on `rpm -ivh` PARAM is 1
# on `rpm -Uvh` PARAM is 2
if [ "$1" = "1" ]; then
echo "Adding %{vmusr} user"
if [ -z "`getent group %{vmusr} 2>/dev/null`" ]; then
groupadd -r -g %{vmgid} %{vmusr}
fi
if [ -z "`getent passwd %{vmusr} 2>/dev/null`" ]; then
useradd -c "maildirs chef" -d %{vmdir} -g %{vmusr} -u %{vmid} -r -s /bin/false %{vmusr}
fi
fi
%endif
# ---------------------------------------------------------------------------
%preun %preun
%stop_on_removal %{name}
%service_del_preun %{name}.service %service_del_preun %{name}.service
# ---------------------------------------------------------------------------
%preun mysql
#echo "PARAM_preun: "$1
# on `rpm -e` PARAM is 0
if [ "$1" = "0" ]; then
FILE=etc/%{name}/dynamicmaps.cf
if [ -e "$FILE" ] ; then
if grep -q "^mysql[[:space:]]" ${FILE}; then
echo "Removing mysql map entry from ${FILE}"
sed "/^mysql[[:space:]]/d" ${FILE} > ${FILE}.$$ && \
cp --remove-destination ${FILE}.$$ ${FILE} && \
rm ${FILE}.$$
fi
else
echo "Can not find \"$FILE\". Not updating the file." >&2
fi
fi
# ---------------------------------------------------------------------------
%preun postgresql
if [ "$1" = 0 ] ; then
FILE=etc/%{name}/dynamicmaps.cf
if [ -e "$FILE" ] ; then
if grep -q "^pgsql[[:space:]]" ${FILE}; then
echo "Removing pgsql map entry from ${FILE}"
sed "/^pgsql[[:space:]]/d" ${FILE} > ${FILE}.$$ && \
cp --remove-destination ${FILE}.$$ ${FILE} && \
rm ${FILE}.$$
fi
else
echo "Can not find \"$FILE\". Not updating the file." >&2
fi
fi
# ---------------------------------------------------------------------------
%post %post
# We never have to run suseconfig for postfix after installation # We never have to run suseconfig for postfix after installation
# We only start postfix own upgrade-configuration by update # We only start postfix own upgrade-configuration by update
#
# If the default database type of the previous installation was
# hash, we also need to rebuild the databases in the new lmdb
# format
if [ ${1:-0} -gt 1 ]; then if [ ${1:-0} -gt 1 ]; then
touch %{_localstatedir}/adm/%{name}.configured touch %{_localstatedir}/adm/%{name}.configured
echo "Executing upgrade-configuration." echo "Executing upgrade-configuration."
%{_sbindir}/%{name} set-permissions upgrade-configuration setgid_group=%{pf_setgid_group} || : %{_sbindir}/%{name} set-permissions upgrade-configuration setgid_group=%{pf_setgid_group} || :
if [ "$(%{_sbindir}/postconf -h daemon_directory)" != "%{pf_daemon_directory}" ]; then if [ "$(%{_sbindir}/postconf -h daemon_directory)" != "%{pf_daemon_directory}" ]; then
%{_sbindir}/postconf daemon_directory=%{pf_daemon_directory} %{_sbindir}/postconf daemon_directory=%{pf_daemon_directory}
fi fi
if [ -e %{pf_database_convert} ]; then
sed -i -E "s/(btree|hash):/lmdb:/g" %{pf_config_directory}/{main.cf,master.cf}
for i in $(find %{pf_config_directory} -name "*.db"); do
postmap ${i%.db}
done
for i in $(find %{_sysconfdir}/aliases.d/ -name "*.db"); do
postalias ${i%.db}
done
if [ -e %{_sysconfdir}/aliases.db ]; then
postalias %{_sysconfdir}/aliases
fi
rm %{pf_database_convert}
fi
fi fi
%service_add_post %{name}.service
%set_permissions %{_sbindir}/postqueue %set_permissions %{_sbindir}/postqueue
%set_permissions %{_sbindir}/postdrop %set_permissions %{_sbindir}/postdrop
%set_permissions %{_sysconfdir}/%{name}/sasl_passwd %set_permissions %{_sysconfdir}/%{name}/sasl_passwd
%set_permissions %{_sbindir}/sendmail %set_permissions %{_sbindir}/sendmail
%{fillup_only postfix} %{fillup_only postfix}
%{fillup_only -an mail} %{fillup_only -an mail}
%service_add_post %{name}.service /sbin/ldconfig
%postun
%service_del_postun %{name}.service
%verifyscript %verifyscript
%verify_permissions -e %{_sbindir}/postqueue %verify_permissions -e %{_sbindir}/postqueue
%verify_permissions -e %{_sbindir}/postdrop %verify_permissions -e %{_sbindir}/postdrop
%verify_permissions -e %{_sysconfdir}/%{name}/sasl_passwd %verify_permissions -e %{_sysconfdir}/%{name}/sasl_passwd
%verify_permissions -e %{_sbindir}/sendmail %verify_permissions -e %{_sbindir}/sendmail
%{fillup_only postfix}
%postun
%service_del_postun %{name}.service
/sbin/ldconfig
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
%pre mysql -f vmail.pre %post postgresql
FILE=etc/%{name}/dynamicmaps.cf
if ! grep -q "^pgsql[[:space:]]" ${FILE}; then
echo "Adding pgsql map entry to ${FILE}"
echo "pgsql %{pf_shlib_directory}/dict_pgsql.so dict_pgsql_open" >> ${FILE}
fi
# ---------------------------------------------------------------------------
%post mysql -p /sbin/ldconfig %post mysql
%postun mysql -p /sbin/ldconfig FILE=etc/%{name}/dynamicmaps.cf
if ! grep -q "^mysql[[:space:]]" ${FILE}; then
%post postgresql -p /sbin/ldconfig echo "Adding mysql map entry to ${FILE}"
%postun postgresql -p /sbin/ldconfig echo "mysql %{pf_shlib_directory}/dict_mysql.so dict_mysql_open" >> ${FILE}
fi
%if %{with ldap} # ---------------------------------------------------------------------------
%post ldap -p /sbin/ldconfig
%postun ldap -p /sbin/ldconfig
%endif
%files %files
%license LICENSE TLS_LICENSE %license LICENSE
%config %{_sysconfdir}/pam.d/* %config %{_sysconfdir}/pam.d/*
%{_fillupdir}/sysconfig.%{name} %{_fillupdir}/sysconfig.%{name}
%{_fillupdir}/sysconfig.mail-%{name} %{_fillupdir}/sysconfig.mail-%{name}
@ -487,19 +561,24 @@ fi
%config(noreplace) %{_sysconfdir}/%{name}/helo_access %config(noreplace) %{_sysconfdir}/%{name}/helo_access
%config(noreplace) %{_sysconfdir}/%{name}/main.cf %config(noreplace) %{_sysconfdir}/%{name}/main.cf
%config(noreplace) %{_sysconfdir}/%{name}/master.cf %config(noreplace) %{_sysconfdir}/%{name}/master.cf
%attr(0750,root,root) %config %{_sysconfdir}/%{name}/post-install
%attr(0750,root,root) %config %{_sysconfdir}/%{name}/%{name}-tls-script
%attr(0750,root,root) %config %{_sysconfdir}/%{name}/%{name}-wrapper
%attr(0750,root,root) %config %{_sysconfdir}/%{name}/postmulti-script
%config(noreplace) %{_sysconfdir}/%{name}/%{name}-files
%config(noreplace) %{_sysconfdir}/%{name}/relay %config(noreplace) %{_sysconfdir}/%{name}/relay
%config(noreplace) %{_sysconfdir}/%{name}/relay_ccerts %config(noreplace) %{_sysconfdir}/%{name}/relay_ccerts
%config(noreplace) %{_sysconfdir}/%{name}/sasl_passwd %config(noreplace) %{_sysconfdir}/%{name}/sasl_passwd
%config(noreplace) %{_sysconfdir}/%{name}/sender_canonical %config(noreplace) %{_sysconfdir}/%{name}/sender_canonical
%config(noreplace) %{_sysconfdir}/%{name}/virtual %config(noreplace) %{_sysconfdir}/%{name}/virtual
%ghost %{_sysconfdir}/%{name}/*.lmdb
%ghost %{_sysconfdir}/aliases.lmdb
%dir %{_sysconfdir}/sasl2 %dir %{_sysconfdir}/sasl2
%config(noreplace) %{_sysconfdir}/sasl2/smtpd.conf %config(noreplace) %{_sysconfdir}/sasl2/smtpd.conf
%exclude %{_sysconfdir}/%{name}/LICENSE %config %{_sysconfdir}/%{name}/LICENSE
%exclude %{_sysconfdir}/%{name}/TLS_LICENSE %config %{_sysconfdir}/%{name}/TLS_LICENSE
%config %{_sysconfdir}/permissions.d/%{name} %config %{_sysconfdir}/permissions.d/%{name}
%config %{_sysconfdir}/permissions.d/%{name}.paranoid %config %{_sysconfdir}/permissions.d/%{name}.paranoid
%attr(0644, root, root) %config %{_sysconfdir}/%{name}/makedefs.out
%{pf_shlib_directory}/%{name}-files %{pf_shlib_directory}/%{name}-files
# create our default postfix ssl DIR (/etc/postfix/ssl) # create our default postfix ssl DIR (/etc/postfix/ssl)
%dir %{_sysconfdir}/%{name}/ssl %dir %{_sysconfdir}/%{name}/ssl
@ -533,25 +612,20 @@ fi
%{_libdir}/lib* %{_libdir}/lib*
%{_libexecdir}/sendmail %{_libexecdir}/sendmail
%dir %{pf_shlib_directory} %dir %{pf_shlib_directory}
%{pf_shlib_directory}/*[^.so]
%{pf_shlib_directory}/%{name}-pcre.so %{pf_shlib_directory}/%{name}-pcre.so
%{pf_shlib_directory}/%{name}-lmdb.so
%{pf_shlib_directory}/lib%{name}-dns.so %{pf_shlib_directory}/lib%{name}-dns.so
%{pf_shlib_directory}/lib%{name}-global.so %{pf_shlib_directory}/lib%{name}-global.so
%{pf_shlib_directory}/lib%{name}-master.so %{pf_shlib_directory}/lib%{name}-master.so
%{pf_shlib_directory}/lib%{name}-tls.so %{pf_shlib_directory}/lib%{name}-tls.so
%{pf_shlib_directory}/lib%{name}-util.so %{pf_shlib_directory}/lib%{name}-util.so
%{pf_shlib_directory}/dynamicmaps.cf
%{pf_shlib_directory}/main.cf.proto %{pf_shlib_directory}/main.cf.proto
%{pf_shlib_directory}/makedefs.out
%{pf_shlib_directory}/master.cf.proto %{pf_shlib_directory}/master.cf.proto
%dir %{pf_daemon_directory}
%{pf_daemon_directory}/*
%dir %{pf_shlib_directory}/dynamicmaps.cf.d
%dir %{pf_shlib_directory}/postfix-files.d
%{conf_backup_dir} %{conf_backup_dir}
%dir %attr(0700,%{name},root) %{pf_data_directory} %dir %attr(0700,%{name},root) %{pf_data_directory}
%exclude %{_mandir}/man5/ldap_table.5* %exclude %{_mandir}/man5/ldap_table.5*
%exclude %{_mandir}/man5/lmdb_table.5*
%exclude %{_mandir}/man5/mysql_table.5* %exclude %{_mandir}/man5/mysql_table.5*
%exclude %{_mandir}/man5/pgsql_table.5* %exclude %{_mandir}/man5/pgsql_table.5*
%{_mandir}/man?/*%{?ext_man} %{_mandir}/man?/*%{?ext_man}
@ -569,7 +643,9 @@ fi
%dir %attr(0700,%{name},root) /%{pf_queue_directory}/trace %dir %attr(0700,%{name},root) /%{pf_queue_directory}/trace
%dir %attr(0730,%{name},maildrop) /%{pf_queue_directory}/maildrop %dir %attr(0730,%{name},maildrop) /%{pf_queue_directory}/maildrop
%dir %attr(0710,%{name},maildrop) /%{pf_queue_directory}/public %dir %attr(0710,%{name},maildrop) /%{pf_queue_directory}/public
%if 0%{?suse_version} >= 1330
%{_sysusersdir}/postfix-user.conf %{_sysusersdir}/postfix-user.conf
%endif
%files devel %files devel
%{_includedir}/%{name}/ %{_includedir}/%{name}/
@ -583,21 +659,26 @@ fi
%config(noreplace) %attr(640, root, %{name}) %{_sysconfdir}/%{name}/*_maps.cf %config(noreplace) %attr(640, root, %{name}) %{_sysconfdir}/%{name}/*_maps.cf
%config(noreplace) %{_sysconfdir}/%{name}/main.cf-mysql %config(noreplace) %{_sysconfdir}/%{name}/main.cf-mysql
%{pf_shlib_directory}/%{name}-mysql.so %{pf_shlib_directory}/%{name}-mysql.so
%{pf_shlib_directory}/dynamicmaps.cf.d/%{name}-mysql.cf
%{_mandir}/man5/mysql_table.5%{?ext_man} %{_mandir}/man5/mysql_table.5%{?ext_man}
%if 0%{?suse_version} >= 1330
%{_sysusersdir}/postfix-vmail-user.conf %{_sysusersdir}/postfix-vmail-user.conf
%endif
%files postgresql %files postgresql
%{pf_shlib_directory}/%{name}-pgsql.so %{pf_shlib_directory}/%{name}-pgsql.so
%{pf_shlib_directory}/dynamicmaps.cf.d/%{name}-pgsql.cf
%{_mandir}/man5/pgsql_table.5%{?ext_man} %{_mandir}/man5/pgsql_table.5%{?ext_man}
%if %{with ldap} %if %{with ldap}
%files ldap %files ldap
%config(noreplace) %{_sysconfdir}/%{name}/ldap_aliases.cf %config(noreplace) %{_sysconfdir}/%{name}/ldap_aliases.cf
%{pf_shlib_directory}/%{name}-ldap.so %{pf_shlib_directory}/%{name}-ldap.so
%{pf_shlib_directory}/dynamicmaps.cf.d/%{name}-ldap.cf
%{_mandir}/man5/ldap_table.5%{?ext_man} %{_mandir}/man5/ldap_table.5%{?ext_man}
%endif %endif
%if %{with lmdb}
%files lmdb
%{pf_shlib_directory}/%{name}-lmdb.so
%{_mandir}/man5/lmdb_table.5%{?ext_man}
%endif
%changelog %changelog

View File

@ -1,8 +0,0 @@
#!/bin/bash
echo -n "Generating postfix-bdb "
cp postfix.changes postfix-bdb.changes
VERSION=$(awk '/^Version/ {print $2; exit;} {next;};' < postfix.spec)
perl -pi -e "s/^Version:.*/Version: $VERSION/" postfix-bdb.spec
echo "Done."

View File

@ -1,179 +0,0 @@
--- src/util/sys_defs.h.orig 2021-01-04 13:12:06.272285413 +0100
+++ src/util/sys_defs.h 2021-01-04 13:12:38.412720371 +0100
@@ -51,7 +51,7 @@
#define HAS_FSYNC
#define HAS_DB
#define HAS_SA_LEN
-#define NATIVE_DB_TYPE "hash"
+#define NATIVE_DB_TYPE "lmdb"
#if (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 104250000)
#define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/mail/aliases" /* sendmail 8.10 */
#endif
@@ -232,7 +232,7 @@
#define HAS_FSYNC
#define HAS_DB
#define HAS_SA_LEN
-#define NATIVE_DB_TYPE "hash"
+#define NATIVE_DB_TYPE "lmdb"
#define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/aliases"
#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0)
#define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin"
@@ -289,7 +289,7 @@
#define HAS_FSYNC
/* might be set by makedef */
#ifdef HAS_DB
-#define NATIVE_DB_TYPE "hash"
+#define NATIVE_DB_TYPE "lmdb"
#define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/aliases"
#else
#define HAS_DBM
@@ -761,7 +761,7 @@
#define DEF_MAILBOX_LOCK "fcntl, dotlock" /* RedHat >= 4.x */
#define HAS_FSYNC
#define HAS_DB
-#define NATIVE_DB_TYPE "hash"
+#define NATIVE_DB_TYPE "lmdb"
#define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/aliases"
#ifndef NO_NIS
#define HAS_NIS
@@ -841,7 +841,7 @@
#define DEF_MAILBOX_LOCK "dotlock" /* verified RedHat 3.03 */
#define HAS_FSYNC
#define HAS_DB
-#define NATIVE_DB_TYPE "hash"
+#define NATIVE_DB_TYPE "lmdb"
#define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/aliases"
#ifndef NO_NIS
#define HAS_NIS
@@ -874,7 +874,7 @@
#define DEF_MAILBOX_LOCK "fcntl, dotlock" /* RedHat >= 4.x */
#define HAS_FSYNC
#define HAS_DB
-#define NATIVE_DB_TYPE "hash"
+#define NATIVE_DB_TYPE "lmdb"
#define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/aliases"
#ifndef NO_NIS
#define HAS_NIS
@@ -1199,7 +1199,7 @@
#define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL
#define DEF_MAILBOX_LOCK "fcntl, dotlock"
#define HAS_FSYNC
-#define NATIVE_DB_TYPE "hash"
+#define NATIVE_DB_TYPE "lmdb"
#define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/aliases"
/* Uncomment the following line if you have NIS package installed */
/* #define HAS_NIS */
--- src/global/mail_params.h.orig 2020-05-09 17:51:27.000000000 +0200
+++ src/global/mail_params.h 2020-12-25 21:04:11.428544623 +0100
@@ -2826,7 +2826,7 @@ extern int var_vrfy_pend_limit;
extern char *var_verify_service;
#define VAR_VERIFY_MAP "address_verify_map"
-#define DEF_VERIFY_MAP "btree:$data_directory/verify_cache"
+#define DEF_VERIFY_MAP "lmdb:$data_directory/verify_cache"
extern char *var_verify_map;
#define VAR_VERIFY_POS_EXP "address_verify_positive_expire_time"
@@ -3594,7 +3594,7 @@ extern char *var_multi_cntrl_cmds;
* postscreen(8)
*/
#define VAR_PSC_CACHE_MAP "postscreen_cache_map"
-#define DEF_PSC_CACHE_MAP "btree:$data_directory/postscreen_cache"
+#define DEF_PSC_CACHE_MAP "lmdb:$data_directory/postscreen_cache"
extern char *var_psc_cache_map;
#define VAR_SMTPD_SERVICE "smtpd_service_name"
--- man/man1/postmap.1.orig 2021-01-05 10:57:44.915488687 +0100
+++ man/man1/postmap.1 2021-01-05 11:10:12.377571721 +0100
@@ -63,7 +63,7 @@
By default the lookup key is mapped to lowercase to make
the lookups case insensitive; as of Postfix 2.3 this case
folding happens only with tables whose lookup keys are
-fixed\-case strings such as btree:, dbm: or hash:. With
+fixed\-case strings such as dbm:. With
earlier versions, the lookup key is folded even with tables
where a lookup field can match both upper and lower case
text, such as regexp: and pcre:. This resulted in loss of
@@ -210,9 +210,9 @@
The \fBpostmap\fR(1) command can query any supported file type,
but it can create only the following file types:
.RS
-.IP \fBbtree\fR
-The output file is a btree file, named \fIfile_name\fB.db\fR.
-This is available on systems with support for \fBdb\fR databases.
+.IP \fBlmdb\fR
+The output file is a lmdb file, named \fIfile_name\fB.lmdb\fR.
+This is available on systems with support for \fBlmdb\fR databases.
.IP \fBcdb\fR
The output consists of one file, named \fIfile_name\fB.cdb\fR.
This is available on systems with support for \fBcdb\fR databases.
@@ -220,9 +220,6 @@
The output consists of two files, named \fIfile_name\fB.pag\fR and
\fIfile_name\fB.dir\fR.
This is available on systems with support for \fBdbm\fR databases.
-.IP \fBhash\fR
-The output file is a hashed file, named \fIfile_name\fB.db\fR.
-This is available on systems with support for \fBdb\fR databases.
.IP \fBfail\fR
A table that reliably fails all requests. The lookup table
name is used for logging only. This table exists to simplify
@@ -267,12 +264,6 @@
this program.
The text below provides only a parameter summary. See
\fBpostconf\fR(5) for more details including examples.
-.IP "\fBberkeley_db_create_buffer_size (16777216)\fR"
-The per\-table I/O buffer size for programs that create Berkeley DB
-hash or btree tables.
-.IP "\fBberkeley_db_read_buffer_size (131072)\fR"
-The per\-table I/O buffer size for programs that read Berkeley DB
-hash or btree tables.
.IP "\fBconfig_directory (see 'postconf -d' output)\fR"
The default location of the Postfix main.cf and master.cf
configuration files.
--- man/man1/postalias.1.orig 2021-01-05 10:58:04.579753235 +0100
+++ man/man1/postalias.1 2021-01-05 11:08:10.135919006 +0100
@@ -34,7 +34,7 @@
By default the lookup key is mapped to lowercase to make
the lookups case insensitive; as of Postfix 2.3 this case
folding happens only with tables whose lookup keys are
-fixed\-case strings such as btree:, dbm: or hash:. With
+fixed\-case strings such as dbm:. With
earlier versions, the lookup key is folded even with tables
where a lookup field can match both upper and lower case
text, such as regexp: and pcre:. This resulted in loss of
@@ -122,9 +122,9 @@
The \fBpostalias\fR(1) command can query any supported file type,
but it can create only the following file types:
.RS
-.IP \fBbtree\fR
-The output is a btree file, named \fIfile_name\fB.db\fR.
-This is available on systems with support for \fBdb\fR databases.
+.IP \fBlmdb\fR
+The output is a lmdb file, named \fIfile_name\fB.lmdb\fR.
+This is available on systems with support for \fBlmdb\fR databases.
.IP \fBcdb\fR
The output is one file named \fIfile_name\fB.cdb\fR.
This is available on systems with support for \fBcdb\fR databases.
@@ -132,9 +132,6 @@
The output consists of two files, named \fIfile_name\fB.pag\fR and
\fIfile_name\fB.dir\fR.
This is available on systems with support for \fBdbm\fR databases.
-.IP \fBhash\fR
-The output is a hashed file, named \fIfile_name\fB.db\fR.
-This is available on systems with support for \fBdb\fR databases.
.IP \fBfail\fR
A table that reliably fails all requests. The lookup table
name is used for logging only. This table exists to simplify
@@ -187,12 +184,6 @@
.IP "\fBconfig_directory (see 'postconf -d' output)\fR"
The default location of the Postfix main.cf and master.cf
configuration files.
-.IP "\fBberkeley_db_create_buffer_size (16777216)\fR"
-The per\-table I/O buffer size for programs that create Berkeley DB
-hash or btree tables.
-.IP "\fBberkeley_db_read_buffer_size (131072)\fR"
-The per\-table I/O buffer size for programs that read Berkeley DB
-hash or btree tables.
.IP "\fBdefault_database_type (see 'postconf -d' output)\fR"
The default database type for use in \fBnewaliases\fR(1), \fBpostalias\fR(1)
and \fBpostmap\fR(1) commands.