Accepting request 586164 from server:mail

- Refresh spec-file via spec-cleaner and manual optinizations.
  * Add %license macro.
  * Set license to IPL-1.0 OR EPL-2.0.
- Update to 3.3.0
  * http://cdn.postfix.johnriley.me/mirrors/postfix-release/official/postfix-3.3.0.RELEASE_NOTES
  * Dual license: in addition to the historical IBM Public License
    1.0, Postfix is now also distributed with the more recent Eclipse
    Public License 2.0. Recipients can choose to take the software
    under the license of their choice. Those who are more comfortable
    with the IPL can continue with that license.
  * The postconf command now warns about unknown parameter names
    in a Postfix database configuration file. As with other unknown
    parameter names, these warnings can help to find typos early.
  * Container support: Postfix 3.3 will run in the foreground with
    "postfix start-fg". This requires that Postfix multi-instance
    support is disabled (the default). To collect Postfix syslog
    information on the container's host, mount the host's /dev/log
    socket into the container, for example with "docker run -v
    /dev/log:/dev/log ...other options...", and specify a distinct
    Postfix syslog_name setting in the container (for example with
    "postconf syslog_name=the-name-here").
  * Milter support: applications can now send RET and ENVID parameters
    in SMFIR_CHGFROM (change envelope sender) requests.
  * Postfix-generated From: headers with 'full name' information
    are now formatted as "From: name <address>" by default. Specify
    "header_from_format = obsolete" to get the earlier form "From:
    address (name)".
  * Interoperability: when Postfix IPv6 and IPv4 support are both
    enabled, the Postfix SMTP client will now relax MX preferences
    and attempt to schedule similar numbers of IPv4 and IPv6
    addresses. This works around mail delivery problems when a
    destination announces lots of primary MX addresses on IPv6, but
    is reachable only over IPv4 (or vice versa). The new behavior
    is controlled with the smtp_balance_mx_inet_protocols parameter.
  * Compatibility safety net: with compatibility_level < 1, the
    Postfix SMTP server now warns for mail that would be blocked
    by the Postfix 2.10 smtpd_relay_restrictions feature, without
    blocking that mail. There still is a steady trickle of sites
    that upgrade from an earlier Postfix version. (forwarded request 585926 from 13ilya)

OBS-URL: https://build.opensuse.org/request/show/586164
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postfix?expand=0&rev=154
This commit is contained in:
Dominique Leuenberger 2018-03-20 20:50:58 +00:00 committed by Git OBS Bridge
commit 3331045eea
4 changed files with 154 additions and 178 deletions

View File

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

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

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7942e89721e30118d7050675b0d976955e3160e21f7898b85a79cac4f4baef39
size 4419450

View File

@ -1,3 +1,46 @@
-------------------------------------------------------------------
Mon Mar 12 13:43:43 UTC 2018 - ilya@ilya.pp.ua
- Refresh spec-file via spec-cleaner and manual optinizations.
* Add %license macro.
* Set license to IPL-1.0 OR EPL-2.0.
- Update to 3.3.0
* http://cdn.postfix.johnriley.me/mirrors/postfix-release/official/postfix-3.3.0.RELEASE_NOTES
* Dual license: in addition to the historical IBM Public License
1.0, Postfix is now also distributed with the more recent Eclipse
Public License 2.0. Recipients can choose to take the software
under the license of their choice. Those who are more comfortable
with the IPL can continue with that license.
* The postconf command now warns about unknown parameter names
in a Postfix database configuration file. As with other unknown
parameter names, these warnings can help to find typos early.
* Container support: Postfix 3.3 will run in the foreground with
"postfix start-fg". This requires that Postfix multi-instance
support is disabled (the default). To collect Postfix syslog
information on the container's host, mount the host's /dev/log
socket into the container, for example with "docker run -v
/dev/log:/dev/log ...other options...", and specify a distinct
Postfix syslog_name setting in the container (for example with
"postconf syslog_name=the-name-here").
* Milter support: applications can now send RET and ENVID parameters
in SMFIR_CHGFROM (change envelope sender) requests.
* Postfix-generated From: headers with 'full name' information
are now formatted as "From: name <address>" by default. Specify
"header_from_format = obsolete" to get the earlier form "From:
address (name)".
* Interoperability: when Postfix IPv6 and IPv4 support are both
enabled, the Postfix SMTP client will now relax MX preferences
and attempt to schedule similar numbers of IPv4 and IPv6
addresses. This works around mail delivery problems when a
destination announces lots of primary MX addresses on IPv6, but
is reachable only over IPv4 (or vice versa). The new behavior
is controlled with the smtp_balance_mx_inet_protocols parameter.
* Compatibility safety net: with compatibility_level < 1, the
Postfix SMTP server now warns for mail that would be blocked
by the Postfix 2.10 smtpd_relay_restrictions feature, without
blocking that mail. There still is a steady trickle of sites
that upgrade from an earlier Postfix version.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Feb 13 10:39:37 UTC 2018 - varkoly@suse.com Tue Feb 13 10:39:37 UTC 2018 - varkoly@suse.com

View File

@ -12,32 +12,15 @@
# license that conforms to the Open Source Definition (Version 1.9) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org
# #
#Compat macro for new _fillupdir macro introduced in Nov 2017
%if ! %{defined _fillupdir}
%define _fillupdir /var/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
#
# Some defines
#
%define pf_docdir %{_docdir}/%{name}-doc %define pf_docdir %{_docdir}/%{name}-doc
%define pf_config_directory %{_sysconfdir}/%{name} %define pf_config_directory %{_sysconfdir}/%{name}
%define pf_daemon_directory /usr/lib/%{name}/bin/ %define pf_daemon_directory %{_prefix}/lib/%{name}/bin/
%define _libexecdir /usr/lib %define _libexecdir %{_prefix}/lib
%define pf_shlib_directory /usr/lib/%{name} %define pf_shlib_directory %{_prefix}/lib/%{name}
%define pf_command_directory %{_prefix}/sbin %define pf_command_directory %{_sbindir}
%define pf_queue_directory var/spool/%{name} %define pf_queue_directory var/spool/%{name}
%define pf_sendmail_path %{_sbindir}/sendmail %define pf_sendmail_path %{_sbindir}/sendmail
%define pf_newaliases_path %{_bindir}/newaliases %define pf_newaliases_path %{_bindir}/newaliases
@ -50,31 +33,34 @@
%define pf_uid 51 %define pf_uid 51
%define pf_gid 51 %define pf_gid 51
%define maildrop_gid 59 %define maildrop_gid 59
%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 omc_pdir %{_datadir}/omc/ %define omc_pdir %{_datadir}/omc/
%define omc_dir %{_datadir}/omc/svcinfo.d/ %define omc_dir %{_datadir}/omc/svcinfo.d/
#
%define vmusr vmail %define vmusr vmail
%define vmgid 303 %define vmgid 303
%define vmid 303 %define vmid 303
%define vmdir /srv/maildirs %define vmdir /srv/maildirs
# %define unitdir %{_libexecdir}/systemd
# --------------------------------------------------------------------------- #Compat macro for new _fillupdir macro introduced in Nov 2017
%if 0%{?suse_version} > 1220 %if ! %{defined _fillupdir}
%define _unitdir %{_libexecdir}/systemd %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 %else
%define _unitdir /lib/systemd %bcond_with lmdb
%bcond_with libnsl
%endif %endif
Name: postfix Name: postfix
Version: 3.2.4 Version: 3.3.0
Release: 0 Release: 0
Summary: A fast, secure, and flexible mailer Summary: A fast, secure, and flexible mailer
License: IPL-1.0 License: IPL-1.0 OR EPL-2.0
Group: Productivity/Networking/Email/Servers Group: Productivity/Networking/Email/Servers
Url: http://www.postfix.org/ URL: http://www.postfix.org
#Source: http://www.artfiles.org/postfix.org/postfix-release/official/postfix-%{version}.tar.gz Source0: http://cdn.postfix.johnriley.me/mirrors/postfix-release/official/postfix-%{version}.tar.gz
Source: postfix-%{version}.tar.gz
Source2: %{name}-SuSE.tar.gz Source2: %{name}-SuSE.tar.gz
Source3: %{name}-mysql.tar.bz2 Source3: %{name}-mysql.tar.bz2
Source10: %{name}-rpmlintrc Source10: %{name}-rpmlintrc
@ -87,80 +73,59 @@ Patch5: %{name}-master.cf.patch
Patch6: %{name}-linux45.patch Patch6: %{name}-linux45.patch
Patch7: %{name}-ssl-release-buffers.patch 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
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: libopenssl-devel BuildRequires: fdupes
%if %{with lmdb}
BuildRequires: lmdb-devel
%endif
BuildRequires: libicu-devel BuildRequires: libicu-devel
%if %{with libnsl} BuildRequires: libopenssl-devel
BuildRequires: libnsl-devel
%endif
BuildRequires: mysql-devel BuildRequires: mysql-devel
BuildRequires: openldap2-devel BuildRequires: openldap2-devel
BuildRequires: pcre-devel BuildRequires: pcre-devel
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: postgresql-devel BuildRequires: postgresql-devel
BuildRequires: shadow BuildRequires: shadow
BuildRequires: systemd
Requires: iproute2 Requires: iproute2
Requires(pre): permissions
Requires(post): permissions Requires(post): permissions
Requires(pre): %fillup_prereq Requires(pre): %fillup_prereq
Requires(pre): permissions
Requires(pre): shadow Requires(pre): shadow
Provides: smtp_daemon
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Conflicts: sendmail exim
%if 0%{?suse_version} > 1130
Requires(pre): sysvinit(network) Requires(pre): sysvinit(network)
Requires(pre): sysvinit(syslog) Requires(pre): sysvinit(syslog)
Conflicts: exim
Conflicts: sendmail
Provides: smtp_daemon
%{?systemd_requires}
%if %{with lmdb}
BuildRequires: lmdb-devel
%endif %endif
%if 0%{?suse_version} >= 1100 %if %{with libnsl}
BuildRequires: fdupes BuildRequires: libnsl-devel
%endif %endif
%if 0%{?suse_version} >= 1330 %if 0%{?suse_version} >= 1330
Requires(pre): group(%{mail_group})
Requires: system-user-nobody
Requires: group(%{mail_group}) Requires: group(%{mail_group})
%endif Requires: system-user-nobody
%if 0%{?suse_version} > 1210 Requires(pre): group(%{mail_group})
BuildRequires: systemd
%{?systemd_requires}
%else
Requires(pre): %insserv_prereq
Requires(pre): %{_bindir}/getent
Requires(pre): pwdutils
Requires(pre): /bin/awk
Requires(pre): /bin/grep
Requires(pre): /bin/sed
Requires(pre): fileutils
Requires(pre): netcfg
Requires(pre): pcre
Requires(pre): sh-utils
Requires(pre): textutils
%endif %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.
%package devel %package devel
Summary: Development headers for the postfix package Summary: Development headers for the %{name} package
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires(pre): %{name} = %{version} Requires(pre): %{name} = %{version}
%description devel %description devel
Postfix aims to be an alternative to the widely-used sendmail program. Postfix aims to be an alternative to the widely-used sendmail program.
%package doc %package doc
Summary: Documentations for the postfix package Summary: Documentations for the %{name} package
Group: Productivity/Networking/Email/Servers Group: Productivity/Networking/Email/Servers
%if 0%{?suse_version} >= 1120
BuildArch: noarch BuildArch: noarch
%endif
%description doc %description doc
Postfix aims to be an alternative to the widely-used sendmail program. Postfix aims to be an alternative to the widely-used sendmail program.
@ -169,8 +134,8 @@ This package contains the documentation for %{name}
%package mysql %package mysql
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}
Requires(pre): shadow Requires(pre): shadow
%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
@ -179,7 +144,7 @@ starting %{name} if you'll access a postmap which is stored in mysql.
%package postgresql %package postgresql
Summary: Postfix plugin to support PostgreSQL maps Summary: Postfix plugin to support PostgreSQL maps
Group: Productivity/Networking/Email/Servers Group: Productivity/Networking/Email/Servers
Requires(pre): %{name} = %{version} Requires(pre): %{name} = %{version}
%description postgresql %description postgresql
Postfix plugin to support PostgreSQL maps. This library will be loaded Postfix plugin to support PostgreSQL maps. This library will be loaded
@ -190,7 +155,7 @@ PostgreSQL.
%package lmdb %package lmdb
Summary: Postfix plugin to support LMDB maps Summary: Postfix plugin to support LMDB maps
Group: Productivity/Networking/Email/Servers Group: Productivity/Networking/Email/Servers
Requires(pre): %{name} = %{version} Requires(pre): %{name} = %{version}
%description lmdb %description lmdb
Postfix plugin to support LMDB maps. This library will be loaded Postfix plugin to support LMDB maps. This library will be loaded
@ -259,10 +224,10 @@ export AUXLIBS_LMDB="-llmdb"
export PIE=-pie export PIE=-pie
make makefiles pie=yes shared=yes dynamicmaps=yes \ make makefiles pie=yes shared=yes dynamicmaps=yes \
shlib_directory=/usr/lib/postfix \ shlib_directory=%{_prefix}/lib/%{name} \
meta_directory=/usr/lib/postfix \ meta_directory=%{_prefix}/lib/%{name} \
config_directory=/etc/postfix config_directory=%{_sysconfdir}/%{name}
make make %{?_smp_mflags}
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
%install %install
@ -271,13 +236,13 @@ groupadd -g %{maildrop_gid} -o -r maildrop 2> /dev/null || :
useradd -r -o -g %{name} -u %{pf_uid} -s /bin/false -c "Postfix Daemon" -d /%{pf_queue_directory} %{name} 2> /dev/null || : useradd -r -o -g %{name} -u %{pf_uid} -s /bin/false -c "Postfix Daemon" -d /%{pf_queue_directory} %{name} 2> /dev/null || :
usermod -G %{maildrop_gid},%{mail_group} %{name} 2> /dev/null || : usermod -G %{maildrop_gid},%{mail_group} %{name} 2> /dev/null || :
mkdir -p %{buildroot}/%{_libdir} mkdir -p %{buildroot}/%{_libdir}
mkdir -p %{buildroot}/etc/postfix mkdir -p %{buildroot}%{_sysconfdir}/%{name}
cp conf/* %{buildroot}/etc/postfix/ 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}/etc/postfix/ssl/certs mkdir -p %{buildroot}%{_sysconfdir}/%{name}/ssl/certs
# link cacerts to /etc/ssl/certs # link cacerts to /etc/ssl/certs
ln -sf ../../ssl/certs %{buildroot}/etc/postfix/ssl/cacerts ln -sf ../../ssl/certs %{buildroot}%{_sysconfdir}/%{name}/ssl/cacerts
cp lib/libpostfix-* %{buildroot}/%{_libdir} cp lib/lib%{name}-* %{buildroot}/%{_libdir}
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}/%{_libdir} export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}/%{_libdir}
sh postfix-install -non-interactive \ sh postfix-install -non-interactive \
install_root=%{buildroot} \ install_root=%{buildroot} \
@ -296,22 +261,17 @@ ln -sf ../sbin/sendmail %{buildroot}%{_libexecdir}/sendmail
for i in qmqp-source smtp-sink smtp-source; do for i in qmqp-source smtp-sink smtp-source; do
install -m 755 bin/$i %{buildroot}%{_sbindir}/$i install -m 755 bin/$i %{buildroot}%{_sbindir}/$i
done done
%if 0%{?suse_version} < 1210
mkdir -p %{buildroot}%{_sysconfdir}/init.d
%endif
mkdir -p %{buildroot}/sbin/conf.d mkdir -p %{buildroot}/sbin/conf.d
mkdir -p %{buildroot}%{_sysconfdir}/permissions.d mkdir -p %{buildroot}%{_sysconfdir}/permissions.d
mkdir -p %{buildroot}/%{_libdir}/sasl2 mkdir -p %{buildroot}/%{_libdir}/sasl2
mkdir -p %{buildroot}%{_prefix}/sbin mkdir -p %{buildroot}%{_sbindir}
mkdir -p %{buildroot}/%{conf_backup_dir} mkdir -p %{buildroot}/%{conf_backup_dir}
mkdir -p %{buildroot}/%{pf_sample_directory} mkdir -p %{buildroot}/%{pf_sample_directory}
mkdir -p %{buildroot}/%{pf_html_directory} mkdir -p %{buildroot}/%{pf_html_directory}
mkdir -p %{buildroot}%{_includedir}/%{name} mkdir -p %{buildroot}%{_includedir}/%{name}
mkdir -p %{buildroot}%{_sysconfdir}/pam.d mkdir -p %{buildroot}%{_sysconfdir}/pam.d
install -m 644 %{name}-SuSE/smtp %{buildroot}%{_sysconfdir}/pam.d/smtp install -m 644 %{name}-SuSE/smtp %{buildroot}%{_sysconfdir}/pam.d/smtp
#mkdir samples
mkdir -p %{buildroot}%{_fillupdir} mkdir -p %{buildroot}%{_fillupdir}
rm -f %{buildroot}%{_fillupdir}/sysconfig.%{name}
sed -e 's;@lib@;%{_lib};g' %{name}-SuSE/sysconfig.%{name} > %{buildroot}%{_fillupdir}/sysconfig.%{name} sed -e 's;@lib@;%{_lib};g' %{name}-SuSE/sysconfig.%{name} > %{buildroot}%{_fillupdir}/sysconfig.%{name}
install -m 644 %{name}-SuSE/sysconfig.mail-%{name} %{buildroot}%{_fillupdir}/sysconfig.mail-%{name} install -m 644 %{name}-SuSE/sysconfig.mail-%{name} %{buildroot}%{_fillupdir}/sysconfig.mail-%{name}
sed -e 's;@lib@;%{_lib};g' \ sed -e 's;@lib@;%{_lib};g' \
@ -328,10 +288,10 @@ sed -e 's;@lib@;%{_lib};g' \
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/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}/postfix/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}
install -m 644 %{name}-SuSE/sender_canonical %{buildroot}%{_sysconfdir}/%{name}/sender_canonical install -m 644 %{name}-SuSE/sender_canonical %{buildroot}%{_sysconfdir}/%{name}/sender_canonical
install -m 644 %{name}-SuSE/relay %{buildroot}%{_sysconfdir}/postfix/relay install -m 644 %{name}-SuSE/relay %{buildroot}%{_sysconfdir}/%{name}/relay
install -m 644 %{name}-SuSE/relay_ccerts %{buildroot}%{_sysconfdir}/%{name}/relay_ccerts install -m 644 %{name}-SuSE/relay_ccerts %{buildroot}%{_sysconfdir}/%{name}/relay_ccerts
install -m 600 %{name}-SuSE/sasl_passwd %{buildroot}%{_sysconfdir}/%{name}/sasl_passwd install -m 600 %{name}-SuSE/sasl_passwd %{buildroot}%{_sysconfdir}/%{name}/sasl_passwd
mkdir -p %{buildroot}%{_sysconfdir}/sasl2 mkdir -p %{buildroot}%{_sysconfdir}/sasl2
@ -370,7 +330,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
install -m 644 %{name}-SuSE/%{name}-files %{buildroot}%{pf_shlib_directory}/postfix-files install -m 644 %{name}-SuSE/%{name}-files %{buildroot}%{pf_shlib_directory}/%{name}-files
# 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}/
@ -385,26 +345,22 @@ for example in AIX42 BSDI* F* HPUX* IRIX* NETBSD1 NEXTSTEP3 OPENSTEP4 OSF1 Solar
done done
cp -a examples/* %{buildroot}%{pf_sample_directory} cp -a examples/* %{buildroot}%{pf_sample_directory}
cp -a html/* %{buildroot}%{pf_html_directory} cp -a html/* %{buildroot}%{pf_html_directory}
cp -a auxiliary/ %{buildroot}%{pf_docdir}/ cp -a auxiliary %{buildroot}%{pf_docdir}
%if 0%{?suse_version} >= 1210 rm %{buildroot}%{pf_docdir}/README_FILES/INSTALL
mkdir -p %{buildroot}%{_unitdir}/system # Fix build for Leap 42.3.
mkdir -p %{buildroot}%{_sysconfdir}/postfix/system rm -f %{buildroot}%{_sysconfdir}/%{name}/*.orig
install -m 0644 %{name}-SuSE/postfix.service %{buildroot}%{_unitdir}/system/postfix.service mkdir -p %{buildroot}%{_unitdir}
install -m 0755 %{name}-SuSE/config_postfix.systemd %{buildroot}%{_sysconfdir}/postfix/system/config_postfix mkdir -p %{buildroot}%{_sysconfdir}/%{name}/system
install -m 0755 %{name}-SuSE/update_chroot.systemd %{buildroot}%{_sysconfdir}/postfix/system/update_chroot install -m 0644 %{name}-SuSE/%{name}.service %{buildroot}%{_unitdir}/%{name}.service
install -m 0755 %{name}-SuSE/update_postmaps.systemd %{buildroot}%{_sysconfdir}/postfix/system/update_postmaps install -m 0755 %{name}-SuSE/config_%{name}.systemd %{buildroot}%{_sysconfdir}/%{name}/system/config_%{name}
install -m 0755 %{name}-SuSE/wait_qmgr.systemd %{buildroot}%{_sysconfdir}/postfix/system/wait_qmgr install -m 0755 %{name}-SuSE/update_chroot.systemd %{buildroot}%{_sysconfdir}/%{name}/system/update_chroot
install -m 0755 %{name}-SuSE/cond_slp.systemd %{buildroot}%{_sysconfdir}/postfix/system/cond_slp install -m 0755 %{name}-SuSE/update_postmaps.systemd %{buildroot}%{_sysconfdir}/%{name}/system/update_postmaps
install -m 0755 %{name}-SuSE/wait_qmgr.systemd %{buildroot}%{_sysconfdir}/%{name}/system/wait_qmgr
install -m 0755 %{name}-SuSE/cond_slp.systemd %{buildroot}%{_sysconfdir}/%{name}/system/cond_slp
ln -sv %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} ln -sv %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
%else
install -m 755 %{name}-SuSE/rc.%{name} %{buildroot}%{_initddir}/%{name}
ln -s -f %{_initddir}/%{name} %{buildroot}%{_sbindir}/rc%{name}
%endif
%if 0%{?suse_version} >= 1100
%fdupes %{buildroot}%{pf_docdir} %fdupes %{buildroot}%{pf_docdir}
%fdupes %{buildroot}%{_mandir} %fdupes %{buildroot}%{_mandir}
%endif for path in %{buildroot}%{pf_shlib_directory}/lib%{name}-*.so
for path in %{buildroot}%{pf_shlib_directory}/libpostfix-*.so
do do
test -e "$path" || continue test -e "$path" || continue
name=${path##*/} name=${path##*/}
@ -416,9 +372,7 @@ done
install -m 755 %{SOURCE11} %{buildroot}%{_sbindir}/ install -m 755 %{SOURCE11} %{buildroot}%{_sbindir}/
%pre %pre
%if 0%{?suse_version} > 1210
%service_add_pre %{name}.service %service_add_pre %{name}.service
%endif
VERSIONTEST=$(test -x usr/sbin/postconf && usr/sbin/postconf proxy_read_maps 2>/dev/null || :) 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 [ -z "$VERSIONTEST" -a -f %{pf_queue_directory}/pid/master.pid ]; then
@ -451,9 +405,7 @@ fi
%preun %preun
%stop_on_removal %{name} %stop_on_removal %{name}
%if 0%{?suse_version} > 1210
%service_del_preun %{name}.service %service_del_preun %{name}.service
%endif
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
%preun mysql %preun mysql
@ -494,37 +446,37 @@ fi
# 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 [ ${1:-0} -gt 1 ]; then if [ ${1:-0} -gt 1 ]; then
touch %{_localstatedir}/adm/postfix.configured touch %{_localstatedir}/adm/%{name}.configured
# Check if main.cf and master.cf was changed manualy # Check if main.cf and master.cf was changed manualy
MAINCH=0 MAINCH=0
if [ -e %{_localstatedir}/adm/SuSEconfig/md5%{_sysconfdir}/postfix/main.cf ]; then if [ -e %{_localstatedir}/adm/SuSEconfig/md5%{_sysconfdir}/%{name}/main.cf ]; then
MD5SUM1=$( cat %{_localstatedir}/adm/SuSEconfig/md5%{_sysconfdir}/postfix/main.cf ) MD5SUM1=$( cat %{_localstatedir}/adm/SuSEconfig/md5%{_sysconfdir}/%{name}/main.cf )
MD5SUM2=$( grep -v "^#" %{_sysconfdir}/postfix/main.cf | md5sum ) MD5SUM2=$( grep -v "^#" %{_sysconfdir}/%{name}/main.cf | md5sum )
if [ "$MD5SUM1" != "$MD5SUM2" ]; then if [ "$MD5SUM1" != "$MD5SUM2" ]; then
MAINCH=1 MAINCH=1
fi fi
fi fi
MASTERCH=0 MASTERCH=0
if [ -e %{_localstatedir}/adm/SuSEconfig/md5%{_sysconfdir}/postfix/master.cf ]; then if [ -e %{_localstatedir}/adm/SuSEconfig/md5%{_sysconfdir}/%{name}/master.cf ]; then
MD5SUM1=$( cat %{_localstatedir}/adm/SuSEconfig/md5%{_sysconfdir}/postfix/master.cf ) MD5SUM1=$( cat %{_localstatedir}/adm/SuSEconfig/md5%{_sysconfdir}/%{name}/master.cf )
MD5SUM2=$( grep -v "^#" %{_sysconfdir}/postfix/master.cf | md5sum ) MD5SUM2=$( grep -v "^#" %{_sysconfdir}/%{name}/master.cf | md5sum )
if [ "$MD5SUM1" != "$MD5SUM2" ]; then if [ "$MD5SUM1" != "$MD5SUM2" ]; then
MASTERCH=1 MASTERCH=1
fi fi
fi fi
echo "Executing upgrade-configuration." echo "Executing upgrade-configuration."
%{_sbindir}/postfix set-permissions upgrade-configuration setgid_group=%{pf_setgid_group} || : %{_sbindir}/%{name} set-permissions upgrade-configuration setgid_group=%{pf_setgid_group} || :
if [ "$(/usr/sbin/postconf -h daemon_directory)" != "%{pf_daemon_directory}" ]; then if [ "$(%{_sbindir}/postconf -h daemon_directory)" != "%{pf_daemon_directory}" ]; then
/usr/sbin/postconf daemon_directory=%{pf_daemon_directory} %{_sbindir}/postconf daemon_directory=%{pf_daemon_directory}
fi fi
if [ $MASTERCH -eq 0 ]; then if [ $MASTERCH -eq 0 ]; then
test -e %{_localstatedir}/adm/SuSEconfig/md5%{_sysconfdir}/postfix/master.cf && grep -v "^#" %{_sysconfdir}/postfix/master.cf | md5sum > %{_localstatedir}/adm/SuSEconfig/md5%{_sysconfdir}/postfix/master.cf test -e %{_localstatedir}/adm/SuSEconfig/md5%{_sysconfdir}/%{name}/master.cf && grep -v "^#" %{_sysconfdir}/%{name}/master.cf | md5sum > %{_localstatedir}/adm/SuSEconfig/md5%{_sysconfdir}/postfix/master.cf
fi fi
if [ $MAINCH -eq 0 ]; then if [ $MAINCH -eq 0 ]; then
test -e %{_localstatedir}/adm/SuSEconfig/md5%{_sysconfdir}/postfix/main.cf && grep -v "^#" %{_sysconfdir}/postfix/main.cf | md5sum > %{_localstatedir}/adm/SuSEconfig/md5%{_sysconfdir}/postfix/main.cf test -e %{_localstatedir}/adm/SuSEconfig/md5%{_sysconfdir}/%{name}/main.cf && grep -v "^#" %{_sysconfdir}/%{name}/main.cf | md5sum > %{_localstatedir}/adm/SuSEconfig/md5%{_sysconfdir}/postfix/main.cf
fi fi
fi fi
%if 0%{?suse_version} > 1210
%service_add_post %{name}.service %service_add_post %{name}.service
%set_permissions %{_sbindir}/postqueue %set_permissions %{_sbindir}/postqueue
@ -533,31 +485,18 @@ fi
%set_permissions %{_sbindir}/sendmail %set_permissions %{_sbindir}/sendmail
%{fillup_only postfix} %{fillup_only postfix}
%else
%{fillup_and_insserv -y postfix}
%endif
%{fillup_only -an mail} %{fillup_only -an mail}
/sbin/ldconfig /sbin/ldconfig
%if 0%{?suse_version} > 1210
%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} %{fillup_only postfix}
%else
%{fillup_and_insserv -y postfix}
%endif
# ---------------------------------------------------------------------------
%postun %postun
%if 0%{?suse_version} > 1210
%service_del_postun %{name}.service %service_del_postun %{name}.service
%else
%restart_on_update %{name}
%insserv_cleanup
%endif
/sbin/ldconfig /sbin/ldconfig
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
@ -579,8 +518,7 @@ fi
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
%files %files
%defattr(-,root,root) %license LICENSE
%doc LICENSE
%config %{_sysconfdir}/pam.d/* %config %{_sysconfdir}/pam.d/*
%{_fillupdir}/sysconfig.%{name} %{_fillupdir}/sysconfig.%{name}
%{_fillupdir}/sysconfig.mail-%{name} %{_fillupdir}/sysconfig.mail-%{name}
@ -597,8 +535,11 @@ fi
%config(noreplace) %{_sysconfdir}/%{name}/ldap_aliases.cf %config(noreplace) %{_sysconfdir}/%{name}/ldap_aliases.cf
%config(noreplace) %{_sysconfdir}/%{name}/main.cf %config(noreplace) %{_sysconfdir}/%{name}/main.cf
%config(noreplace) %{_sysconfdir}/%{name}/master.cf %config(noreplace) %{_sysconfdir}/%{name}/master.cf
%config(noreplace) %{_sysconfdir}/%{name}/post-install %attr(0750,root,root) %config %{_sysconfdir}/%{name}/post-install
%config(noreplace) %{_sysconfdir}/%{name}/postfix-files %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
@ -606,7 +547,7 @@ fi
%config(noreplace) %{_sysconfdir}/%{name}/virtual %config(noreplace) %{_sysconfdir}/%{name}/virtual
%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/smtp %config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/smtp
%dir %{_sysconfdir}/sasl2/ %dir %{_sysconfdir}/sasl2
%config(noreplace) %{_sysconfdir}/sasl2/smtpd.conf %config(noreplace) %{_sysconfdir}/sasl2/smtpd.conf
%config %{_sysconfdir}/%{name}/LICENSE %config %{_sysconfdir}/%{name}/LICENSE
%config %{_sysconfdir}/%{name}/TLS_LICENSE %config %{_sysconfdir}/%{name}/TLS_LICENSE
@ -615,16 +556,12 @@ fi
%attr(0644, root, root) %config %{_sysconfdir}/%{name}/makedefs.out %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}/postfix/ssl %dir %{_sysconfdir}/%{name}/ssl
%dir %{_sysconfdir}/postfix/ssl/certs %dir %{_sysconfdir}/%{name}/ssl/certs
%{_sysconfdir}/postfix/ssl/cacerts %{_sysconfdir}/%{name}/ssl/cacerts
%if 0%{?suse_version} >= 1210 %dir %{_sysconfdir}/%{name}/system
%dir %{_sysconfdir}/postfix/system %config %attr(0755,root,root) %{_sysconfdir}/%{name}/system/*
%config %attr(0755,root,root) %{_sysconfdir}/postfix/system/* %{_unitdir}/%{name}.service
%{_unitdir}/system/postfix.service
%else
%config %attr(0755,root,root) %{_initddir}/%{name}
%endif
%verify(not mode) %attr(2755,root,%{pf_setgid_group}) %{_sbindir}/postdrop %verify(not mode) %attr(2755,root,%{pf_setgid_group}) %{_sbindir}/postdrop
%verify(not mode) %attr(2755,root,%{pf_setgid_group}) %{_sbindir}/postqueue %verify(not mode) %attr(2755,root,%{pf_setgid_group}) %{_sbindir}/postqueue
%{_bindir}/mailq %{_bindir}/mailq
@ -633,7 +570,7 @@ fi
%attr(0755,root,root) %{_sbindir}/postalias %attr(0755,root,root) %{_sbindir}/postalias
%attr(0755,root,root) %{_sbindir}/postcat %attr(0755,root,root) %{_sbindir}/postcat
%attr(0755,root,root) %{_sbindir}/postconf %attr(0755,root,root) %{_sbindir}/postconf
%attr(0755,root,root) %{_sbindir}/postfix %attr(0755,root,root) %{_sbindir}/%{name}
%attr(0755,root,root) %{_sbindir}/postkick %attr(0755,root,root) %{_sbindir}/postkick
%attr(0755,root,root) %{_sbindir}/postlock %attr(0755,root,root) %{_sbindir}/postlock
%attr(0755,root,root) %{_sbindir}/postlog %attr(0755,root,root) %{_sbindir}/postlog
@ -643,27 +580,27 @@ fi
%attr(0755,root,root) %{_sbindir}/qmqp-source %attr(0755,root,root) %{_sbindir}/qmqp-source
%attr(0755,root,root) %{_sbindir}/smtp-sink %attr(0755,root,root) %{_sbindir}/smtp-sink
%attr(0755,root,root) %{_sbindir}/smtp-source %attr(0755,root,root) %{_sbindir}/smtp-source
%attr(0755,root,root) %{_sbindir}/mkpostfixcert %attr(0755,root,root) %{_sbindir}/mk%{name}cert
%attr(0755,root,root) %{_sbindir}/check_mail_queue %attr(0755,root,root) %{_sbindir}/check_mail_queue
%attr(0755,root,root) %{_sbindir}/config.postfix %attr(0755,root,root) %{_sbindir}/config.%{name}
%{_sbindir}/rc%{name} %{_sbindir}/rc%{name}
%{_libdir}/lib* %{_libdir}/lib*
%{_libexecdir}/sendmail %{_libexecdir}/sendmail
%dir %{pf_shlib_directory} %dir %{pf_shlib_directory}
%{pf_shlib_directory}/*[^.so] %{pf_shlib_directory}/*[^.so]
%{pf_shlib_directory}/postfix-ldap.so %{pf_shlib_directory}/%{name}-ldap.so
%{pf_shlib_directory}/postfix-pcre.so %{pf_shlib_directory}/%{name}-pcre.so
%{pf_shlib_directory}/libpostfix-dns.so %{pf_shlib_directory}/lib%{name}-dns.so
%{pf_shlib_directory}/libpostfix-global.so %{pf_shlib_directory}/lib%{name}-global.so
%{pf_shlib_directory}/libpostfix-master.so %{pf_shlib_directory}/lib%{name}-master.so
%{pf_shlib_directory}/libpostfix-tls.so %{pf_shlib_directory}/lib%{name}-tls.so
%{pf_shlib_directory}/libpostfix-util.so %{pf_shlib_directory}/lib%{name}-util.so
%{pf_shlib_directory}/main.cf.proto %{pf_shlib_directory}/main.cf.proto
%{pf_shlib_directory}/master.cf.proto %{pf_shlib_directory}/master.cf.proto
%{conf_backup_dir} %{conf_backup_dir}
%dir %attr(0700,%{name},root) %{pf_data_directory} %dir %attr(0700,%{name},root) %{pf_data_directory}
%{_mandir}/man?/*.gz %{_mandir}/man?/*%{?ext_man}
%dir %attr(0755,root,root) /%{pf_queue_directory} %dir %attr(0755,root,root) /%{pf_queue_directory}
%dir %attr(0700,%{name},root) /%{pf_queue_directory}/active %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}/bounce
@ -680,7 +617,6 @@ fi
%dir %attr(0710,%{name},maildrop) /%{pf_queue_directory}/public %dir %attr(0710,%{name},maildrop) /%{pf_queue_directory}/public
%files devel %files devel
%defattr(-,root,root)
%{_includedir}/%{name}/ %{_includedir}/%{name}/
%files doc %files doc
@ -688,20 +624,17 @@ fi
%{pf_docdir}/ %{pf_docdir}/
%files mysql %files mysql
%defattr(-,root,root)
%doc %{name}-mysql/%{name}-mysql.sql %doc %{name}-mysql/%{name}-mysql.sql
%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}/postfix-mysql.so %{pf_shlib_directory}/%{name}-mysql.so
%files postgresql %files postgresql
%defattr(-,root,root) %{pf_shlib_directory}/%{name}-pgsql.so
%{pf_shlib_directory}/postfix-pgsql.so
%if %{with lmdb} %if %{with lmdb}
%files lmdb %files lmdb
%defattr(-,root,root) %{pf_shlib_directory}/%{name}-lmdb.so
%{pf_shlib_directory}/postfix-lmdb.so
%endif %endif
%changelog %changelog