|
@@ -7,13 +7,11 @@
|
|
%define _sysconfdir /etc
|
|
%define _sysconfdir /etc
|
|
%define _data_dir %{_var}/lib/postfix
|
|
%define _data_dir %{_var}/lib/postfix
|
|
|
|
|
|
-%define origversion 2.8.12
|
|
|
|
|
|
+%define origversion 2.9.4
|
|
|
|
|
|
-# japanese documant for 2.5.x is not ready.
|
|
|
|
-# %define jconfversion 2.2.0
|
|
|
|
-# %define jmanversion 2.2.9
|
|
|
|
-# %define jhtmlversion 2.2.9
|
|
|
|
-# %define jreadmeversion 2.2.9
|
|
|
|
|
|
+# Macro: %{dynmap_add_cmd <name> [-m]}
|
|
|
|
+%define dynmap_add_cmd(m) FILE=%{_sysconfdir}/postfix/dynamicmaps.cf; if ! grep -q "^%{1}[[:space:]]" ${FILE}; then echo "Adding %{1} map entry to ${FILE}"; printf '%%-8s%%-35s%%-18s%%s\\n' %{1} %{_libdir}/postfix/dict_%{1}.so dict_%{1}_open %{-m:mkmap_%{1}_open} >> ${FILE}; fi;
|
|
|
|
+%define dynmap_rm_cmd() FILE=%{_sysconfdir}/postfix/dynamicmaps.cf; if [ $1 = 0 -a -s $FILE ]; then cp -p ${FILE} ${FILE}.$$; grep -v "^%{1}[[:space:]]" ${FILE}.$$ > ${FILE}; rm -f ${FILE}.$$; fi;
|
|
|
|
|
|
Summary: Postfix Mail Transport Agent
|
|
Summary: Postfix Mail Transport Agent
|
|
Summary(ja): Postfix メールトランスポートエージェント
|
|
Summary(ja): Postfix メールトランスポートエージェント
|
|
@@ -29,23 +27,15 @@ Source1: postfix.aliases
|
|
Source2: postfix.cron
|
|
Source2: postfix.cron
|
|
Source3: postfix.init
|
|
Source3: postfix.init
|
|
|
|
|
|
-# japanese documents for 2.5.x is not ready.
|
|
|
|
-# Source10: http://www.kobitosan.net/postfix/archives/postfix_jconf-%{jconfversion}.tar.gz
|
|
|
|
-# Source20: http://www.kobitosan.net/postfix/archives/postfix_jman-%{jmanversion}.tar.gz
|
|
|
|
-# Source30: http://www.kobitosan.net/postfix/archives/postfix_jhtml-%{jhtmlversion}.tar.gz
|
|
|
|
-# Source40: http://www.kobitosan.net/postfix/archives/postfix_jreadme-%{jreadmeversion}.tar.gz
|
|
|
|
-
|
|
|
|
-Patch0: postfix-2.1.5-vine.patch
|
|
|
|
-Patch1: postfix-2.2.10-main.cf-lib64.patch
|
|
|
|
|
|
+Patch0: postfix-2.9.1-vine.patch
|
|
|
|
|
|
# patches 100-199 are imported from debian package.
|
|
# patches 100-199 are imported from debian package.
|
|
-# patches 100/101 for postfix 2.8.x are from suse.
|
|
|
|
-Patch100: postfix-2.8.2-dynamicmaps.patch
|
|
|
|
-Patch101: postfix-2.8.2-dynamicmaps-pie.patch
|
|
|
|
|
|
+# patches 100/101 for postfix 2.8.x are from mdk.
|
|
|
|
+Patch100: postfix-2.9.1-dynamicmaps.diff
|
|
|
|
+Patch101: postfix-2.9.1-dynamicmaps2.diff
|
|
|
|
|
|
# patches 200-299 are imported from rh/fedora
|
|
# patches 200-299 are imported from rh/fedora
|
|
Patch200: postfix-2.5.7-large-fs.patch
|
|
Patch200: postfix-2.5.7-large-fs.patch
|
|
-Patch210: postfix-2.5.5-open_define-vine.patch
|
|
|
|
|
|
|
|
Provides: smtpdaemon
|
|
Provides: smtpdaemon
|
|
Conflicts: sendmail
|
|
Conflicts: sendmail
|
|
@@ -60,6 +50,7 @@ BuildRequires: MySQL-devel
|
|
%if %build_pgsql
|
|
%if %build_pgsql
|
|
BuildRequires: postgresql-devel
|
|
BuildRequires: postgresql-devel
|
|
%endif
|
|
%endif
|
|
|
|
+BuildRequires: sqlite3-devel
|
|
|
|
|
|
Requires: cyrus-sasl >= 2, cyrus-sasl-md5, cyrus-sasl-plain
|
|
Requires: cyrus-sasl >= 2, cyrus-sasl-md5, cyrus-sasl-plain
|
|
Requires: gdbm, pam, openssl
|
|
Requires: gdbm, pam, openssl
|
|
@@ -94,6 +85,18 @@ Postfix は現在広く使われている sendmail を置き換える目的で
|
|
Postfix の開発は IBM によってサポートされており、全世界の
|
|
Postfix の開発は IBM によってサポートされており、全世界の
|
|
全てのシステムを postfix にすることを目標としています。
|
|
全てのシステムを postfix にすることを目標としています。
|
|
|
|
|
|
|
|
+%package sqlite
|
|
|
|
+Summary: SQLite3 map support for Postfix
|
|
|
|
+Group: System Environment/Daemons
|
|
|
|
+Requires(pre): postfix = %{version}-%{release}
|
|
|
|
+Requires: sqlite3
|
|
|
|
+%description sqlite
|
|
|
|
+This package contains shared lib module which support
|
|
|
|
+SQLite map on Postfix.
|
|
|
|
+%description -l ja sqlite
|
|
|
|
+このパッケージには、Postfix で SQLite map を使うのに
|
|
|
|
+必要なライブラリが納められています。
|
|
|
|
+
|
|
%if %build_pgsql
|
|
%if %build_pgsql
|
|
%package pgsql
|
|
%package pgsql
|
|
Summary: PGSQL map support for Postfix
|
|
Summary: PGSQL map support for Postfix
|
|
@@ -153,16 +156,13 @@ PCRE map on Postfix.
|
|
%patch0 -p1 -b .vine
|
|
%patch0 -p1 -b .vine
|
|
|
|
|
|
%ifarch x86_64
|
|
%ifarch x86_64
|
|
-%patch1 -p1 -b .lib64
|
|
|
|
|
|
+sed -i -e 's|/usr/lib/postfix|/usr/lib64/postfix|g' conf/main.cf
|
|
%endif
|
|
%endif
|
|
|
|
|
|
%patch100 -p1 -b .dynamicmaps
|
|
%patch100 -p1 -b .dynamicmaps
|
|
-%patch101 -p0 -b .dynamicmaps-pie
|
|
|
|
-perl -pi -e 's,/usr/lib/,/usr/lib64/,' conf/postfix-files
|
|
|
|
-perl -pi -e 's,-lmysqlclient,-lmysqlclient -L%{_libdir}/mysql,' src/global/Makefile.in
|
|
|
|
|
|
+%patch101 -p1 -b .dynamicmaps2
|
|
|
|
|
|
%patch200 -p1 -b .large-fs
|
|
%patch200 -p1 -b .large-fs
|
|
-%patch210 -p1 -b .open_define
|
|
|
|
|
|
|
|
# patching src/global/Makefile to remove dependency
|
|
# patching src/global/Makefile to remove dependency
|
|
pushd src/global
|
|
pushd src/global
|
|
@@ -179,7 +179,6 @@ sed -ie "s/ dict_pgsql.so/ /" Makefile.in
|
|
popd
|
|
popd
|
|
|
|
|
|
%build
|
|
%build
|
|
-export PIE="-pie"
|
|
|
|
make makefiles \
|
|
make makefiles \
|
|
CCARGS="-DMAX_DYNAMIC_MAPS \
|
|
CCARGS="-DMAX_DYNAMIC_MAPS \
|
|
-DUSE_SASL_AUTH -I/usr/include/sasl \
|
|
-DUSE_SASL_AUTH -I/usr/include/sasl \
|
|
@@ -187,6 +186,7 @@ make makefiles \
|
|
-DHAS_LDAP \
|
|
-DHAS_LDAP \
|
|
-DHAS_SSL -I/usr/include/openssl \
|
|
-DHAS_SSL -I/usr/include/openssl \
|
|
-DHAS_PCRE -I/usr/include/pcre \
|
|
-DHAS_PCRE -I/usr/include/pcre \
|
|
|
|
+ -DHAS_SQLITE \
|
|
%if %build_mysql
|
|
%if %build_mysql
|
|
-DHAS_MYSQL -I/usr/include/mysql \
|
|
-DHAS_MYSQL -I/usr/include/mysql \
|
|
%endif
|
|
%endif
|
|
@@ -196,7 +196,7 @@ make makefiles \
|
|
-DUSE_TLS" \
|
|
-DUSE_TLS" \
|
|
AUXLIBS="-lsasl2 -lssl -lcrypto" \
|
|
AUXLIBS="-lsasl2 -lssl -lcrypto" \
|
|
OPT="$RPM_OPT_FLAGS" DEBUG=""
|
|
OPT="$RPM_OPT_FLAGS" DEBUG=""
|
|
-for libs in master global util dns tls milter
|
|
|
|
|
|
+for libs in master global util dns tls milter xsasl
|
|
do
|
|
do
|
|
ln -sf lib${libs}.a lib/libpostfix-${libs}.so.1
|
|
ln -sf lib${libs}.a lib/libpostfix-${libs}.so.1
|
|
done
|
|
done
|
|
@@ -227,7 +227,7 @@ install -d $RPM_BUILD_ROOT%{_var}/spool/postfix/{bounce,defer,flush,maildrop,pri
|
|
|
|
|
|
install -m755 bin/* $RPM_BUILD_ROOT%{_sbindir}
|
|
install -m755 bin/* $RPM_BUILD_ROOT%{_sbindir}
|
|
install -m755 libexec/* $RPM_BUILD_ROOT%{_libdir}/postfix
|
|
install -m755 libexec/* $RPM_BUILD_ROOT%{_libdir}/postfix
|
|
-install -m755 lib/dict_* $RPM_BUILD_ROOT%{_libdir}/postfix
|
|
|
|
|
|
+#install -m755 lib/dict_* $RPM_BUILD_ROOT%{_libdir}/postfix
|
|
install -m755 lib/lib*.so.1 $RPM_BUILD_ROOT%{_libdir}
|
|
install -m755 lib/lib*.so.1 $RPM_BUILD_ROOT%{_libdir}
|
|
|
|
|
|
touch conf/dynamicmaps.cf
|
|
touch conf/dynamicmaps.cf
|
|
@@ -246,18 +246,6 @@ install -m644 man/man1/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
|
|
install -m644 man/man5/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
|
|
install -m644 man/man5/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
|
|
install -m644 man/man8/*.8 $RPM_BUILD_ROOT%{_mandir}/man8
|
|
install -m644 man/man8/*.8 $RPM_BUILD_ROOT%{_mandir}/man8
|
|
|
|
|
|
-# japanese documant for 2.4.x is not ready.
|
|
|
|
-# install jman
|
|
|
|
-# for i in 1 5 8
|
|
|
|
-# do
|
|
|
|
-# install -m644 man-%{jmanversion}/ja/man$i/*.$i $RPM_BUILD_ROOT%{_mandir}/ja/man$i
|
|
|
|
-# done
|
|
|
|
-
|
|
|
|
-# jconf, jhtml, jreadme
|
|
|
|
-# cp -a conf-%{jconfversion} sample.ja
|
|
|
|
-# cp -a jhtml-%{jhtmlversion} html.ja
|
|
|
|
-# cp -a readme-%{jreadmeversion} README_FILES.ja
|
|
|
|
-
|
|
|
|
install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/postfix/aliases
|
|
install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/postfix/aliases
|
|
install -m755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/postfix
|
|
install -m755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/postfix
|
|
install -m755 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/postfix
|
|
install -m755 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/postfix
|
|
@@ -299,10 +287,7 @@ fi
|
|
|
|
|
|
%post
|
|
%post
|
|
/sbin/ldconfig
|
|
/sbin/ldconfig
|
|
-if ! grep -q "^tcp[[:space:]]" /etc/postfix/dynamicmaps.cf; then
|
|
|
|
- echo "Adding tcp map entry to /etc/postfix/dynamicmaps.cf"
|
|
|
|
- echo "tcp %{_libdir}/postfix/dict_tcp.so dict_tcp_open" >> /etc/postfix/dynamicmaps.cf
|
|
|
|
-fi
|
|
|
|
|
|
+%dynmap_add_cmd tcp
|
|
/sbin/chkconfig --add postfix
|
|
/sbin/chkconfig --add postfix
|
|
if [ ! -f %{_sysconfdir}/postfix/aliases.db ]; then
|
|
if [ ! -f %{_sysconfdir}/postfix/aliases.db ]; then
|
|
touch %{_sysconfdir}/postfix/aliases.db
|
|
touch %{_sysconfdir}/postfix/aliases.db
|
|
@@ -344,66 +329,39 @@ if [ $1 = 0 ]; then
|
|
fi
|
|
fi
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
+%post sqlite
|
|
|
|
+%dynmap_add_cmd sqlite
|
|
|
|
+
|
|
|
|
+%preun sqlite
|
|
|
|
+%dynmap_rm_cmd sqlite
|
|
|
|
+
|
|
%if %build_pgsql
|
|
%if %build_pgsql
|
|
%post pgsql
|
|
%post pgsql
|
|
-if ! grep -q "^pgsql[[:space:]]" /etc/postfix/dynamicmaps.cf; then
|
|
|
|
- echo "Adding pgsql map entry to /etc/postfix/dynamicmaps.cf"
|
|
|
|
- echo "pgsql %{_libdir}/postfix/dict_pgsql.so dict_pgsql_open" >> /etc/postfix/dynamicmaps.cf
|
|
|
|
-fi
|
|
|
|
|
|
+%dynmap_add_cmd pgsql
|
|
|
|
|
|
%preun pgsql
|
|
%preun pgsql
|
|
-if [ $1 = 0 ]; then
|
|
|
|
- if grep -q "^pgsql[[:space:]]" /etc/postfix/dynamicmaps.cf; then
|
|
|
|
- cp -f /etc/postfix/dynamicmaps.cf /etc/postfix/dynamicmaps.cf.rpmsave
|
|
|
|
- grep -v "^pgsql[[:space:]]" /etc/postfix/dynamicmaps.cf.rpmsave > /etc/postfix/dynamicmaps.cf
|
|
|
|
- fi
|
|
|
|
-fi
|
|
|
|
|
|
+%dynmap_rm_cmd pgsql
|
|
%endif
|
|
%endif
|
|
|
|
|
|
%if %build_mysql
|
|
%if %build_mysql
|
|
%post mysql
|
|
%post mysql
|
|
-if ! grep -q "^mysql[[:space:]]" /etc/postfix/dynamicmaps.cf; then
|
|
|
|
- echo "Adding mysql map entry to /etc/postfix/dynamicmaps.cf"
|
|
|
|
- echo "mysql %{_libdir}/postfix/dict_mysql.so dict_mysql_open" >> /etc/postfix/dynamicmaps.cf
|
|
|
|
-fi
|
|
|
|
|
|
+%dynmap_add_cmd mysql
|
|
|
|
|
|
%preun mysql
|
|
%preun mysql
|
|
-if [ $1 = 0 ]; then
|
|
|
|
- if grep -q "^mysql[[:space:]]" /etc/postfix/dynamicmaps.cf; then
|
|
|
|
- cp -f /etc/postfix/dynamicmaps.cf /etc/postfix/dynamicmaps.cf.rpmsave
|
|
|
|
- grep -v "^mysql[[:space:]]" /etc/postfix/dynamicmaps.cf.rpmsave > /etc/postfix/dynamicmaps.cf
|
|
|
|
- fi
|
|
|
|
-fi
|
|
|
|
|
|
+%dynmap_rm_cmd mysql
|
|
%endif
|
|
%endif
|
|
|
|
|
|
%post ldap
|
|
%post ldap
|
|
-if ! grep -q "^ldap[[:space:]]" /etc/postfix/dynamicmaps.cf; then
|
|
|
|
- echo "Adding ldap map entry to /etc/postfix/dynamicmaps.cf"
|
|
|
|
- echo "ldap %{_libdir}/postfix/dict_ldap.so dict_ldap_open" >> /etc/postfix/dynamicmaps.cf
|
|
|
|
-fi
|
|
|
|
|
|
+%dynmap_add_cmd ldap
|
|
|
|
|
|
-%preun ldap
|
|
|
|
-if [ $1 = 0 ]; then
|
|
|
|
- if grep -q "^ldap[[:space:]]" /etc/postfix/dynamicmaps.cf; then
|
|
|
|
- cp -f /etc/postfix/dynamicmaps.cf /etc/postfix/dynamicmaps.cf.rpmsave
|
|
|
|
- grep -v "^ldap[[:space:]]" /etc/postfix/dynamicmaps.cf.rpmsave > /etc/postfix/dynamicmaps.cf
|
|
|
|
- fi
|
|
|
|
-fi
|
|
|
|
|
|
+%postun ldap
|
|
|
|
+%dynmap_rm_cmd ldap
|
|
|
|
|
|
%post pcre
|
|
%post pcre
|
|
-if ! grep -q "^pcre[[:space:]]" /etc/postfix/dynamicmaps.cf; then
|
|
|
|
- echo "Adding pcre map entry to /etc/postfix/dynamicmaps.cf"
|
|
|
|
- echo "pcre %{_libdir}/postfix/dict_pcre.so dict_pcre_open" >> /etc/postfix/dynamicmaps.cf
|
|
|
|
-fi
|
|
|
|
-
|
|
|
|
-%preun pcre
|
|
|
|
-if [ $1 = 0 ]; then
|
|
|
|
- if grep -q "^pcre[[:space:]]" /etc/postfix/dynamicmaps.cf; then
|
|
|
|
- cp -f /etc/postfix/dynamicmaps.cf /etc/postfix/dynamicmaps.cf.rpmsave
|
|
|
|
- grep -v "^pcre[[:space:]]" /etc/postfix/dynamicmaps.cf.rpmsave > /etc/postfix/dynamicmaps.cf
|
|
|
|
- fi
|
|
|
|
-fi
|
|
|
|
|
|
+%dynmap_add_cmd pcre
|
|
|
|
|
|
|
|
+%postun pcre
|
|
|
|
+%dynmap_rm_cmd pcre
|
|
|
|
|
|
%clean
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
rm -rf $RPM_BUILD_ROOT
|
|
@@ -449,6 +407,7 @@ rm -rf $RPM_BUILD_ROOT
|
|
%exclude %{_libdir}/postfix/dict_mysql.so
|
|
%exclude %{_libdir}/postfix/dict_mysql.so
|
|
%endif
|
|
%endif
|
|
|
|
|
|
|
|
+%exclude %{_libdir}/postfix/dict_sqlite.so
|
|
%exclude %{_libdir}/postfix/dict_ldap.so
|
|
%exclude %{_libdir}/postfix/dict_ldap.so
|
|
%exclude %{_libdir}/postfix/dict_pcre.so
|
|
%exclude %{_libdir}/postfix/dict_pcre.so
|
|
%{_libdir}/lib*.so.1
|
|
%{_libdir}/lib*.so.1
|
|
@@ -487,6 +446,10 @@ rm -rf $RPM_BUILD_ROOT
|
|
%attr(0700,postfix,postfix) %dir %{_var}/spool/postfix/saved
|
|
%attr(0700,postfix,postfix) %dir %{_var}/spool/postfix/saved
|
|
%{_libdir}/sendmail
|
|
%{_libdir}/sendmail
|
|
|
|
|
|
|
|
+%files sqlite
|
|
|
|
+%defattr(-,root,root)
|
|
|
|
+%{_libdir}/postfix/dict_sqlite.so
|
|
|
|
+
|
|
%if %build_pgsql
|
|
%if %build_pgsql
|
|
%files pgsql
|
|
%files pgsql
|
|
%defattr(-,root,root)
|
|
%defattr(-,root,root)
|
|
@@ -508,6 +471,12 @@ rm -rf $RPM_BUILD_ROOT
|
|
%{_libdir}/postfix/dict_pcre.so
|
|
%{_libdir}/postfix/dict_pcre.so
|
|
|
|
|
|
%changelog
|
|
%changelog
|
|
|
|
+* Sun Nov 25 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 2.9.4-1
|
|
|
|
+- update to 2.9.4
|
|
|
|
+- update dynamicmaps patches
|
|
|
|
+- add sqite3 map support, add postfix-sqlite subpackage.
|
|
|
|
+- drop unneeded patches
|
|
|
|
+
|
|
* Wed Oct 24 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 2.8.12-1
|
|
* Wed Oct 24 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 2.8.12-1
|
|
- update to 2.8.12
|
|
- update to 2.8.12
|
|
- rebuild with pcre-8.31
|
|
- rebuild with pcre-8.31
|