2007-01-16 00:33:08 +01:00
|
|
|
#
|
2009-01-09 01:51:30 +01:00
|
|
|
# spec file for package postfix (Version 2.5.6)
|
2007-01-16 00:33:08 +01:00
|
|
|
#
|
2009-01-09 01:51:30 +01:00
|
|
|
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-16 00:33:08 +01:00
|
|
|
#
|
2008-08-07 01:34:35 +02:00
|
|
|
# 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.
|
|
|
|
|
2007-01-16 00:33:08 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
2008-02-15 01:38:21 +01:00
|
|
|
|
2007-01-16 00:33:08 +01:00
|
|
|
Name: postfix
|
|
|
|
#!BuildIgnore: sendmail
|
|
|
|
BuildRequires: db-devel mysql-devel openldap2-devel pcre-devel postgresql-devel
|
2007-03-29 18:25:21 +02:00
|
|
|
# require pwdutils to make postinstall script check work
|
|
|
|
BuildRequires: pwdutils
|
2007-01-16 00:33:08 +01:00
|
|
|
%define usetls 1
|
2007-10-08 16:52:13 +02:00
|
|
|
Url: http://www.postfix.org/
|
2009-07-23 16:00:50 +02:00
|
|
|
License: IBM Public License ..
|
2007-01-16 00:33:08 +01:00
|
|
|
Group: Productivity/Networking/Email/Servers
|
|
|
|
Provides: smtp_daemon
|
|
|
|
Conflicts: sendmail exim
|
2007-10-08 16:52:13 +02:00
|
|
|
AutoReqProv: on
|
2007-01-16 00:33:08 +01:00
|
|
|
Summary: A fast, secure, and flexible mailer
|
2009-01-09 01:51:30 +01:00
|
|
|
Version: 2.5.6
|
2009-07-23 16:00:50 +02:00
|
|
|
Release: 5
|
2009-01-12 12:08:17 +01:00
|
|
|
Source: postfix-%{version}.tar.bz2
|
2007-01-16 00:33:08 +01:00
|
|
|
Source1: postfix-SuSE.tar.gz
|
|
|
|
Patch: dynamic_maps.patch
|
|
|
|
Patch1: dynamic_maps_pie.patch
|
2007-03-07 22:50:13 +01:00
|
|
|
Patch2: pointer_to_literals.patch
|
|
|
|
Patch3: ipv6_disabled.patch
|
2007-10-08 16:52:13 +02:00
|
|
|
PreReq: /usr/sbin/useradd /usr/sbin/groupadd %insserv_prereq %fillup_prereq /bin/sed /bin/awk /bin/grep textutils sh-utils fileutils pcre openldap2-client netcfg
|
2007-01-16 00:33:08 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
#
|
2007-10-08 16:52:13 +02:00
|
|
|
|
2007-01-16 00:33:08 +01:00
|
|
|
%package mysql
|
2009-07-23 16:00:50 +02:00
|
|
|
License: IBM Public License ..
|
2008-09-13 12:02:46 +02:00
|
|
|
Summary: Postfix plugin to support MySQL maps
|
2007-10-08 16:52:13 +02:00
|
|
|
AutoReqProv: on
|
2007-01-16 00:33:08 +01:00
|
|
|
Group: Productivity/Networking/Email/Servers
|
2007-10-08 16:52:13 +02:00
|
|
|
PreReq: %{name} = %{version}
|
2007-01-16 00:33:08 +01:00
|
|
|
#
|
2007-10-08 16:52:13 +02:00
|
|
|
|
2007-01-16 00:33:08 +01:00
|
|
|
%package postgresql
|
2009-07-23 16:00:50 +02:00
|
|
|
License: IBM Public License ..
|
2008-09-13 12:02:46 +02:00
|
|
|
Summary: Postfix plugin to support PostgreSQL maps
|
2007-10-08 16:52:13 +02:00
|
|
|
AutoReqProv: on
|
2007-01-16 00:33:08 +01:00
|
|
|
Group: Productivity/Networking/Email/Servers
|
2007-10-08 16:52:13 +02:00
|
|
|
PreReq: %{name} = %{version}
|
2007-01-16 00:33:08 +01:00
|
|
|
#
|
2007-10-08 16:52:13 +02:00
|
|
|
|
2007-01-16 00:33:08 +01:00
|
|
|
%package devel
|
2009-07-23 16:00:50 +02:00
|
|
|
License: IBM Public License ..
|
2008-09-13 12:02:46 +02:00
|
|
|
Summary: Development headers for the postfix package
|
2007-10-08 16:52:13 +02:00
|
|
|
AutoReqProv: on
|
2007-01-16 00:33:08 +01:00
|
|
|
Group: Productivity/Networking/Email/Servers
|
2007-10-08 16:52:13 +02:00
|
|
|
PreReq: %{name} = %{version}
|
2008-10-22 18:42:21 +02:00
|
|
|
|
|
|
|
%package doc
|
2009-07-23 16:00:50 +02:00
|
|
|
License: IBM Public License ..
|
2008-10-22 18:42:21 +02:00
|
|
|
Summary: Documentations for the postfix package
|
|
|
|
AutoReqProv: on
|
|
|
|
Group: Productivity/Networking/Email/Servers
|
|
|
|
PreReq: %{name} = %{version}
|
2007-01-16 00:33:08 +01:00
|
|
|
#
|
|
|
|
# Some defines
|
|
|
|
#
|
|
|
|
%define postfixfiles postfix.filelist
|
|
|
|
%define pf_config_directory /etc/postfix
|
|
|
|
%define pf_daemon_directory /usr/lib/postfix
|
|
|
|
%define pf_command_directory /usr/sbin
|
2008-08-07 01:34:35 +02:00
|
|
|
%define pf_queue_directory var/spool/postfix
|
2007-01-16 00:33:08 +01:00
|
|
|
%define pf_sendmail_path /usr/sbin/sendmail
|
|
|
|
%define pf_newaliases_path /usr/bin/newaliases
|
|
|
|
%define pf_mailq_path /usr/bin/mailq
|
|
|
|
%define pf_setgid_group maildrop
|
2008-10-22 18:42:21 +02:00
|
|
|
%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
|
2008-02-01 23:38:24 +01:00
|
|
|
%define pf_data_directory /var/lib/postfix
|
2007-01-16 00:33:08 +01:00
|
|
|
%define postfix_uid 51
|
|
|
|
%define postfix_gid 51
|
|
|
|
%define maildrop_gid 59
|
|
|
|
%define conf_backup_dir /var/adm/backup/postfix
|
2007-03-29 18:25:21 +02:00
|
|
|
%define omc_pdir /usr/share/omc/
|
2007-01-18 01:51:49 +01:00
|
|
|
%define omc_dir /usr/share/omc/svcinfo.d/
|
2007-01-16 00:33:08 +01:00
|
|
|
#
|
|
|
|
# ---------------------------------------------------------------------------
|
2007-10-08 16:52:13 +02:00
|
|
|
|
2007-01-16 00:33:08 +01:00
|
|
|
%prep
|
|
|
|
%setup -n postfix-%{version} -a 1
|
2007-05-04 10:11:50 +02:00
|
|
|
%patch
|
2007-08-06 21:56:28 +02:00
|
|
|
%patch1
|
2007-03-07 22:50:13 +01:00
|
|
|
%patch2 -p1
|
|
|
|
%patch3 -p1
|
2007-01-16 00:33:08 +01:00
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
%build
|
|
|
|
export CCARGS="-DHAS_LDAP -DHAS_PCRE -DUSE_SASL_AUTH -I/usr/include/sasl"
|
|
|
|
export CCARGS="$CCARGS -DMAX_DYNAMIC_MAPS"
|
|
|
|
export CCARGS="$CCARGS -DHAS_MYSQL -I/usr/include/mysql"
|
|
|
|
export CCARGS="$CCARGS -DHAS_PGSQL -I/usr/include/pgsql"
|
|
|
|
export CCARGS="$CCARGS -DUSE_CYRUS_SASL"
|
|
|
|
export AUXLIBS="-lldap -llber -lpcre"
|
|
|
|
export AUXLIBS="$AUXLIBS -lsasl2"
|
|
|
|
%if %{usetls}
|
|
|
|
export AUXLIBS="$AUXLIBS -lssl -lcrypto"
|
|
|
|
%endif
|
|
|
|
%if %{usetls}
|
|
|
|
export CCARGS="$CCARGS -DUSE_TLS"
|
|
|
|
%endif
|
|
|
|
export CCARGS="$CCARGS $RPM_OPT_FLAGS -Wno-comments"
|
|
|
|
export PIE=-pie
|
|
|
|
make makefiles DEBUG=""
|
|
|
|
cd lib
|
|
|
|
for i in dns global master tls util milter; do
|
|
|
|
ln -sf lib${i}.a libpostfix-${i}.so.1.0.1;
|
|
|
|
done
|
|
|
|
cd -
|
|
|
|
make LD_LIBRARY_PATH=$(pwd)/lib:${LD_LIBRARY_PATH}
|
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
%install
|
|
|
|
/usr/sbin/groupadd -g %{postfix_gid} -o -r postfix 2> /dev/null || :
|
|
|
|
/usr/sbin/groupadd -g %{maildrop_gid} -o -r maildrop 2> /dev/null || :
|
2008-08-07 01:34:35 +02:00
|
|
|
/usr/sbin/useradd -r -o -g postfix -u %{postfix_uid} -s /bin/false -c "Postfix Daemon" -d /%{pf_queue_directory} postfix 2> /dev/null || :
|
2007-01-16 00:33:08 +01:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{_libdir}
|
|
|
|
install lib/*.1 $RPM_BUILD_ROOT/%{_libdir}
|
|
|
|
for i in $RPM_BUILD_ROOT/%{_libdir}/*.1; do
|
|
|
|
ln -sf ${i##*/} ${i%.*.*}
|
|
|
|
done
|
|
|
|
cd lib
|
|
|
|
for i in libpostfix-*; do
|
|
|
|
ln -sf $i $RPM_BUILD_ROOT/%{_libdir}/${i%so.*}so
|
|
|
|
done
|
|
|
|
cd -
|
|
|
|
ln -sf $(pwd)/lib/dict_* libexec/
|
|
|
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$RPM_BUILD_ROOT/%{_libdir}
|
|
|
|
sh postfix-install -non-interactive \
|
|
|
|
install_root=%{buildroot} \
|
|
|
|
config_directory=%{pf_config_directory} \
|
|
|
|
daemon_directory=%{pf_daemon_directory} \
|
|
|
|
command_directory=%{pf_command_directory} \
|
2008-08-07 01:34:35 +02:00
|
|
|
queue_directory=/%{pf_queue_directory} \
|
2007-01-16 00:33:08 +01:00
|
|
|
sendmail_path=%{pf_sendmail_path} \
|
|
|
|
newaliases_path=%{pf_newaliases_path} \
|
|
|
|
mailq_path=%{pf_mailq_path} \
|
|
|
|
manpage_directory=%{_mandir} \
|
|
|
|
setgid_group=%{pf_setgid_group} \
|
2008-02-01 23:38:24 +01:00
|
|
|
readme_directory=%{pf_readme_directory} \
|
|
|
|
data_directory=%{pf_data_directory}
|
2007-01-16 00:33:08 +01:00
|
|
|
ln -sf ../sbin/sendmail $RPM_BUILD_ROOT/usr/lib/sendmail
|
|
|
|
for i in qmqp-source smtp-sink smtp-source; do
|
|
|
|
install -m 755 bin/$i $RPM_BUILD_ROOT/usr/sbin/$i
|
|
|
|
done
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/sbin/conf.d
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/permissions.d
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{_libdir}/sasl2
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/usr/sbin
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{conf_backup_dir}
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{pf_sample_directory}
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/usr/include/postfix
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/pam.d
|
|
|
|
install -m 644 postfix-SuSE/smtp $RPM_BUILD_ROOT/etc/pam.d/smtp
|
|
|
|
#mkdir samples
|
|
|
|
install -m 755 postfix-SuSE/rc.postfix $RPM_BUILD_ROOT/etc/init.d/postfix
|
|
|
|
ln -sf ../etc/init.d/postfix $RPM_BUILD_ROOT/sbin/rcpostfix
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
|
|
|
|
rm -f $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.postfix
|
|
|
|
sed -e 's;@lib@;%{_lib};g' postfix-SuSE/sysconfig.postfix > $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.postfix
|
|
|
|
install -m 644 postfix-SuSE/sysconfig.mail-postfix $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.mail-postfix
|
|
|
|
rm -f $RPM_BUILD_ROOT/sbin/conf.d/SuSEconfig.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/SuSEconfig.postfix \
|
|
|
|
> $RPM_BUILD_ROOT/sbin/conf.d/SuSEconfig.postfix
|
|
|
|
chmod 755 $RPM_BUILD_ROOT/sbin/conf.d/SuSEconfig.postfix
|
|
|
|
install -m 644 postfix-SuSE/master.cf $RPM_BUILD_ROOT/etc/postfix/master.cf
|
|
|
|
install -m 644 postfix-SuSE/dynamicmaps.cf $RPM_BUILD_ROOT/etc/postfix/dynamicmaps.cf
|
|
|
|
install -m 644 postfix-SuSE/permissions $RPM_BUILD_ROOT/etc/permissions.d/postfix
|
|
|
|
install -m 644 postfix-SuSE/sender_canonical $RPM_BUILD_ROOT/etc/postfix/sender_canonical
|
|
|
|
install -m 644 postfix-SuSE/relay_ccerts $RPM_BUILD_ROOT/etc/postfix/relay_ccerts
|
|
|
|
install -m 600 postfix-SuSE/sasl_passwd $RPM_BUILD_ROOT/etc/postfix/sasl_passwd
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/sasl2
|
|
|
|
install -m 600 postfix-SuSE/smtpd.conf $RPM_BUILD_ROOT/etc/sasl2/smtpd.conf
|
|
|
|
install -m 644 postfix-SuSE/openssl_postfix.conf.in $RPM_BUILD_ROOT/etc/postfix/openssl_postfix.conf.in
|
|
|
|
install -m 755 postfix-SuSE/mkpostfixcert $RPM_BUILD_ROOT/usr/sbin/mkpostfixcert
|
2008-08-07 01:34:35 +02:00
|
|
|
rm -rf $RPM_BUILD_ROOT/%{pf_queue_directory}
|
2007-01-16 00:33:08 +01:00
|
|
|
install -m 644 postfix-SuSE/master.cf $RPM_BUILD_ROOT/%{conf_backup_dir}/master.cf
|
2007-01-18 01:51:49 +01:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{omc_dir}
|
2007-02-26 19:06:55 +01:00
|
|
|
install -m 644 postfix-SuSE/postfix.xml $RPM_BUILD_ROOT/%{omc_dir}
|
2007-10-22 18:39:54 +02:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services/
|
|
|
|
install -m 644 postfix-SuSE/postfix-fw $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services/postfix
|
2007-01-16 00:33:08 +01:00
|
|
|
{
|
|
|
|
cat<<EOF
|
|
|
|
#
|
|
|
|
# -----------------------------------------------------------------------
|
|
|
|
# NOTE: Many parameters have already been added to the end of this file
|
|
|
|
# by SuSEconfig.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
|
|
|
|
} > $RPM_BUILD_ROOT/etc/postfix/main.cf
|
|
|
|
$RPM_BUILD_ROOT/usr/sbin/postconf -c $RPM_BUILD_ROOT/etc/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}" \
|
|
|
|
"biff = no" \
|
|
|
|
"inet_protocols = all"
|
|
|
|
install -m 644 $RPM_BUILD_ROOT/etc/postfix/main.cf $RPM_BUILD_ROOT/%{conf_backup_dir}/main.cf
|
|
|
|
# -----------------------------------------------------------------------
|
|
|
|
# preparing /etc/postfix/postfix-files to be able to use postfix
|
|
|
|
# own upgrade script. Unfortunately it looks in postfix-files and
|
|
|
|
# expects aliases file at /etc/postfix/aliases and it expects to have
|
|
|
|
# unzipped manpages
|
|
|
|
# also remove the both sql dictionary libs as they will not be installed
|
|
|
|
# per default
|
|
|
|
# -----------------------------------------------------------------------
|
|
|
|
rm -f $RPM_BUILD_ROOT/etc/postfix/aliases
|
|
|
|
rm -f $RPM_BUILD_ROOT/etc/postfix/postfix-files
|
|
|
|
sed 's;^$config_directory/aliases\(.*\);/etc/aliases\1;' conf/postfix-files \
|
|
|
|
| grep -v '^$manpage_directory' | grep -Ev 'dict_(mysql|pgsql)' > $RPM_BUILD_ROOT/etc/postfix/postfix-files
|
|
|
|
rm -f %{postfixfiles}
|
|
|
|
test -f conf/postfix-files || {
|
|
|
|
echo "conf/postfix-files does not exist!"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
echo "%defattr(-,root,root)" >> %{postfixfiles}
|
|
|
|
exec <conf/postfix-files
|
|
|
|
while IFS=: read path type owner group mode flags junk; do
|
|
|
|
owner=${owner/\$mail_owner/postfix}
|
|
|
|
group=${group/\$setgid_group/%{pf_setgid_group}}
|
|
|
|
case $path in
|
|
|
|
\$queue_directory*)
|
|
|
|
path=${path/\$queue_directory/\/var\/spool\/postfix}
|
|
|
|
group=${group/-/root}
|
2008-08-07 01:34:35 +02:00
|
|
|
echo "%dir %attr($mode,$owner,$group) $path/" >> %{postfixfiles}
|
2007-01-16 00:33:08 +01:00
|
|
|
mkdir -m $mode -p $RPM_BUILD_ROOT/$path
|
|
|
|
printf '%%-38s %%-18s %%04d\n' $path "${owner}.${group}" $mode >> $RPM_BUILD_ROOT/etc/permissions.d/postfix
|
|
|
|
;;
|
|
|
|
\$command_directory/*)
|
|
|
|
path=${path/\$command_directory/\/usr\/sbin}
|
|
|
|
group=${group/-/root}
|
|
|
|
echo "%attr($mode,$owner,$group) $path" >> %{postfixfiles}
|
|
|
|
printf '%%-38s %%-18s %%04d\n' $path "${owner}.${group}" $mode >> $RPM_BUILD_ROOT/etc/permissions.d/postfix
|
|
|
|
;;
|
|
|
|
*) continue;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
# create paranoid permissions file
|
|
|
|
printf '%%-38s %%-18s %%s\n' /usr/sbin/postdrop "root.%{pf_setgid_group}" "0755" >> $RPM_BUILD_ROOT/etc/permissions.d/postfix.paranoid
|
|
|
|
printf '%%-38s %%-18s %%s\n' /usr/sbin/postqueue "root.%{pf_setgid_group}" "0755" >> $RPM_BUILD_ROOT/etc/permissions.d/postfix.paranoid
|
|
|
|
install -m 644 include/*.h $RPM_BUILD_ROOT/usr/include/postfix/
|
|
|
|
|
|
|
|
%pre
|
|
|
|
VERSIONTEST=$(test -x usr/sbin/postconf && usr/sbin/postconf proxy_read_maps 2>/dev/null)
|
2008-08-07 01:34:35 +02:00
|
|
|
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
|
2007-01-16 00:33:08 +01:00
|
|
|
echo "postfix is still running. You have to stop postfix in order to"
|
|
|
|
echo "install a newer version."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
/usr/sbin/groupadd -g %{postfix_gid} -o -r postfix 2> /dev/null || :
|
|
|
|
/usr/sbin/groupadd -g %{maildrop_gid} -o -r maildrop 2> /dev/null || :
|
2008-08-07 01:34:35 +02:00
|
|
|
/usr/sbin/useradd -r -o -g postfix -u %{postfix_uid} -s /bin/false -c "Postfix Daemon" -d /%{pf_queue_directory} postfix 2> /dev/null || :
|
2007-01-16 00:33:08 +01:00
|
|
|
|
|
|
|
%preun
|
|
|
|
%stop_on_removal postfix
|
|
|
|
|
|
|
|
%post
|
|
|
|
%{fillup_and_insserv -y postfix}
|
2009-07-23 16:00:50 +02:00
|
|
|
# We never have to run suseconfig for postfix after installation
|
|
|
|
# We only start postfix own upgrade-configuration by update
|
2008-11-04 18:06:01 +01:00
|
|
|
if [ ${1:-0} -gt 1 ]; then
|
|
|
|
echo "executing upgrade-configuration"
|
|
|
|
/usr/sbin/postfix set-permissions upgrade-configuration setgid_group=%{pf_setgid_group}
|
|
|
|
fi
|
2007-01-16 00:33:08 +01:00
|
|
|
|
|
|
|
%postun
|
|
|
|
%restart_on_update postfix
|
|
|
|
%insserv_cleanup
|
2008-08-07 01:34:35 +02:00
|
|
|
ldconfig
|
2007-01-16 00:33:08 +01:00
|
|
|
|
|
|
|
%clean
|
2008-11-04 18:06:01 +01:00
|
|
|
#rm -rf $RPM_BUILD_ROOT
|
2007-01-16 00:33:08 +01:00
|
|
|
|
|
|
|
%post postgresql
|
|
|
|
FILE=etc/postfix/dynamicmaps.cf
|
|
|
|
if ! grep -q "^pgsql[[:space:]]" ${FILE}; then
|
|
|
|
echo "Adding pgsql map entry to ${FILE}"
|
|
|
|
echo "pgsql /usr/lib/postfix/dict_pgsql.so dict_pgsql_open" >> ${FILE}
|
|
|
|
fi
|
|
|
|
|
|
|
|
%post mysql
|
|
|
|
FILE=etc/postfix/dynamicmaps.cf
|
|
|
|
if ! grep -q "^mysql[[:space:]]" ${FILE}; then
|
|
|
|
echo "Adding mysql map entry to ${FILE}"
|
|
|
|
echo "mysql /usr/lib/postfix/dict_mysql.so dict_mysql_open" >> ${FILE}
|
|
|
|
fi
|
|
|
|
|
|
|
|
%preun postgresql
|
|
|
|
if [ "$1" = 0 ] ; then
|
|
|
|
FILE=etc/postfix/dynamicmaps.cf
|
|
|
|
if [ -e "$FILE" ] ; then
|
|
|
|
if grep -q "^pgsql[[:space:]]" ${FILE}; then
|
|
|
|
echo "Removing pgsql map entry from ${FILE}"
|
|
|
|
sed "/^pgsql[[:space:]]/d" ${FILE} > ${FILE}.$$ && \
|
|
|
|
cp --remove-destination ${FILE}.$$ ${FILE} && \
|
|
|
|
rm ${FILE}.$$
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "Can not find \"$FILE\". Not updating the file." >&2
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
%preun mysql
|
|
|
|
if [ "$1" = 0 ] ; then
|
|
|
|
FILE=etc/postfix/dynamicmaps.cf
|
|
|
|
if [ -e "$FILE" ] ; then
|
|
|
|
if grep -q "^mysql[[:space:]]" ${FILE}; then
|
|
|
|
echo "Removing mysql map entry from ${FILE}"
|
|
|
|
sed "/^mysql[[:space:]]/d" ${FILE} > ${FILE}.$$ && \
|
|
|
|
cp --remove-destination ${FILE}.$$ ${FILE} && \
|
|
|
|
rm ${FILE}.$$
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "Can not find \"$FILE\". Not updating the file." >&2
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
%files postgresql
|
|
|
|
%defattr(-,root,root)
|
|
|
|
/usr/lib/postfix/dict_pgsql.so
|
|
|
|
|
|
|
|
%files mysql
|
|
|
|
%defattr(-,root,root)
|
|
|
|
/usr/lib/postfix/dict_mysql.so
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
/usr/include/postfix/
|
|
|
|
|
2008-10-22 18:42:21 +02:00
|
|
|
%files doc
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc AAAREADME COMPATIBILITY COPYRIGHT HISTORY INSTALL IPv6-ChangeLog LICENSE
|
|
|
|
%doc PORTING RELEASE_NOTES* US_PATENT_6321267 TLS_LICENSE
|
|
|
|
%doc README_FILES examples html auxiliary
|
|
|
|
%doc postfix-SuSE/README.SuSE
|
|
|
|
%doc postfix-SuSE/SPAMASSASSIN+POSTFIX.SuSE
|
|
|
|
|
2007-01-16 00:33:08 +01:00
|
|
|
%files -f %{postfixfiles}
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%config /etc/pam.d/*
|
|
|
|
/var/adm/fillup-templates/sysconfig.postfix
|
|
|
|
/var/adm/fillup-templates/sysconfig.mail-postfix
|
|
|
|
/sbin/conf.d/SuSEconfig.postfix
|
2007-01-18 01:51:49 +01:00
|
|
|
%config(noreplace) %{omc_dir}/postfix.xml
|
2007-01-16 00:33:08 +01:00
|
|
|
%dir /etc/postfix
|
|
|
|
%config(noreplace) /etc/postfix/access
|
|
|
|
%config(noreplace) /etc/postfix/generic
|
|
|
|
%config(noreplace) /etc/postfix/canonical
|
|
|
|
#%config(noreplace) /etc/postfix/cidr_table
|
|
|
|
%config(noreplace) /etc/postfix/main.cf
|
2008-09-13 12:02:46 +02:00
|
|
|
%config /etc/postfix/main.cf.default
|
2007-01-16 00:33:08 +01:00
|
|
|
%config(noreplace) /etc/postfix/master.cf
|
|
|
|
%config(noreplace) /etc/postfix/openssl_postfix.conf.in
|
|
|
|
%config(noreplace) /etc/postfix/relocated
|
|
|
|
%config(noreplace) /etc/postfix/transport
|
|
|
|
%config(noreplace) /etc/postfix/virtual
|
|
|
|
%config(noreplace) /etc/postfix/sasl_passwd
|
|
|
|
%config(noreplace) /etc/postfix/sender_canonical
|
|
|
|
#%config(noreplace) /etc/postfix/tcp_table
|
|
|
|
#%config(noreplace) /etc/postfix/pcre_table
|
|
|
|
#%config(noreplace) /etc/postfix/regexp_table
|
|
|
|
%config(noreplace) /etc/postfix/relay_ccerts
|
|
|
|
%config(noreplace) /etc/postfix/header_checks
|
|
|
|
%config(noreplace) /etc/postfix/bounce.cf.default
|
|
|
|
%config(noreplace) /etc/postfix/dynamicmaps.cf
|
2008-09-13 12:02:46 +02:00
|
|
|
%config /etc/sysconfig/SuSEfirewall2.d/services/postfix
|
2007-01-16 00:33:08 +01:00
|
|
|
%dir /etc/sasl2/
|
|
|
|
%config(noreplace) /etc/sasl2/smtpd.conf
|
2008-09-13 12:02:46 +02:00
|
|
|
%config /etc/postfix/LICENSE
|
2007-01-16 00:33:08 +01:00
|
|
|
%if %{usetls}
|
2008-09-13 12:02:46 +02:00
|
|
|
%config /etc/postfix/TLS_LICENSE
|
2007-01-16 00:33:08 +01:00
|
|
|
%endif
|
|
|
|
%config /etc/permissions.d/postfix
|
|
|
|
%config /etc/permissions.d/postfix.paranoid
|
2008-11-04 18:06:01 +01:00
|
|
|
%attr(0644, root, root) /etc/postfix/makedefs.out
|
2008-09-13 12:02:46 +02:00
|
|
|
%attr(0755, root, root) /etc/postfix/postfix-script
|
|
|
|
%attr(0755, root, root) /etc/postfix/post-install
|
2008-11-04 18:06:01 +01:00
|
|
|
%attr(0644, root, root) /etc/postfix/postfix-files
|
2007-01-16 00:33:08 +01:00
|
|
|
%config %attr(0755,root,root) /etc/init.d/postfix
|
|
|
|
/usr/bin/mailq
|
|
|
|
/usr/bin/newaliases
|
|
|
|
%attr(0755, root, root) /usr/sbin/sendmail
|
|
|
|
/usr/sbin/qmqp-source
|
|
|
|
/usr/sbin/smtp-sink
|
|
|
|
/usr/sbin/smtp-source
|
|
|
|
/usr/sbin/mkpostfixcert
|
|
|
|
/sbin/rcpostfix
|
|
|
|
%{_libdir}/lib*
|
|
|
|
/usr/lib/sendmail
|
|
|
|
%dir /usr/lib/postfix
|
|
|
|
/usr/lib/postfix/*[^.so]
|
|
|
|
/usr/lib/postfix/dict_ldap.so
|
|
|
|
/usr/lib/postfix/dict_pcre.so
|
|
|
|
/usr/lib/postfix/dict_tcp.so
|
|
|
|
%{conf_backup_dir}
|
2008-10-22 18:42:21 +02:00
|
|
|
%dir %attr(0700,postfix,root) %{pf_data_directory}
|
2007-01-16 00:33:08 +01:00
|
|
|
%{_mandir}/man?/*.gz
|
|
|
|
|
|
|
|
%description
|
|
|
|
Postfix aims to be an alternative to the widely-used sendmail program.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Wietse Venema <wietse@porcupine.org>
|
|
|
|
|
|
|
|
%description mysql
|
2008-08-07 01:34:35 +02:00
|
|
|
Postfix plugin to support MySQL maps. This library will be loaded by
|
|
|
|
starting postfix if you'll access a postmap which is stored in mysql.
|
2007-01-16 00:33:08 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Wietse Venema <wietse@porcupine.org>
|
|
|
|
|
|
|
|
%description postgresql
|
2008-08-07 01:34:35 +02:00
|
|
|
Postfix plugin to support PostgreSQL maps. This library will be loaded
|
|
|
|
by starting postfix if you'll access a postmap which is stored in
|
|
|
|
PostgreSQL.
|
2007-01-16 00:33:08 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Wietse Venema <wietse@porcupine.org>
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
Postfix aims to be an alternative to the widely-used sendmail program.
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-22 18:42:21 +02:00
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Wietse Venema <wietse@porcupine.org>
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
Postfix aims to be an alternative to the widely-used sendmail program.
|
|
|
|
This package contains the documentation for postfix
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-16 00:33:08 +01:00
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Wietse Venema <wietse@porcupine.org>
|
|
|
|
|
2007-02-26 19:06:55 +01:00
|
|
|
%changelog
|