Sync from SUSE:SLFO:Main postfix revision 41121cdae5e2e08657cdbd7c08cbd75d

This commit is contained in:
Adrian Schröter 2024-05-03 19:33:32 +02:00
commit 1fb5189ec3
28 changed files with 15032 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

4
_multibuild Normal file
View File

@ -0,0 +1,4 @@
<multibuild>
<package>postfix-bdb</package>
</multibuild>

24
check_mail_queue Normal file
View File

@ -0,0 +1,24 @@
#!/bin/bash
nm()
{
NM=$( /usr/bin/mailq 2> /dev/null | tail -1 | /usr/bin/gawk '{ print $5 }' )
if [ "$NM" ]
then
return 0
else
return 1
fi
}
test -e /var/run/check_mail_queue.pid && exit;
echo $$ > /var/run/check_mail_queue.pid
while( nm )
do
/etc/init.d/postfix status || /etc/init.d/postfix start
sleep 10
/usr/sbin/postfix flush
done
/etc/init.d/postfix status && /etc/init.d/postfix stop
rm /var/run/check_mail_queue.pid

24
fix-postfix-script.patch Normal file
View File

@ -0,0 +1,24 @@
Index: conf/postfix-script
===================================================================
--- conf/postfix-script.orig
+++ conf/postfix-script
@@ -311,10 +311,17 @@ check-warn)
}
todo=`echo "$todo" | tr ' ' '\12' | sort -u`
- find $todo ! -user root \
+ if find -L $config_directory/main.cf >/dev/null 2>&1
+ then
+ FIND="find -L"
+ else
+ FIND=find
+ fi
+
+ $FIND $todo ! -user root \
-exec $WARN not owned by root: {} \;
- find $todo \( -perm -020 -o -perm -002 \) \
+ $FIND $todo \( -perm -020 -o -perm -002 \) \
-exec $WARN group or other writable: {} \;
# Check Postfix mail_owner-owned directory tree owner/permissions.

12
ipv6_disabled.patch Normal file
View File

@ -0,0 +1,12 @@
Index: src/util/inet_proto.c
===================================================================
--- src/util/inet_proto.c.orig
+++ src/util/inet_proto.c
@@ -200,7 +200,6 @@ const INET_PROTO_INFO *inet_proto_init(c
if ((sock = socket(PF_INET6, SOCK_STREAM, 0)) >= 0) {
close(sock);
} else if (errno == EAFNOSUPPORT || errno == EPROTONOSUPPORT) {
- msg_warn("%s: disabling IPv6 name/address support: %m", context);
inet_proto_mask &= ~INET_PROTO_MASK_IPV6;
} else {
msg_fatal("socket: %m");

59
pointer_to_literals.patch Normal file
View File

@ -0,0 +1,59 @@
Index: src/cleanup/cleanup_message.c
===================================================================
--- src/cleanup/cleanup_message.c.orig
+++ src/cleanup/cleanup_message.c
@@ -300,7 +300,7 @@ static const char *cleanup_act(CLEANUP_S
while (*optional_text && ISSPACE(*optional_text))
optional_text++;
-#define STREQUAL(x,y,l) (strncasecmp((x), (y), (l)) == 0 && (y)[l] == 0)
+inline int STREQUAL(const char *x, const char *y, size_t l) { return (strncasecmp((x), (y), (l)) == 0 && (y)[l] == 0); }
#define CLEANUP_ACT_DROP 0
/*
Index: src/local/local_expand.c
===================================================================
--- src/local/local_expand.c.orig
+++ src/local/local_expand.c
@@ -115,7 +115,7 @@ static const char *local_expand_lookup(c
LOCAL_EXP *local = (LOCAL_EXP *) ptr;
static char rcpt_delim[2];
-#define STREQ(x,y) (*(x) == *(y) && strcmp((x), (y)) == 0)
+inline int STREQ(const char *x, const char *y) { return (*(x) == *(y) && strcmp((x), (y)) == 0); }
if (STREQ(name, "user")) {
return (local->state->msg_attr.user);
Index: src/smtpd/smtpd_check.c
===================================================================
--- src/smtpd/smtpd_check.c.orig
+++ src/smtpd/smtpd_check.c
@@ -384,6 +384,10 @@ static STRING_LIST *smtpd_acl_perm_log;
#define CONST_STR(x) ((const char *) vstring_str(x))
#define UPDATE_STRING(ptr,val) { if (ptr) myfree(ptr); ptr = mystrdup(val); }
+inline int STREQ(const char *x, const char *y) { return (*(x) == *(y) && strcmp((x), (y)) == 0); }
+inline int STREQUAL(const char *x, const char *y, size_t l) { return (strncasecmp((x), (y), (l)) == 0 && (y)[l] == 0); }
+inline int STREQN(const char *x, const char *y, size_t n) { return (*(x) == *(y) && strncmp((x), (y), (n)) == 0); }
+
/*
* If some decision can't be made due to a temporary error, then change
* other decisions into deferrals.
@@ -2395,8 +2399,6 @@ static int check_table_result(SMTPD_STAT
if (msg_verbose)
msg_info("%s: %s %s %s", myname, table, value, datum);
-#define STREQUAL(x,y,l) (strncasecmp((x), (y), (l)) == 0 && (y)[l] == 0)
-
/*
* DUNNO means skip this table. Silently ignore optional text.
*/
@@ -3483,8 +3485,6 @@ static const char *rbl_expand_lookup(con
SMTPD_RBL_EXPAND_CONTEXT *rbl_exp = (SMTPD_RBL_EXPAND_CONTEXT *) context;
SMTPD_STATE *state = rbl_exp->state;
-#define STREQ(x,y) (*(x) == *(y) && strcmp((x), (y)) == 0)
-
if (state->expand_buf == 0)
state->expand_buf = vstring_alloc(10);

BIN
postfix-3.8.3.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

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

@ -0,0 +1,7 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)
iFcDBQBlQoZrDAtZDoDKFacRCkFKAP97Os5swzwx9v0ZSeoJpbNC/aC8+pWcZ2kv
1kBEXC+7BwD9G4T6xOjzFUGx/yvjOSxeyQRURNdAcDn1MBEDnIJZcSw=
=s3oc
-----END PGP SIGNATURE-----

BIN
postfix-SUSE.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,19 @@
Index: src/global/mail_queue.c
===================================================================
--- src/global/mail_queue.c.orig
+++ src/global/mail_queue.c
@@ -363,6 +363,14 @@ VSTREAM *mail_queue_enter(const char *qu
break;
if (errno == EEXIST || errno == EISDIR)
continue;
+ /*
+ * Avoid getting into an infinite loop when we don't have permission to
+ * read temp_path
+ */
+ if (errno == EACCES) {
+ msg_fatal("%s: create file %s: no permission", myname, STR(temp_path));
+ break;
+ }
msg_warn("%s: create file %s: %m", myname, STR(temp_path));
sleep(10);
}

153
postfix-bdb-main.cf.patch Normal file
View File

@ -0,0 +1,153 @@
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
+

5668
postfix-bdb.changes Normal file

File diff suppressed because it is too large Load Diff

571
postfix-bdb.spec Normal file
View File

@ -0,0 +1,571 @@
#
# spec file for package postfix-bdb
#
# Copyright (c) 2023 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
%else
%bcond_with lmdb
%endif
%if 0%{?suse_version} >= 1320 && 0%{?suse_version} < 1599
%bcond_without libnsl
%else
%bcond_with libnsl
%endif
%bcond_without ldap
Name: postfix-bdb
Version: 3.8.3
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 >= 1.1.1
BuildRequires: m4
BuildRequires: mysql-devel
%if %{with ldap}
BuildRequires: openldap2-devel
%endif
BuildRequires: pcre2-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(pre): user(nobody)
Requires(pre): group(%{mail_group})
%sysusers_requires
%else
Requires(pre): shadow
%endif
# /usr/lib/postfix/bin//post-install: line 667: ed: command not found
Requires(pre): ed
Requires(preun): ed
Requires(post): ed
Requires(postun): ed
# /usr/sbin/config.postfix needs perl
Requires(pre): perl
Requires(preun): perl
Requires(post): perl
Requires(postun): perl
%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 %{without libnsl}
export CCARGS="${CCARGS} -DNO_NIS"
%endif
#
%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=2"
export AUXLIBS_PCRE="-lpcre2-8"
#
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 postfix-user.conf
%sysusers_generate_pre %{SOURCE13} vmail postfix-vmail-user.conf
%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
mkdir -p %{buildroot}/var/spool/mail
ln -s spool/mail %{buildroot}/var/mail
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}/postdrop
%set_permissions %{_sbindir}/postlog
%set_permissions %{_sbindir}/postqueue
%set_permissions %{_sysconfdir}/postfix/sasl_passwd
%set_permissions %{_sbindir}/sendmail
%{fillup_only postfix}
%{fillup_only -an mail}
/sbin/ldconfig
%verifyscript
%verify_permissions -e %{_sbindir}/postdrop
%verify_permissions -e %{_sbindir}/postlog
%verify_permissions -e %{_sbindir}/postqueue
%verify_permissions -e %{_sysconfdir}/postfix/sasl_passwd
%verify_permissions -e %{_sbindir}/sendmail
%postun
%service_del_postun postfix.service
/sbin/ldconfig
# ---------------------------------------------------------------------------
%files
%license LICENSE TLS_LICENSE
%doc RELEASE_NOTES
%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}/postlog
%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}/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(0755,root,root) /%{pf_queue_directory}/pid
%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
%dir %attr(1777,root,root) /var/spool/mail
/var/mail
%if %{with lmdb}
%files lmdb
%{pf_shlib_directory}/postfix-lmdb.so
%{_mandir}/man5/lmdb_table.5%{?ext_man}
%endif
%changelog

17
postfix-linux45.patch Normal file
View File

@ -0,0 +1,17 @@
---
makedefs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- makedefs.orig
+++ makedefs
@@ -631,8 +631,8 @@ EOF
: ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
: ${PLUGIN_LD="${CC-gcc} -shared"}
;;
- Linux.[3456].*)
- SYSTYPE=LINUX$RELEASE_MAJOR
+ Linux.[3-9].*|Linux.[1-9][0-9].*)
+ SYSTYPE=LINUX3
case "$CCARGS" in
*-DNO_DB*) ;;
*-DHAS_DB*) ;;

200
postfix-main.cf.patch Normal file
View File

@ -0,0 +1,200 @@
--- conf/main.cf.orig 2022-11-14 15:57:24.689108581 +0100
+++ conf/main.cf 2022-11-14 16:02:33.255317483 +0100
@@ -285,7 +285,7 @@ unknown_local_recipient_reject_code = 55
#
#mynetworks = 168.100.3.0/28, 127.0.0.0/8
#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_relay_restrictions and
@@ -352,7 +352,7 @@ unknown_local_recipient_reject_code = 55
# 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
#
@@ -407,8 +407,8 @@ unknown_local_recipient_reject_code = 55
# "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
@@ -418,8 +418,8 @@ unknown_local_recipient_reject_code = 55
#
#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)
#
@@ -576,6 +576,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
#
@@ -682,4 +683,149 @@ 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 =
+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_security_level =
+smtp_tls_CAfile =
+smtp_tls_CApath =
+smtp_tls_cert_file =
+smtp_tls_key_file =
+#smtp_tls_policy_maps = lmdb:/etc/postfix/tls_policy
+#smtp_tls_session_cache_timeout = 3600s
+smtp_tls_session_cache_database =
+
+smtpd_use_tls = no
+#smtpd_tls_loglevel = 0
+smtpd_enforce_tls = no
+smtpd_tls_security_level =
+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
+############################################################
+# OpenDKIM
+############################################################
+#smtpd_milters = unix:/run/opendkim/opendkim.sock
+#non_smtpd_milters = $smtpd_milters
+#milter_default_action = accept
+#milter_protocol = 2
+############################################################
+# Start MySQL from postfixwiki.org
+############################################################
+relay_domains = $mydestination, lmdb:/etc/postfix/relay
+relay_recipient_maps = lmdb:/etc/postfix/relay_recipients
+#virtual_alias_domains =
+#virtual_alias_maps = lmdb:/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 = lmdb:/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 = lmdb:/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
+

129
postfix-master.cf.patch Normal file
View File

@ -0,0 +1,129 @@
Index: conf/master.cf
===================================================================
--- conf/master.cf.orig
+++ conf/master.cf
@@ -10,6 +10,11 @@
# (yes) (yes) (no) (never) (100)
# ==========================================================================
smtp inet n - n - - smtpd
+#amavis unix - - n - 4 smtp
+# -o smtp_data_done_timeout=1200
+# -o smtp_send_xforward_command=yes
+# -o disable_dns_lookups=yes
+# -o max_use=20
#smtp inet n - n - 1 postscreen
#smtpd pass - - n - - smtpd
#dnsblog unix - - n - 0 dnsblog
@@ -17,40 +22,42 @@ smtp inet n - n
# Choose one: enable submission for loopback clients only, or for any client.
#127.0.0.1:submission inet n - n - - smtpd
#submission inet n - n - - smtpd
-# -o syslog_name=postfix/submission
-# -o smtpd_tls_security_level=encrypt
-# -o smtpd_sasl_auth_enable=yes
-# -o smtpd_tls_auth_only=yes
-# -o local_header_rewrite_clients=static:all
-# -o smtpd_reject_unlisted_recipient=no
+# -o syslog_name=postfix/submission
+# -o smtpd_tls_security_level=encrypt
+# -o content_filter=smtp:[127.0.0.1]:10024
+# -o smtpd_sasl_auth_enable=yes
+# -o smtpd_tls_auth_only=yes
+# -o local_header_rewrite_clients=static:all
+# -o smtpd_reject_unlisted_recipient=no
# Instead of specifying complex smtpd_<xxx>_restrictions here,
# specify "smtpd_<xxx>_restrictions=$mua_<xxx>_restrictions"
# here, and specify mua_<xxx>_restrictions in main.cf (where
# "<xxx>" is "client", "helo", "sender", "relay", or "recipient").
-# -o smtpd_client_restrictions=
-# -o smtpd_helo_restrictions=
-# -o smtpd_sender_restrictions=
-# -o smtpd_relay_restrictions=
-# -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
-# -o milter_macro_daemon_name=ORIGINATING
+# -o smtpd_client_restrictions=$mua_client_restrictions
+# -o smtpd_helo_restrictions=$mua_helo_restrictions
+# -o smtpd_sender_restrictions=$mua_sender_restrictions
+# -o smtpd_recipient_restrictions=
+# -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
+# -o milter_macro_daemon_name=ORIGINATING
# Choose one: enable submissions for loopback clients only, or for any client.
#127.0.0.1:submissions inet n - n - - smtpd
#submissions inet n - n - - smtpd
-# -o syslog_name=postfix/submissions
-# -o smtpd_tls_wrappermode=yes
-# -o smtpd_sasl_auth_enable=yes
-# -o local_header_rewrite_clients=static:all
-# -o smtpd_reject_unlisted_recipient=no
+# -o syslog_name=postfix/submissions
+# -o smtpd_tls_wrappermode=yes
+# -o content_filter=smtp:[127.0.0.1]:10024
+# -o smtpd_sasl_auth_enable=yes
+# -o local_header_rewrite_clients=static:all
+# -o smtpd_reject_unlisted_recipient=no
# Instead of specifying complex smtpd_<xxx>_restrictions here,
# specify "smtpd_<xxx>_restrictions=$mua_<xxx>_restrictions"
# here, and specify mua_<xxx>_restrictions in main.cf (where
# "<xxx>" is "client", "helo", "sender", "relay", or "recipient").
-# -o smtpd_client_restrictions=
-# -o smtpd_helo_restrictions=
-# -o smtpd_sender_restrictions=
-# -o smtpd_relay_restrictions=
-# -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
-# -o milter_macro_daemon_name=ORIGINATING
+# -o smtpd_client_restrictions=$mua_client_restrictions
+# -o smtpd_helo_restrictions=$mua_helo_restrictions
+# -o smtpd_sender_restrictions=$mua_sender_restrictions
+# -o smtpd_recipient_restrictions=
+# -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
+# -o milter_macro_daemon_name=ORIGINATING
#628 inet n - n - - qmqpd
pickup unix n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
@@ -79,6 +86,26 @@ lmtp unix - - n
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
postlog unix-dgram n - n - 1 postlogd
+#localhost:10025 inet n - n - - smtpd
+# -o content_filter=
+# -o smtpd_delay_reject=no
+# -o smtpd_client_restrictions=permit_mynetworks,reject
+# -o smtpd_helo_restrictions=
+# -o smtpd_sender_restrictions=
+# -o smtpd_recipient_restrictions=permit_mynetworks,reject
+# -o smtpd_data_restrictions=reject_unauth_pipelining
+# -o smtpd_end_of_data_restrictions=
+# -o smtpd_restriction_classes=
+# -o mynetworks=127.0.0.0/8
+# -o smtpd_error_sleep_time=0
+# -o smtpd_soft_error_limit=1001
+# -o smtpd_hard_error_limit=1000
+# -o smtpd_client_connection_count_limit=0
+# -o smtpd_client_connection_rate_limit=0
+# -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks,no_address_mappings
+# -o local_header_rewrite_clients=
+# -o local_recipient_maps=
+# -o relay_recipient_maps=
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
@@ -112,7 +139,7 @@ postlog unix-dgram n - n
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#
#cyrus unix - n n - - pipe
-# flags=DRX user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
+# flags=DRX user=cyrus argv=/usr/lib/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
#
# ====================================================================
#
@@ -145,3 +172,10 @@ postlog unix-dgram n - n
#mailman unix - n n - - pipe
# flags=FRX user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
# ${nexthop} ${user}
+#
+#procmail unix - n n - - pipe
+# flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc ${sender} ${recipient}
+#
+#dovecot unix - n n - - pipe
+# flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d ${recipient}
+#

BIN
postfix-mysql.tar.bz2 (Stored with Git LFS) Normal file

Binary file not shown.

26
postfix-no-md5.patch Normal file
View File

@ -0,0 +1,26 @@
Index: src/global/mail_params.h
===================================================================
--- src/global/mail_params.h.orig
+++ src/global/mail_params.h
@@ -1387,7 +1387,7 @@ extern char *var_smtpd_tls_mand_excl;
#define VAR_SMTPD_TLS_FPT_DGST "smtpd_tls_fingerprint_digest"
#define DEF_SMTPD_TLS_FPT_DGST "${{$compatibility_level} <level {3.6} ? " \
- "{md5} : {sha256}}"
+ "{sha1} : {sha256}}"
extern char *var_smtpd_tls_fpt_dgst;
#define VAR_SMTPD_TLS_512_FILE "smtpd_tls_dh512_param_file"
@@ -1549,10 +1549,10 @@ extern char *var_smtp_tls_mand_excl;
#define VAR_SMTP_TLS_FPT_DGST "smtp_tls_fingerprint_digest"
#define DEF_SMTP_TLS_FPT_DGST "${{$compatibility_level} <level {3.6} ? " \
- "{md5} : {sha256}}"
+ "{sha1} : {sha256}}"
#define VAR_LMTP_TLS_FPT_DGST "lmtp_tls_fingerprint_digest"
#define DEF_LMTP_TLS_FPT_DGST "${{$compatibility_level} <level {3.6} ? " \
- "{md5} : {sha256}}"
+ "{sha1} : {sha256}}"
extern char *var_smtp_tls_fpt_dgst;
#define VAR_SMTP_TLS_TAFILE "smtp_tls_trust_anchor_file"

4
postfix-rpmlintrc Normal file
View File

@ -0,0 +1,4 @@
addFilter("executable-sourced-script .*/sbin/conf.d/SuSEconfig.postfix")
addFilter("sourced-script-with-shebang .*/sbin/conf.d/SuSEconfig.postfix")
addFilter("devel-file-in-non-devel-package .*/usr/lib/libpostfix*.so")
addFilter("devel-file-in-non-devel-package .*/usr/lib64/libpostfix*.so")

View File

@ -0,0 +1,31 @@
Index: src/tls/tls_client.c
===================================================================
--- src/tls/tls_client.c.orig
+++ src/tls/tls_client.c
@@ -693,6 +693,11 @@ TLS_APPL_STATE *tls_client_init(const TL
SSL_CTX_set_security_level(client_ctx, 0);
#endif
+#ifdef SSL_MODE_RELEASE_BUFFERS
+ /* Keep memory usage as low as possible */
+ SSL_CTX_set_mode(client_ctx, SSL_MODE_RELEASE_BUFFERS);
+#endif
+
/*
* See the verify callback in tls_verify.c
*/
Index: src/tls/tls_server.c
===================================================================
--- src/tls/tls_server.c.orig
+++ src/tls/tls_server.c
@@ -493,6 +493,10 @@ TLS_APPL_STATE *tls_server_init(const TL
SSL_CTX_set_security_level(sni_ctx, 0);
#endif
+#ifdef SSL_MODE_RELEASE_BUFFERS
+ /* Keep memory usage as low as possible */
+ SSL_CTX_set_mode(server_ctx, SSL_MODE_RELEASE_BUFFERS);
+#endif
/*
* See the verify callback in tls_verify.c
*/

6
postfix-user.conf Normal file
View File

@ -0,0 +1,6 @@
# Type Name ID GECOS [HOME]
g postfix 51 - -
g maildrop 59 - -
u postfix 51 "Postfix Daemon" /var/spool/postfix
m postfix maildrop
m postfix mail

1385
postfix-vda-v14-3.0.3.patch Normal file

File diff suppressed because it is too large Load Diff

2
postfix-vmail-user.conf Normal file
View File

@ -0,0 +1,2 @@
# Type Name ID GECOS [HOME]
u vmail - "Virtual Mail User" /srv/maildirs

5679
postfix.changes Normal file

File diff suppressed because it is too large Load Diff

154
postfix.keyring Normal file
View File

@ -0,0 +1,154 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2.0.18 (FreeBSD)
mQMuBFYZbx0RCADaN3/xzcSgTh/Zdpn5Ia0cRAGF/0ZKbd6azuiFTvXQd/JLZkYj
DkNHHGZImtQhPf+aa7JXCUSqrbgvSyYOYUI6enx+W8RBzvYBWEccW1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0YRdBNVBr
NdtKutstdsbW/y6LHed4Id+sBuK4Y7OAN38mtjuaOpZLFGm8ex15KVvRJb/77u7y
LOixdFS7DpiSnaXoZpxC9vFMmm2R1Iu0JHdpZXRzZSB2ZW5lbWEgPHdpZXRzZUBw
b3JjdXBpbmUub3JnPokAlQMFEDTZBvTcgPKm1TJ8uQEBoRMD/RkjT4YtF/ltBN+V
eCLv272pxZo38JJZEGyWg4QTHXYQ7ayVc22RL3vQLEMRISvZnvl6pe2UMzgI8jOH
NWhTtvrKuvR/M/nvqTpFf8lp0SiF/ZVVeGCaSmS1Eoyp1dk76qPRCl6RcI6bTv2F
NT2RRKl3v4t4iEXnEjiyS6irzd2b
=o1uH
-----END PGP PUBLIC KEY BLOCK-----

631
postfix.spec Normal file
View File

@ -0,0 +1,631 @@
#
# spec file for package postfix
#
# Copyright (c) 2023 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}/%{name}-doc
%define pf_config_directory %{_sysconfdir}/%{name}
%define pf_daemon_directory %{_prefix}/lib/%{name}/bin/
%define _libexecdir %{_prefix}/lib
%define pf_shlib_directory %{_prefix}/lib/%{name}
%define pf_command_directory %{_sbindir}
%define pf_queue_directory var/spool/%{name}
%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}/%{name}-doc/README_FILES
%define pf_html_directory %{_docdir}/%{name}-doc/html
%define pf_sample_directory %{_docdir}/%{name}-doc/samples
%define pf_data_directory %{_localstatedir}/lib/%{name}
%define pf_database_convert %{_rundir}/%{name}-needs-convert
%define mail_group mail
%define conf_backup_dir %{_localstatedir}/adm/backup/%{name}
%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} < 1599
%bcond_without libnsl
%else
%bcond_with libnsl
%endif
%bcond_without ldap
Name: postfix
Version: 3.8.3
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: %{name}-SUSE.tar.gz
Source3: %{name}-mysql.tar.bz2
Source4: postfix.keyring
Source10: %{name}-rpmlintrc
Source11: check_mail_queue
Source12: postfix-user.conf
Source13: postfix-vmail-user.conf
Patch1: %{name}-no-md5.patch
Patch2: pointer_to_literals.patch
Patch3: ipv6_disabled.patch
Patch4: %{name}-main.cf.patch
Patch5: %{name}-master.cf.patch
Patch6: %{name}-linux45.patch
Patch7: %{name}-ssl-release-buffers.patch
Patch8: %{name}-vda-v14-3.0.3.patch
Patch9: fix-postfix-script.patch
Patch10: %{name}-avoid-infinit-loop-if-no-permission.patch
Patch11: set-default-db-type.patch
BuildRequires: ca-certificates
BuildRequires: cyrus-sasl-devel
BuildRequires: diffutils
BuildRequires: fdupes
BuildRequires: libicu-devel
BuildRequires: libopenssl-devel >= 1.1.1
BuildRequires: lmdb-devel
BuildRequires: m4
BuildRequires: mysql-devel
BuildRequires: pcre2-devel
BuildRequires: pkgconfig
BuildRequires: postgresql-devel
BuildRequires: shadow
BuildRequires: sysuser-tools
BuildRequires: zlib-devel
BuildRequires: pkgconfig(systemd)
Requires: iproute2
Requires(post): permissions
Requires(pre): %fillup_prereq
Requires(pre): group(%{mail_group})
Requires(pre): permissions
Requires(pre): user(nobody)
Conflicts: exim
Conflicts: postfix-bdb
Conflicts: sendmail
Provides: postfix-lmdb = %{version}-%{release}
Obsoletes: postfix-lmdb < %{version}-%{release}
Provides: smtp_daemon
%{?systemd_ordering}
%sysusers_requires
%if %{with ldap}
BuildRequires: openldap2-devel
%endif
%if %{with libnsl}
BuildRequires: libnsl-devel
%endif
# /usr/lib/postfix/bin//post-install: line 667: ed: command not found
Requires(pre): /usr/bin/ed
Requires(preun): /usr/bin/ed
Requires(post): /usr/bin/ed
Requires(postun): /usr/bin/ed
# /usr/sbin/config.postfix needs perl
Requires(pre): perl
Requires(preun): perl
Requires(post): perl
Requires(postun): perl
%description
Postfix aims to be an alternative to the widely-used sendmail program.
%package devel
Summary: Development headers for the %{name} package
Group: Development/Libraries/C and C++
Requires(pre): %{name} = %{version}
BuildArch: noarch
%description devel
Postfix aims to be an alternative to the widely-used sendmail program.
%package doc
Summary: Documentations for the %{name} package
Group: Productivity/Networking/Email/Servers
BuildArch: noarch
%description doc
Postfix aims to be an alternative to the widely-used sendmail program.
This package contains the documentation for %{name}
%package mysql
Summary: Postfix plugin to support MySQL maps
Group: Productivity/Networking/Email/Servers
Requires(pre): %{name} = %{version}
%sysusers_requires
%if 0%{?suse_version} < 1550
Provides: group(vmail)
%endif
%description mysql
Postfix plugin to support MySQL maps. This library will be loaded by
starting %{name} if you'll access a postmap which is stored in mysql.
%package postgresql
Summary: Postfix plugin to support PostgreSQL maps
Group: Productivity/Networking/Email/Servers
Requires(pre): %{name} = %{version}
%description postgresql
Postfix plugin to support PostgreSQL maps. This library will be loaded
by starting %{name} if you'll access a postmap which is stored in
PostgreSQL.
%if %{with ldap}
%package ldap
Summary: Postfix LDAP map support
Group: Productivity/Networking/Email/Servers
Requires: %{name} = %{version}
Provides: postfix:/usr/lib/postfix/postfix-ldap.so
%description ldap
This provides support for LDAP maps in Postfix. If you plan to use LDAP
maps with Postfix, you need this.
%endif
%prep
%setup -q -a 2 -a 3
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
%patch7
%patch8
%patch9
%patch10
%patch11
# ---------------------------------------------------------------------------
%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 %{without libnsl}
export CCARGS="${CCARGS} -DNO_NIS"
%endif
%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=2"
export AUXLIBS_PCRE="-lpcre2-8"
#
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
#
export CCARGS="${CCARGS} -DHAS_LMDB -I/usr/local/include" \
export AUXLIBS_LMDB="-llmdb"
#
# TODO
#export AUXLIBS_SQLITE
#export AUXLIBS_CDB
#export AUXLIBS_SDBM
# Remove berkeley DB and set lmdb as default
export CCARGS="${CCARGS} -DNO_DB -DDEF_DB_TYPE=\\\"lmdb\\\""
export PIE=-pie
# using SHLIB_RPATH to specify unrelated linker flags, because LDFLAGS is
# ignored
%make_build makefiles pie=yes shared=yes dynamicmaps=yes \
shlib_directory=%{_prefix}/lib/%{name} \
meta_directory=%{_prefix}/lib/%{name} \
config_directory=%{_sysconfdir}/%{name} \
SHLIB_RPATH="-Wl,-rpath,%{pf_shlib_directory} -Wl,-z,relro,-z,now"
%make_build
# Create postfix user
%sysusers_generate_pre %{SOURCE12} postfix postfix-user.conf
%sysusers_generate_pre %{SOURCE13} vmail postfix-vmail-user.conf
# ---------------------------------------------------------------------------
%install
mkdir -p %{buildroot}/%{_libdir}
mkdir -p %{buildroot}%{_sysconfdir}/%{name}
# create our default postfix ssl DIR (/etc/postfix/ssl)
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/ssl/certs
# link cacerts to /etc/ssl/certs
ln -s ../../ssl/certs %{buildroot}%{_sysconfdir}/%{name}/ssl/cacerts
cp lib/lib%{name}-* %{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 -s ../sbin/sendmail %{buildroot}%{_libexecdir}/sendmail
for i in qmqp-source smtp-sink smtp-source; do
install -pm 0755 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}/%{name}
mkdir -p %{buildroot}%{_sysconfdir}/pam.d
mkdir -p %{buildroot}/var/spool/mail
ln -s spool/mail %{buildroot}/var/mail
install -pm 0644 %{name}-SUSE/smtp %{buildroot}%{_sysconfdir}/pam.d/smtp
mkdir -p %{buildroot}%{_fillupdir}
sed -e 's;@lib@;%{_lib};g' %{name}-SUSE/sysconfig.%{name} > %{buildroot}%{_fillupdir}/sysconfig.%{name}
install -pm 0644 %{name}-SUSE/sysconfig.mail-%{name} %{buildroot}%{_fillupdir}/sysconfig.mail-%{name}
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};' %{name}-SUSE/config.%{name} > %{buildroot}%{_sbindir}/config.%{name}
chmod 0755 %{buildroot}%{_sbindir}/config.%{name}
install -pm 0644 %{name}-SUSE/ldap_aliases.cf %{buildroot}%{_sysconfdir}/%{name}/ldap_aliases.cf
install -pm 0644 %{name}-SUSE/helo_access %{buildroot}%{_sysconfdir}/%{name}/helo_access
install -pm 0644 %{name}-SUSE/permissions %{buildroot}%{_sysconfdir}/permissions.d/%{name}
install -pm 0644 %{name}-SUSE/sender_canonical %{buildroot}%{_sysconfdir}/%{name}/sender_canonical
install -pm 0644 %{name}-SUSE/relay %{buildroot}%{_sysconfdir}/%{name}/relay
install -pm 0644 %{name}-SUSE/relay_ccerts %{buildroot}%{_sysconfdir}/%{name}/relay_ccerts
install -pm 0644 %{name}-SUSE/relay_recipients %{buildroot}%{_sysconfdir}/%{name}/relay_recipients
install -pm 0600 %{name}-SUSE/sasl_passwd %{buildroot}%{_sysconfdir}/%{name}/sasl_passwd
mkdir -p %{buildroot}%{_sysconfdir}/sasl2
install -pm 0600 %{name}-SUSE/smtpd.conf %{buildroot}%{_sysconfdir}/sasl2/smtpd.conf
install -pm 0644 %{name}-SUSE/openssl_%{name}.conf.in %{buildroot}%{_sysconfdir}/%{name}/openssl_%{name}.conf.in
install -pm 0755 %{name}-SUSE/mk%{name}cert %{buildroot}%{_sbindir}/mk%{name}cert
{
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}/%{name}/main.cf
%{buildroot}%{_sbindir}/postconf -c %{buildroot}%{_sysconfdir}/%{name} \
-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
sed -i -e 's/\(.*ldap.*\)/#\1/g' \
-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
install -pm 0644 %{name}-mysql/main.cf-mysql %{buildroot}%{_sysconfdir}/%{name}/main.cf-mysql
install -pm 0640 %{name}-mysql/*_maps.cf %{buildroot}%{_sysconfdir}/%{name}/
# create paranoid permissions file
printf '%%-38s %%-18s %%s\n' %{_sbindir}/postdrop "root.%{pf_setgid_group}" "0755" >> %{buildroot}%{_sysconfdir}/permissions.d/%{name}.paranoid
printf '%%-38s %%-18s %%s\n' %{_sbindir}/postqueue "root.%{pf_setgid_group}" "0755" >> %{buildroot}%{_sysconfdir}/permissions.d/%{name}.paranoid
install -pm 0644 include/*.h %{buildroot}%{_includedir}/%{name}/
# 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}/%{name}/*.orig
mkdir -p %{buildroot}%{_unitdir}/mail-transfer-agent.target.wants/
mkdir -p %{buildroot}%{pf_shlib_directory}/systemd
install -pm 0644 %{name}-SUSE/%{name}.service %{buildroot}%{_unitdir}/%{name}.service
install -pm 0755 %{name}-SUSE/config_%{name}.systemd %{buildroot}%{pf_shlib_directory}/systemd/config_%{name}
install -pm 0755 %{name}-SUSE/update_chroot.systemd %{buildroot}%{pf_shlib_directory}/systemd/update_chroot
install -pm 0755 %{name}-SUSE/update_postmaps.systemd %{buildroot}%{pf_shlib_directory}/systemd/update_postmaps
install -pm 0755 %{name}-SUSE/wait_qmgr.systemd %{buildroot}%{pf_shlib_directory}/systemd/wait_qmgr
install -pm 0755 %{name}-SUSE/cond_slp.systemd %{buildroot}%{pf_shlib_directory}/systemd/cond_slp
ln -sv %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
ln -sv %{_unitdir}/%{name}.service %{buildroot}%{_unitdir}/mail-transfer-agent.target.wants/%{name}.service
%fdupes %{buildroot}%{pf_docdir}
%fdupes %{buildroot}%{_mandir}
for path in %{buildroot}%{pf_shlib_directory}/lib%{name}-*.so
do
test -e "$path" || continue
name=${path##*/}
cmp "$path" %{buildroot}%{_libdir}/$name || continue
rm -vf $path
ln -sf %{_libdir}/$name $path
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}/
mkdir -p %{buildroot}%{_sysusersdir}
install -m 644 %{SOURCE12} %{buildroot}%{_sysusersdir}/
install -m 644 %{SOURCE13} %{buildroot}%{_sysusersdir}/
# ---------------------------------------------------------------------------
%pre -f postfix.pre
# If existing default database type is hash, we need to convert the
# databases because hash (and btree) is no longer supported after
# the upgrade
if [ -x %{_sbindir}/postconf ]; then
DEF_DB_TYPE=$(postconf default_database_type)
case $DEF_DB_TYPE in *hash)
touch %{pf_database_convert}
esac
fi
%service_add_pre %{name}.service
%preun
%service_del_preun %{name}.service
%post
# We never have to run suseconfig for postfix after installation
# 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
touch %{_localstatedir}/adm/%{name}.configured
echo "Executing upgrade-configuration."
%{_sbindir}/%{name} 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
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
%set_permissions %{_sbindir}/postdrop
%set_permissions %{_sbindir}/postlog
%set_permissions %{_sbindir}/postqueue
%set_permissions %{_sysconfdir}/%{name}/sasl_passwd
%set_permissions %{_sbindir}/sendmail
%{fillup_only postfix}
%{fillup_only -an mail}
%service_add_post %{name}.service
%postun
%service_del_postun %{name}.service
%verifyscript
%verify_permissions -e %{_sbindir}/postdrop
%verify_permissions -e %{_sbindir}/postlog
%verify_permissions -e %{_sbindir}/postqueue
%verify_permissions -e %{_sysconfdir}/%{name}/sasl_passwd
%verify_permissions -e %{_sbindir}/sendmail
# ---------------------------------------------------------------------------
%pre mysql -f vmail.pre
%post mysql -p /sbin/ldconfig
%postun mysql -p /sbin/ldconfig
%post postgresql -p /sbin/ldconfig
%postun postgresql -p /sbin/ldconfig
%if %{with ldap}
%post ldap -p /sbin/ldconfig
%postun ldap -p /sbin/ldconfig
%endif
%files
%license LICENSE TLS_LICENSE
%doc RELEASE_NOTES
%config %{_sysconfdir}/pam.d/*
%{_fillupdir}/sysconfig.%{name}
%{_fillupdir}/sysconfig.mail-%{name}
%{_sbindir}/config.%{name}
%dir %{_sysconfdir}/%{name}
%config %{_sysconfdir}/%{name}/main.cf.default
%config(noreplace) %{_sysconfdir}/%{name}/[^mysql]*[^mysql]
%config(noreplace) %{_sysconfdir}/%{name}/access
%config(noreplace) %{_sysconfdir}/%{name}/aliases
%config(noreplace) %{_sysconfdir}/%{name}/canonical
%config(noreplace) %{_sysconfdir}/%{name}/header_checks
%config(noreplace) %{_sysconfdir}/%{name}/helo_access
%config(noreplace) %{_sysconfdir}/%{name}/main.cf
%config(noreplace) %{_sysconfdir}/%{name}/master.cf
%config(noreplace) %{_sysconfdir}/%{name}/relay
%config(noreplace) %{_sysconfdir}/%{name}/relay_ccerts
%config(noreplace) %{_sysconfdir}/%{name}/relay_recipients
%config(noreplace) %{_sysconfdir}/%{name}/sasl_passwd
%config(noreplace) %{_sysconfdir}/%{name}/sender_canonical
%config(noreplace) %{_sysconfdir}/%{name}/virtual
%ghost %{_sysconfdir}/%{name}/*.lmdb
%ghost %{_sysconfdir}/aliases.lmdb
%dir %{_sysconfdir}/sasl2
%config(noreplace) %{_sysconfdir}/sasl2/smtpd.conf
%exclude %{_sysconfdir}/%{name}/LICENSE
%exclude %{_sysconfdir}/%{name}/TLS_LICENSE
%config %{_sysconfdir}/permissions.d/%{name}
%config %{_sysconfdir}/permissions.d/%{name}.paranoid
%{pf_shlib_directory}/%{name}-files
# create our default postfix ssl DIR (/etc/postfix/ssl)
%dir %{_sysconfdir}/%{name}/ssl
%dir %{_sysconfdir}/%{name}/ssl/certs
%{_sysconfdir}/%{name}/ssl/cacerts
%dir %{pf_shlib_directory}/systemd
%attr(0755,root,root) %{pf_shlib_directory}/systemd/*
%{_unitdir}/%{name}.service
%{_unitdir}/mail-transfer-agent.target.wants
%verify(not mode) %attr(2755,root,%{pf_setgid_group}) %{_sbindir}/postdrop
%verify(not mode) %attr(2755,root,%{pf_setgid_group}) %{_sbindir}/postlog
%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}/%{name}
%attr(0755,root,root) %{_sbindir}/postkick
%attr(0755,root,root) %{_sbindir}/postlock
%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}/mk%{name}cert
%attr(0755,root,root) %{_sbindir}/check_mail_queue
%attr(0755,root,root) %{_sbindir}/config.%{name}
%{_sbindir}/rc%{name}
%{_libdir}/lib*
%{_libexecdir}/sendmail
%dir %{pf_shlib_directory}
%{pf_shlib_directory}/%{name}-pcre.so
%{pf_shlib_directory}/%{name}-lmdb.so
%{pf_shlib_directory}/lib%{name}-dns.so
%{pf_shlib_directory}/lib%{name}-global.so
%{pf_shlib_directory}/lib%{name}-master.so
%{pf_shlib_directory}/lib%{name}-tls.so
%{pf_shlib_directory}/lib%{name}-util.so
%{pf_shlib_directory}/dynamicmaps.cf
%{pf_shlib_directory}/main.cf.proto
%{pf_shlib_directory}/makedefs.out
%{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}
%dir %attr(0700,%{name},root) %{pf_data_directory}
%exclude %{_mandir}/man5/ldap_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(0755,root,root) /%{pf_queue_directory}/pid
%dir %attr(0700,%{name},root) /%{pf_queue_directory}/active
%dir %attr(0700,%{name},root) /%{pf_queue_directory}/bounce
%dir %attr(0700,%{name},root) /%{pf_queue_directory}/corrupt
%dir %attr(0700,%{name},root) /%{pf_queue_directory}/defer
%dir %attr(0700,%{name},root) /%{pf_queue_directory}/deferred
%dir %attr(0700,%{name},root) /%{pf_queue_directory}/flush
%dir %attr(0700,%{name},root) /%{pf_queue_directory}/hold
%dir %attr(0700,%{name},root) /%{pf_queue_directory}/incoming
%dir %attr(0700,%{name},root) /%{pf_queue_directory}/private
%dir %attr(0700,%{name},root) /%{pf_queue_directory}/saved
%dir %attr(0700,%{name},root) /%{pf_queue_directory}/trace
%dir %attr(0730,%{name},maildrop) /%{pf_queue_directory}/maildrop
%dir %attr(0710,%{name},maildrop) /%{pf_queue_directory}/public
%{_sysusersdir}/postfix-user.conf
%dir %attr(1777,root,root) /var/spool/mail
/var/mail
%files devel
%{_includedir}/%{name}/
%files doc
%defattr(0644,root,root,0755)
%{pf_docdir}/
%files mysql
%doc %{name}-mysql/%{name}-mysql.sql
%config(noreplace) %attr(640, root, %{name}) %{_sysconfdir}/%{name}/*_maps.cf
%config(noreplace) %{_sysconfdir}/%{name}/main.cf-mysql
%{pf_shlib_directory}/%{name}-mysql.so
%{pf_shlib_directory}/dynamicmaps.cf.d/%{name}-mysql.cf
%{_mandir}/man5/mysql_table.5%{?ext_man}
%{_sysusersdir}/postfix-vmail-user.conf
%files postgresql
%{pf_shlib_directory}/%{name}-pgsql.so
%{pf_shlib_directory}/dynamicmaps.cf.d/%{name}-pgsql.cf
%{_mandir}/man5/pgsql_table.5%{?ext_man}
%if %{with ldap}
%files ldap
%config(noreplace) %{_sysconfdir}/%{name}/ldap_aliases.cf
%{pf_shlib_directory}/%{name}-ldap.so
%{pf_shlib_directory}/dynamicmaps.cf.d/%{name}-ldap.cf
%{_mandir}/man5/ldap_table.5%{?ext_man}
%endif
%changelog

8
pre_checkin.sh Normal file
View File

@ -0,0 +1,8 @@
#!/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."

187
set-default-db-type.patch Normal file
View File

@ -0,0 +1,187 @@
Index: src/util/sys_defs.h
===================================================================
--- src/util/sys_defs.h.orig
+++ src/util/sys_defs.h
@@ -53,7 +53,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
@@ -234,7 +234,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"
@@ -291,7 +291,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
@@ -775,7 +775,7 @@ extern int initgroups(const char *, int)
#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
@@ -851,7 +851,7 @@ extern int initgroups(const char *, int)
#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
@@ -884,7 +884,7 @@ extern int initgroups(const char *, int)
#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
@@ -1209,7 +1209,7 @@ extern int opterr; /* XXX use <getopt.
#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 */
Index: src/global/mail_params.h
===================================================================
--- src/global/mail_params.h.orig
+++ src/global/mail_params.h
@@ -2960,7 +2960,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"
@@ -3762,7 +3762,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"
Index: man/man1/postmap.1
===================================================================
--- man/man1/postmap.1.orig
+++ man/man1/postmap.1
@@ -66,7 +66,7 @@ by RFC 5322. For example, an address loc
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
@@ -215,9 +215,9 @@ the "\fBpostconf \-m\fR" command.
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.
@@ -229,9 +229,6 @@ This is available on systems with suppor
A table that reliably fails all requests. The lookup table
name is used for logging only. This table exists to simplify
Postfix error tests.
-.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 \fBlmdb\fR
The output is a btree\-based file, named \fIfile_name\fB.lmdb\fR.
\fBlmdb\fR supports concurrent writes and reads from different
@@ -277,12 +274,6 @@ The following \fBmain.cf\fR parameters a
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.
Index: man/man1/postalias.1
===================================================================
--- man/man1/postalias.1.orig
+++ man/man1/postalias.1
@@ -34,7 +34,7 @@ The format of Postfix alias input files
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 "\fBpostconf \-m\fR" command.
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.
@@ -136,9 +136,6 @@ This is available on systems with suppor
A table that reliably fails all requests. The lookup table
name is used for logging only. This table exists to simplify
Postfix error tests.
-.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 \fBlmdb\fR
The output is a btree\-based file, named \fIfile_name\fB.lmdb\fR.
\fBlmdb\fR supports concurrent writes and reads from different
@@ -192,12 +189,6 @@ The alias databases for \fBlocal\fR(8) d
.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.