SHA256
1
0
forked from pool/exim

Accepting request 280598 from home:-miska-:arm

Add support for spf, mysql and other small fixes

OBS-URL: https://build.opensuse.org/request/show/280598
OBS-URL: https://build.opensuse.org/package/show/server:mail/exim?expand=0&rev=156
This commit is contained in:
Tomáš Chvátal 2015-01-12 16:44:39 +00:00 committed by Git OBS Bridge
parent fa3c7698ca
commit 8642790a1a
3 changed files with 40 additions and 34 deletions

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Sun Dec 21 10:25:47 UTC 2014 - michal.hrusecky@opensuse.org
- Enable SPF
-------------------------------------------------------------------
Sun Dec 21 09:48:18 UTC 2014 - michal.hrusecky@opensuse.org
- Fix service file
- Using bcond for mysql, pgsql and ldap
- mysql, pgsql and ldap enabled by default
-------------------------------------------------------------------
Fri Dec 5 12:47:28 UTC 2014 - lmuelle@suse.com

View File

@ -7,7 +7,6 @@ Conflicts=sendmail.service postfix.service
PrivateTmp=true
Environment=QUEUE=1h
EnvironmentFile=-/etc/sysconfig/exim
ExecStartPre=-/usr/libexec/exim-gen-cert
ExecStart=/usr/sbin/exim -bd -q${QUEUE}
[Install]

View File

@ -16,10 +16,17 @@
#
%bcond_without mysql
%bcond_without pgsql
%bcond_without ldap
Name: exim
BuildRequires: cyrus-sasl-devel
BuildRequires: db-devel
BuildRequires: libspf2-devel
%if %{with_ldap}
BuildRequires: openldap2-devel
%endif
BuildRequires: pcre-devel
%if %{?suse_version:1}%{?!suse_version:0}
BuildRequires: libopenssl-devel
@ -50,13 +57,11 @@ Requires(pre): fileutils textutils
%endif
Version: 4.84
Release: 0
%if %{?build_with_mysql:1}0
%if %{with_mysql}
BuildRequires: mysql-devel
Provides: exim = %version
%endif
%if %{?build_with_pgsql:1}0
%if %{with_pgsql}
BuildRequires: postgresql-devel
Provides: exim = %version
%endif
Summary: The Exim Mail Transfer Agent, a Replacement for sendmail
License: GPL-2.0+
@ -76,7 +81,6 @@ Source31: eximstats.conf
Source32: exim.service
Patch: exim-tail.patch
Patch1: exim-enable_ecdh_openssl.patch
%if !%{?build_with_mysql:1}0 && !%{?build_with_pgsql:1}0
%package -n eximon
Summary: Eximon, an graphical frontend to administer Exim's mail queue
@ -88,7 +92,6 @@ Group: Productivity/Networking/Email/Servers
Requires: perl-GD
Requires: perl-GDGraph
Requires: perl-GDTextUtil
%endif
%description
Exim is a mail transport agent (MTA) developed at the University of
@ -99,16 +102,12 @@ In particular, it has options for verifying incoming sender and
recipient addresses, for refusing mail from specified hosts, networks,
or senders, and for controlling mail relaying.
%if !%{?build_with_mysql:1}0 && !%{?build_with_pgsql:1}0
%description -n eximon
This allows administrators to view the exim agent's mail queue and
logs, and perform a variety of actions on queued messages, such as
freezing, bouncing and thawing messages, and even editing body and
header of mails.
%description -n eximstats-html
If this package is installed alongside the exim MTA, and you enable
EXIM_REPORT_WEEKLY_HTML in /etc/sysconfig/exim, logrotate/cron will
@ -121,9 +120,6 @@ The script /usr/sbin/eximstats-html-update.py can create the reports
for log files that were rotated in the past. (You would only run this
once, if at all. The rest is done by logrotate / cron.)
%endif
%prep
%setup -q -n exim-%{version}
%patch
@ -163,11 +159,13 @@ cat <<-EOF > Local/Makefile
LOOKUP_CDB=yes
LOOKUP_DNSDB=yes
LOOKUP_DSEARCH=yes
%if %{with_ldap}
LOOKUP_LDAP=yes
%if %{?build_with_mysql:1}0
%endif
%if %{with_mysql}
LOOKUP_MYSQL=yes
%endif
%if %{?build_with_pgsql:1}0
%if %{with_pgsql}
LOOKUP_PGSQL=yes
%endif
LOOKUP_NIS=yes
@ -177,24 +175,27 @@ cat <<-EOF > Local/Makefile
# LOOKUP_PGSQL=yes
# LOOKUP_WHOSON=yes
CYRUS_SASLAUTHD_SOCKET=/var/run/sasl2/mux
LDAP_LIB_TYPE=OPENLDAP2
# LOOKUP_INCLUDE=-I /usr/local/ldap/include -I /usr/local/mysql/include -I /usr/local/pgsql/include
# LOOKUP_LIBS=-L/usr/local/lib -lldap -llber -lmysqlclient -lpq
LOOKUP_LIBS=-lldap -llber
%if %{?build_with_mysql:1}0
LOOKUP_INCLUDE=-I /usr/include/mysql
LOOKUP_LIBS=-lldap -llber -lmysqlclient
LOOKUP_LIBS=-llber
%if %{with_ldap}
LDAP_LIB_TYPE=OPENLDAP2
LOOKUP_LIBS+=-lldap
%endif
%if %{?build_with_pgsql:1}0
LOOKUP_INCLUDE=-I /usr/include/pgsql
LOOKUP_LIBS=-lldap -llber -lpq
%if %{with_mysql}
LOOKUP_INCLUDE+=-I /usr/include/mysql
LOOKUP_LIBS+=-lmysqlclient
%endif
%if %{with_pgsql}
LOOKUP_INCLUDE+=-I /usr/include/pgsql
LOOKUP_LIBS+=-lpq
%endif
EXIM_MONITOR=eximon.bin
WITH_CONTENT_SCAN=yes
WITH_OLD_DEMIME=yes
AUTH_CRAM_MD5=yes
AUTH_PLAINTEXT=yes
# AUTH_SPA=yes
AUTH_SPA=yes
AUTH_DOVECOT=yes
SUPPORT_TLS=yes
TLS_LIBS=-lssl -lcrypto
@ -242,6 +243,8 @@ cat <<-EOF > Local/Makefile
# SPOOL_MODE=0640
SUPPORT_MOVE_FROZEN_MESSAGES=yes
HAVE_IPV6=YES
EXPERIMENTAL_SPF=yes
LOOKUP_LIBS+=-lspf2
CFLAGS=$RPM_OPT_FLAGS -Wall $CFLAGS_OPT_WERROR -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DLDAP_DEPRECATED $fPIE
EXTRALIBS=-ldl -L/usr/X11R6/%{_lib} $pie
EOF
@ -287,15 +290,11 @@ do
done
ln -sf exim $RPM_BUILD_ROOT/usr/sbin/sendmail
%if 0%{?suse_version} > 1220
ln -sv ../../%{_unitdir}/exim.service $RPM_BUILD_ROOT/usr/sbin/rcexim
ln -sv service $RPM_BUILD_ROOT/usr/sbin/rcexim
%else
ln -sv ../../etc/init.d/exim $RPM_BUILD_ROOT/usr/sbin/rcexim
%endif
%if !%{?build_with_mysql:1}0 && !%{?build_with_pgsql:1}0
mv $RPM_BUILD_ROOT/usr/sbin/eximon* $RPM_BUILD_ROOT/usr/bin/
%else
rm $RPM_BUILD_ROOT/usr/sbin/eximon*
%endif
cp -p %{S:1} $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.exim
install -m 0644 %{S:2} $RPM_BUILD_ROOT/etc/logrotate.d/exim
# man pages
@ -326,12 +325,10 @@ gzip -9 doc/*.txt
chmod 644 util/*.{pl,sh} src/convert4r*
#
# eximstats-html files
%if !%{?build_with_mysql:1}0 && !%{?build_with_pgsql:1}0
mkdir -p $RPM_BUILD_ROOT/srv/www/eximstats
mkdir -p $RPM_BUILD_ROOT/etc/apache2/conf.d/
cp -p $RPM_SOURCE_DIR/eximstats.conf $RPM_BUILD_ROOT/etc/apache2/conf.d/
install -m 0755 $RPM_SOURCE_DIR/eximstats-html-update.py $RPM_BUILD_ROOT/%{_sbindir}
%endif
# apparmor profile
install -D -m 0644 $RPM_SOURCE_DIR/apparmor.usr.sbin.exim $RPM_BUILD_ROOT/etc/apparmor/profiles/extras/usr.sbin.exim
@ -430,7 +427,6 @@ exit 0
/usr/lib/sendmail
/var/adm/fillup-templates/sysconfig.exim
%dir %attr(750,mail,mail) /var/log/exim
%if !%{?build_with_mysql:1}0 && !%{?build_with_pgsql:1}0
%files -n eximon
%defattr(-,root,root)
@ -444,6 +440,5 @@ exit 0
/etc/apache2/conf.d
/etc/apache2/conf.d/eximstats.conf
%{_sbindir}/eximstats-html-update.py
%endif
%changelog