2006-06-03 19:23:03 +00:00
|
|
|
#
|
2011-02-04 18:40:19 +00:00
|
|
|
# spec file for package exim
|
2006-06-03 19:23:03 +00:00
|
|
|
#
|
2015-01-24 19:56:27 +00:00
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2006-06-03 19:23:03 +00:00
|
|
|
#
|
2010-07-27 15:57:48 +00: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.
|
|
|
|
|
2006-06-03 19:23:03 +00:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2008-07-11 09:58:23 +00:00
|
|
|
|
2015-01-12 16:44:39 +00:00
|
|
|
%bcond_without mysql
|
|
|
|
%bcond_without pgsql
|
|
|
|
%bcond_without ldap
|
|
|
|
|
2006-06-03 19:23:03 +00:00
|
|
|
Name: exim
|
2013-06-16 13:24:21 +00:00
|
|
|
BuildRequires: cyrus-sasl-devel
|
2012-03-17 18:09:44 +00:00
|
|
|
BuildRequires: db-devel
|
2015-01-12 16:44:39 +00:00
|
|
|
BuildRequires: libspf2-devel
|
|
|
|
%if %{with_ldap}
|
2012-03-17 18:09:44 +00:00
|
|
|
BuildRequires: openldap2-devel
|
2015-01-12 16:44:39 +00:00
|
|
|
%endif
|
2012-03-17 18:09:44 +00:00
|
|
|
BuildRequires: pcre-devel
|
2006-06-03 19:23:03 +00:00
|
|
|
%if %{?suse_version:1}%{?!suse_version:0}
|
2013-12-06 18:47:11 +00:00
|
|
|
BuildRequires: libopenssl-devel
|
2006-06-07 21:58:55 +00:00
|
|
|
BuildRequires: tcpd-devel
|
|
|
|
BuildRequires: xorg-x11-devel
|
2006-06-03 19:23:03 +00:00
|
|
|
%else
|
2012-03-17 18:09:44 +00:00
|
|
|
BuildRequires: libXaw-devel
|
|
|
|
BuildRequires: libXext-devel
|
|
|
|
BuildRequires: libXt-devel
|
|
|
|
BuildRequires: openssl-devel
|
|
|
|
BuildRequires: tcp_wrappers
|
2006-06-03 19:23:03 +00:00
|
|
|
%endif
|
2008-07-11 09:58:23 +00:00
|
|
|
Url: http://www.exim.org/
|
2006-06-03 19:23:03 +00:00
|
|
|
Conflicts: sendmail sendmail-tls postfix
|
2008-07-11 09:58:23 +00:00
|
|
|
Provides: smtp_daemon
|
2006-06-03 19:23:03 +00:00
|
|
|
%if %{?suse_version:%suse_version}%{?!suse_version:0} > 800
|
|
|
|
Requires: logrotate
|
2013-11-06 14:26:33 +00:00
|
|
|
%if 0%{?suse_version} > 1220
|
2013-11-06 14:19:55 +00:00
|
|
|
BuildRequires: pkgconfig(systemd)
|
|
|
|
%{?systemd_requires}
|
|
|
|
%else
|
2013-11-06 14:26:33 +00:00
|
|
|
Requires(pre): %insserv_prereq
|
2013-11-06 14:19:55 +00:00
|
|
|
%endif
|
|
|
|
Requires(pre): %fillup_prereq
|
|
|
|
Requires(pre): /usr/sbin/useradd
|
|
|
|
Requires(pre): fileutils textutils
|
2006-06-03 19:23:03 +00:00
|
|
|
%endif
|
2015-01-24 19:56:27 +00:00
|
|
|
Version: 4.85
|
2012-03-17 18:09:44 +00:00
|
|
|
Release: 0
|
2015-01-12 16:44:39 +00:00
|
|
|
%if %{with_mysql}
|
2010-07-27 15:57:48 +00:00
|
|
|
BuildRequires: mysql-devel
|
|
|
|
%endif
|
2015-01-12 16:44:39 +00:00
|
|
|
%if %{with_pgsql}
|
2011-03-10 18:42:26 +00:00
|
|
|
BuildRequires: postgresql-devel
|
|
|
|
%endif
|
2006-06-03 19:23:03 +00:00
|
|
|
Summary: The Exim Mail Transfer Agent, a Replacement for sendmail
|
2012-03-17 18:09:44 +00:00
|
|
|
License: GPL-2.0+
|
|
|
|
Group: Productivity/Networking/Email/Servers
|
2006-06-03 19:23:03 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
Source: exim-%{version}.tar.bz2
|
2014-07-23 12:09:00 +00:00
|
|
|
Source3: exim-%{version}.tar.bz2.asc
|
2014-11-26 14:42:09 +00:00
|
|
|
Source4: exim.keyring
|
2006-06-03 19:23:03 +00:00
|
|
|
Source1: sysconfig.exim
|
|
|
|
Source2: exim.logrotate
|
|
|
|
Source11: exim.rc
|
|
|
|
Source12: permissions.exim
|
2007-05-24 09:55:38 +00:00
|
|
|
Source13: apparmor.usr.sbin.exim
|
2006-06-03 19:23:03 +00:00
|
|
|
Source20: http://www.logic.univie.ac.at/~ametzler/debian/exim4manpages/exim4-manpages.tar.bz2
|
|
|
|
Source30: eximstats-html-update.py
|
|
|
|
Source31: eximstats.conf
|
2013-11-06 14:19:55 +00:00
|
|
|
Source32: exim.service
|
- update to 4.80
- Bugzilla 949 - Documentation tweak.
- Bugzilla 1093 - eximstats DATA reject detection regexps improved.
- Bugzilla 1169 - primary_hostname spelling was incorrect in docs.
- Implemented gsasl authenticator.
- Implemented heimdal_gssapi authenticator with "server_keytab" option.
- Local/Makefile support for (AUTH|LOOKUP)_*_PC=foo to use
`pkg-config foo` for cflags/libs.
- Swapped $auth1/$auth2 for gsasl GSSAPI mechanism, to be more consistent
with rest of GSASL and with heimdal_gssapi.
- Local/Makefile support for USE_(GNUTLS|OPENSSL)_PC=foo to use
`pkg-config foo` for cflags/libs for the TLS implementation.
- New expansion variable $tls_bits; Cyrus SASL server connection
properties get this fed in as external SSF. A number of robustness
and debugging improvements to the cyrus_sasl authenticator.
- cyrus_sasl server now expands the server_realm option.
- Bugzilla 1214 - Log authentication information in reject log.
- Added dbmjz lookup type.
- Let heimdal_gssapi authenticator take a SASL message without an authzid.
- MAIL args handles TAB as well as SP, for better interop with
non-compliant senders.
- Bugzilla 1237 - fix cases where printf format usage not indicated.
- tls_peerdn now print-escaped for spool files.
Observed some $tls_peerdn in wild which contained \n, which resulted
in spool file corruption.
- TLS fixes for OpenSSL: support TLS 1.1 & 1.2; new "openssl_options"
values; set SSL_MODE_AUTO_RETRY so that OpenSSL will retry a read
or write after TLS renegotiation, which otherwise led to messages
"Got SSL error 2".
- Bugzilla 1239 - fix DKIM verification when signature was not inserted
as a tracking header (ie: a signed header comes before the signature).
- Bugzilla 660 - Multi-valued attributes from ldap now parseable as a
comma-sep list; embedded commas doubled.
- Refactored ACL "verify =" logic to table-driven dispatch.
- LDAP: Check for errors of TLS initialisation, to give correct diagnostics.
- Removed "dont_insert_empty_fragments" fron "openssl_options".
Removed SSL_clear() after SSL_new() which led to protocol negotiation
failures. We appear to now support TLS1.1+ with Exim.
- OpenSSL: new expansion var $tls_sni, which if used in tls_certificate
lets Exim select keys and certificates based upon TLS SNI from client.
Also option tls_sni on SMTP Transports. Also clear $tls_bits correctly
before an outbound SMTP session. New log_selector, +tls_sni.
- Bugzilla 1122 - check localhost_number expansion for failure, avoid
NULL dereference.
- Revert part of NM/04, it broke log_path containing %D expansions.
Left warnings. Added "eximon gdb" invocation mode.
- Defaulting "accept_8bitmime" to true, not false.
- Added -bw for inetd wait mode support.
- Added PCRE_CONFIG=yes support to Makefile for using pcre-config to
locate the relevant includes and libraries. Made this the default.
- Fixed headers_only on smtp transports (was not sending trailing dot).
Bugzilla 1246, report and most of solution from Tomasz Kusy.
- ${eval } now uses 64-bit and supports a "g" suffix (like to "k" and "m").
This may cause build issues on older platforms.
- Revamped GnuTLS support, passing tls_require_ciphers to
gnutls_priority_init, ignoring Exim options gnutls_require_kx,
gnutls_require_mac & gnutls_require_protocols (no longer supported).
Added SNI support via GnuTLS too.
Made ${randint:..} supplier available, if using not-too-old GnuTLS.
- Added EXPERIMENTAL_OCSP for OpenSSL.
- Applied dnsdb SPF support patch from Janne Snabb.
Applied second patch from Janne, implementing suggestion to default
multiple-strings-in-record handling to match SPF spec.
- Added expansion variable $tod_epoch_l for a higher-precision time.
- Fix DCC dcc_header content corruption (stack memory referenced,
read-only, out of scope).
Patch from Wolfgang Breyha, report from Stuart Northfield.
- Fix three issues highlighted by clang analyser static analysis.
Only crash-plausible issue would require the Cambridge-specific
iplookup router and a misconfiguration.
Report from Marcin Mirosław.
- Another attempt to deal with PCRE_PRERELEASE, this one less buggy.
- %D in printf continues to cause issues (-Wformat=security), so for
now guard some of the printf checks behind WANT_DEEPER_PRINTF_CHECKS.
As part of this, removing so much warning spew let me fix some minor
real issues in debug logging.
- GnuTLS was always using default tls_require_ciphers, due to a missing
assignment on my part. Fixed.
- Added tls_dh_max_bits option, defaulting to current hard-coded limit
of NSS, for GnuTLS/NSS interop.
- Validate tls_require_ciphers on startup, since debugging an invalid
string otherwise requires a connection and a bunch more work and it's
relatively easy to get wrong. Should also expose TLS library linkage
problems.
- Pull in <features.h> on Linux, for some portability edge-cases of
64-bit ${eval} (JH/03).
- Define _GNU_SOURCE in exim.h; it's needed for some releases of
protection layer was required, which is not implemented. Bugzilla 1254
- Overhaul DH prime handling, supply RFC-specified DH primes as built
into Exim, default to IKE id 23 from RFC 5114 (2048 bit). Make
tls_dhparam take prime identifiers. Also unbreak combination of
OpenSSL+DH_params+TLSSNI.
- Disable SSLv2 by default in OpenSSL support.
OBS-URL: https://build.opensuse.org/package/show/server:mail/exim?expand=0&rev=122
2012-08-19 14:12:43 +00:00
|
|
|
Patch: exim-tail.patch
|
2014-07-23 12:09:00 +00:00
|
|
|
Patch1: exim-enable_ecdh_openssl.patch
|
2008-07-11 09:58:23 +00:00
|
|
|
|
2006-06-03 19:23:03 +00:00
|
|
|
%package -n eximon
|
|
|
|
Summary: Eximon, an graphical frontend to administer Exim's mail queue
|
|
|
|
Group: Productivity/Networking/Email/Servers
|
2008-07-11 09:58:23 +00:00
|
|
|
|
2006-06-03 19:23:03 +00:00
|
|
|
%package -n eximstats-html
|
2006-08-03 14:27:50 +00:00
|
|
|
Summary: Create HTML reports of exim logs
|
2006-06-03 19:23:03 +00:00
|
|
|
Group: Productivity/Networking/Email/Servers
|
2012-03-17 18:09:44 +00:00
|
|
|
Requires: perl-GD
|
|
|
|
Requires: perl-GDGraph
|
|
|
|
Requires: perl-GDTextUtil
|
2006-06-03 19:23:03 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
Exim is a mail transport agent (MTA) developed at the University of
|
|
|
|
Cambridge for use on Unix systems connected to the Internet. It is
|
|
|
|
freely available under the terms of the GNU General Public Licence. In
|
|
|
|
style, it is similar to Smail 3, but its facilities are more extensive.
|
|
|
|
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.
|
|
|
|
|
|
|
|
%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
|
2006-08-03 14:27:50 +00:00
|
|
|
If this package is installed alongside the exim MTA, and you enable
|
|
|
|
EXIM_REPORT_WEEKLY_HTML in /etc/sysconfig/exim, logrotate/cron will
|
|
|
|
create HTML reports in /srv/www/eximstats.
|
|
|
|
|
|
|
|
You can edit /etc/apache2/conf.d/eximstats.conf to configure your
|
|
|
|
webserver for the reports.
|
|
|
|
|
|
|
|
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.)
|
|
|
|
|
2006-06-03 19:23:03 +00:00
|
|
|
%prep
|
2006-08-04 13:16:50 +00:00
|
|
|
%setup -q -n exim-%{version}
|
2006-06-03 19:23:03 +00:00
|
|
|
%patch
|
2014-01-24 12:22:44 +00:00
|
|
|
%patch1 -p1
|
2006-06-03 19:23:03 +00:00
|
|
|
# build with fPIE/pie on SUSE 10.0 or newer, or on any other platform
|
|
|
|
%if %{?suse_version:%suse_version}%{?!suse_version:99999} > 930
|
|
|
|
fPIE="-fPIE"
|
|
|
|
pie="-pie"
|
|
|
|
%endif
|
2012-03-17 20:08:07 +00:00
|
|
|
%if %{?suse_version:%suse_version}%{?!suse_version:99999} > 1100
|
2012-03-17 20:16:14 +00:00
|
|
|
CFLAGS_OPT_WERROR="-Werror=format-security -Werror=missing-format-attribute"
|
2012-03-17 20:08:07 +00:00
|
|
|
%endif
|
2006-06-03 19:23:03 +00:00
|
|
|
cat <<-EOF > Local/Makefile
|
|
|
|
# see src/EDITME for comments.
|
|
|
|
BIN_DIRECTORY=/usr/sbin
|
|
|
|
CONFIGURE_FILE=/etc/exim/exim.conf
|
|
|
|
EXIM_USER=mail
|
|
|
|
EXIM_GROUP=mail
|
|
|
|
SPOOL_DIRECTORY=/var/spool/exim
|
|
|
|
ROUTER_ACCEPT=yes
|
|
|
|
ROUTER_DNSLOOKUP=yes
|
|
|
|
ROUTER_IPLITERAL=yes
|
|
|
|
ROUTER_MANUALROUTE=yes
|
|
|
|
ROUTER_QUERYPROGRAM=yes
|
|
|
|
ROUTER_REDIRECT=yes
|
|
|
|
# ROUTER_IPLOOKUP=yes
|
|
|
|
TRANSPORT_APPENDFILE=yes
|
|
|
|
TRANSPORT_AUTOREPLY=yes
|
|
|
|
TRANSPORT_PIPE=yes
|
|
|
|
TRANSPORT_SMTP=yes
|
|
|
|
TRANSPORT_LMTP=yes
|
|
|
|
SUPPORT_MAILDIR=yes
|
|
|
|
SUPPORT_MAILSTORE=yes
|
|
|
|
SUPPORT_MBX=yes
|
|
|
|
LOOKUP_DBM=yes
|
|
|
|
LOOKUP_LSEARCH=yes
|
|
|
|
LOOKUP_CDB=yes
|
|
|
|
LOOKUP_DNSDB=yes
|
|
|
|
LOOKUP_DSEARCH=yes
|
2015-01-12 16:44:39 +00:00
|
|
|
%if %{with_ldap}
|
2006-06-03 19:23:03 +00:00
|
|
|
LOOKUP_LDAP=yes
|
2015-01-12 16:44:39 +00:00
|
|
|
%endif
|
|
|
|
%if %{with_mysql}
|
2006-08-04 12:32:06 +00:00
|
|
|
LOOKUP_MYSQL=yes
|
2011-03-10 18:42:26 +00:00
|
|
|
%endif
|
2015-01-12 16:44:39 +00:00
|
|
|
%if %{with_pgsql}
|
2011-03-10 18:42:26 +00:00
|
|
|
LOOKUP_PGSQL=yes
|
2006-08-04 12:32:06 +00:00
|
|
|
%endif
|
2006-12-20 13:03:17 +00:00
|
|
|
LOOKUP_NIS=yes
|
2006-06-03 19:23:03 +00:00
|
|
|
# LOOKUP_NISPLUS=yes
|
|
|
|
# LOOKUP_ORACLE=yes
|
|
|
|
LOOKUP_PASSWD=yes
|
|
|
|
# LOOKUP_PGSQL=yes
|
|
|
|
# LOOKUP_WHOSON=yes
|
|
|
|
CYRUS_SASLAUTHD_SOCKET=/var/run/sasl2/mux
|
|
|
|
# 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
|
2015-01-12 16:44:39 +00:00
|
|
|
LOOKUP_LIBS=-llber
|
|
|
|
%if %{with_ldap}
|
|
|
|
LDAP_LIB_TYPE=OPENLDAP2
|
|
|
|
LOOKUP_LIBS+=-lldap
|
2011-03-10 18:42:26 +00:00
|
|
|
%endif
|
2015-01-12 16:44:39 +00:00
|
|
|
%if %{with_mysql}
|
|
|
|
LOOKUP_INCLUDE+=-I /usr/include/mysql
|
2015-01-24 22:17:02 +00:00
|
|
|
LOOKUP_LIBS+=-L %{_libdir}/mysql -lmysqlclient
|
2015-01-12 16:44:39 +00:00
|
|
|
%endif
|
|
|
|
%if %{with_pgsql}
|
|
|
|
LOOKUP_INCLUDE+=-I /usr/include/pgsql
|
|
|
|
LOOKUP_LIBS+=-lpq
|
2006-08-04 12:32:06 +00:00
|
|
|
%endif
|
2006-06-03 19:23:03 +00:00
|
|
|
EXIM_MONITOR=eximon.bin
|
|
|
|
WITH_CONTENT_SCAN=yes
|
|
|
|
WITH_OLD_DEMIME=yes
|
|
|
|
AUTH_CRAM_MD5=yes
|
|
|
|
AUTH_PLAINTEXT=yes
|
2015-01-12 16:44:39 +00:00
|
|
|
AUTH_SPA=yes
|
2006-12-20 13:03:17 +00:00
|
|
|
AUTH_DOVECOT=yes
|
2006-06-03 19:23:03 +00:00
|
|
|
SUPPORT_TLS=yes
|
|
|
|
TLS_LIBS=-lssl -lcrypto
|
|
|
|
INFO_DIRECTORY=%{_infodir}
|
|
|
|
LOG_FILE_PATH=/var/log/exim/%%s.log
|
|
|
|
EXICYCLOG_MAX=10
|
2006-10-02 11:37:05 +00:00
|
|
|
SYSLOG_LOG_PID=yes
|
2006-06-03 19:23:03 +00:00
|
|
|
COMPRESS_COMMAND=/bin/gzip
|
|
|
|
COMPRESS_SUFFIX=gz
|
|
|
|
ZCAT_COMMAND=/usr/bin/zcat
|
|
|
|
# SUPPORT_PAM=yes
|
|
|
|
# You probably need to add -lpam to EXTRALIBS
|
|
|
|
# RADIUS_CONFIG_FILE=/etc/radiusclient/radiusclient.conf
|
|
|
|
# CYRUS_PWCHECK_SOCKET=/var/pwcheck/pwcheck
|
|
|
|
# USE_TCP_WRAPPERS=yes
|
|
|
|
NO_SYMLINK=yes
|
|
|
|
CHOWN_COMMAND=/bin/chown
|
|
|
|
CHGRP_COMMAND=/bin/chgrp
|
|
|
|
MV_COMMAND=/bin/mv
|
|
|
|
RM_COMMAND=/bin/rm
|
|
|
|
PERL_COMMAND=/usr/bin/perl
|
|
|
|
# APPENDFILE_MODE=0600
|
|
|
|
# APPENDFILE_DIRECTORY_MODE=0700
|
|
|
|
# APPENDFILE_LOCKFILE_MODE=0600
|
|
|
|
# CONFIGURE_FILE_USE_NODE=yes
|
|
|
|
# CONFIGURE_FILE_USE_EUID=yes
|
|
|
|
# DELIVER_BUFFER_SIZE=8192
|
|
|
|
# EXIMDB_DIRECTORY_MODE=0750
|
|
|
|
# EXIMDB_MODE=0640
|
|
|
|
# EXIMDB_LOCKFILE_MODE=0640
|
|
|
|
# HEADER_MAXSIZE="(1024*1024)"
|
|
|
|
# INPUT_DIRECTORY_MODE=0750
|
|
|
|
# LOG_DIRECTORY_MODE=0750
|
|
|
|
# LOG_MODE=0640
|
|
|
|
# LOOKUP_TESTDB=yes
|
|
|
|
MAKE_SHELL=/bin/bash
|
|
|
|
# MAX_NAMED_LIST=16
|
|
|
|
# MAXINTERFACES=250
|
|
|
|
# MSGLOG_DIRECTORY_MODE=0750
|
|
|
|
# PERL_CC=
|
|
|
|
# PERL_CCOPTS=
|
|
|
|
# PERL_LIBS=
|
|
|
|
PID_FILE_PATH=/var/run/exim.pid
|
|
|
|
# SPOOL_DIRECTORY_MODE=0750
|
|
|
|
# SPOOL_MODE=0640
|
|
|
|
SUPPORT_MOVE_FROZEN_MESSAGES=yes
|
|
|
|
HAVE_IPV6=YES
|
2015-01-12 16:44:39 +00:00
|
|
|
EXPERIMENTAL_SPF=yes
|
|
|
|
LOOKUP_LIBS+=-lspf2
|
2012-03-17 20:16:14 +00:00
|
|
|
CFLAGS=$RPM_OPT_FLAGS -Wall $CFLAGS_OPT_WERROR -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DLDAP_DEPRECATED $fPIE
|
2006-06-03 19:23:03 +00:00
|
|
|
EXTRALIBS=-ldl -L/usr/X11R6/%{_lib} $pie
|
|
|
|
EOF
|
|
|
|
touch Local/eximon.conf
|
|
|
|
rm -f doc/*.{orig,txt~}
|
|
|
|
|
|
|
|
%build
|
2008-07-11 09:58:23 +00:00
|
|
|
make
|
2006-06-03 19:23:03 +00:00
|
|
|
|
|
|
|
%install
|
2013-11-06 14:26:33 +00:00
|
|
|
%if 0%{?suse_version} > 1220
|
2013-11-06 14:19:55 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
|
|
|
|
%else
|
2006-06-03 19:23:03 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
2013-11-06 14:19:55 +00:00
|
|
|
%endif
|
2006-06-03 19:23:03 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/usr/{bin,sbin,lib}
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/var/log/exim
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/var/spool/mail/
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8
|
2007-03-09 10:08:02 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/usr/bin
|
2006-06-03 19:23:03 +00:00
|
|
|
make inst_dest=$RPM_BUILD_ROOT/usr/sbin \
|
|
|
|
inst_conf=$RPM_BUILD_ROOT/etc/exim/exim.conf \
|
|
|
|
inst_info=$RPM_BUILD_ROOT/%{_infodir} \
|
|
|
|
INSTALL_ARG=-no_chown install
|
|
|
|
mv $RPM_BUILD_ROOT/usr/sbin/exim-%{version}* $RPM_BUILD_ROOT/usr/sbin/exim
|
|
|
|
mv $RPM_BUILD_ROOT/etc/exim/exim.conf src/configure.default # with all substitutions done
|
2013-11-06 14:26:33 +00:00
|
|
|
%if 0%{?suse_version} > 1220
|
2014-12-05 12:49:45 +00:00
|
|
|
install -m 0644 %{S:32} $RPM_BUILD_ROOT/%{_unitdir}/exim.service
|
2013-11-06 14:19:55 +00:00
|
|
|
%else
|
2014-12-05 12:49:45 +00:00
|
|
|
install -m 0755 %{S:11} $RPM_BUILD_ROOT/etc/init.d/exim
|
2013-11-06 14:19:55 +00:00
|
|
|
%endif
|
2006-06-03 19:23:03 +00:00
|
|
|
# aka...
|
|
|
|
for i in \
|
|
|
|
/usr/lib/sendmail \
|
|
|
|
/usr/bin/runq \
|
|
|
|
/usr/bin/rsmtp \
|
|
|
|
/usr/bin/mailq \
|
|
|
|
/usr/bin/newaliases
|
|
|
|
do
|
|
|
|
ln -sf ../sbin/exim $RPM_BUILD_ROOT$i
|
|
|
|
done
|
|
|
|
ln -sf exim $RPM_BUILD_ROOT/usr/sbin/sendmail
|
2013-11-06 14:26:33 +00:00
|
|
|
%if 0%{?suse_version} > 1220
|
2015-01-12 16:44:39 +00:00
|
|
|
ln -sv service $RPM_BUILD_ROOT/usr/sbin/rcexim
|
2013-11-06 14:19:55 +00:00
|
|
|
%else
|
2006-06-03 19:23:03 +00:00
|
|
|
ln -sv ../../etc/init.d/exim $RPM_BUILD_ROOT/usr/sbin/rcexim
|
2013-11-06 14:19:55 +00:00
|
|
|
%endif
|
2007-03-09 10:08:02 +00:00
|
|
|
mv $RPM_BUILD_ROOT/usr/sbin/eximon* $RPM_BUILD_ROOT/usr/bin/
|
2006-06-03 19:23:03 +00:00
|
|
|
cp -p %{S:1} $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.exim
|
2014-12-05 12:49:45 +00:00
|
|
|
install -m 0644 %{S:2} $RPM_BUILD_ROOT/etc/logrotate.d/exim
|
2006-06-03 19:23:03 +00:00
|
|
|
# man pages
|
|
|
|
mv doc/exim.8 $RPM_BUILD_ROOT/%{_mandir}/man8/
|
|
|
|
pod2man --center=EXIM --section=8 $RPM_BUILD_ROOT/usr/sbin/eximstats > $RPM_BUILD_ROOT/%{_mandir}/man8/eximstats.8
|
2012-03-07 16:07:13 +00:00
|
|
|
tar xvjf %{S:20}
|
2006-06-03 19:23:03 +00:00
|
|
|
cp -p exim4-manpages/* $RPM_BUILD_ROOT/%{_mandir}/man8/
|
|
|
|
for i in \
|
|
|
|
sendmail \
|
|
|
|
runq \
|
|
|
|
rsmtp \
|
|
|
|
mailq \
|
|
|
|
newaliases
|
2012-03-07 16:07:13 +00:00
|
|
|
do
|
2006-06-03 19:23:03 +00:00
|
|
|
ln -sf exim.8.gz $RPM_BUILD_ROOT/%{_mandir}/man8/$i.8.gz
|
|
|
|
done
|
|
|
|
for i in \
|
|
|
|
exim_dumpdb \
|
|
|
|
exim_fixdb \
|
2012-03-07 16:07:13 +00:00
|
|
|
exim_tidydb
|
|
|
|
do
|
2006-06-03 19:23:03 +00:00
|
|
|
ln -sf exim_db.8.gz $RPM_BUILD_ROOT/%{_mandir}/man8/$i.8.gz
|
|
|
|
done
|
|
|
|
perl -pi -e 's%/usr/share/doc/exim4%/usr/share/doc/packages/exim%g' `find $RPM_BUILD_ROOT/%{_mandir}/man8 -name "*.8"`
|
|
|
|
gzip -9 doc/*.txt
|
2009-06-09 15:29:34 +00:00
|
|
|
#
|
|
|
|
# package the utilities without executable permissions, to silence rpmlint warnings
|
|
|
|
chmod 644 util/*.{pl,sh} src/convert4r*
|
|
|
|
#
|
2006-06-03 19:23:03 +00:00
|
|
|
# eximstats-html files
|
|
|
|
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}
|
2007-05-24 09:55:38 +00:00
|
|
|
# apparmor profile
|
2007-08-23 11:23:36 +00:00
|
|
|
install -D -m 0644 $RPM_SOURCE_DIR/apparmor.usr.sbin.exim $RPM_BUILD_ROOT/etc/apparmor/profiles/extras/usr.sbin.exim
|
2010-07-27 15:57:48 +00:00
|
|
|
|
2013-12-06 18:10:24 +00:00
|
|
|
%pre
|
|
|
|
%if 0%{?suse_version} > 1220
|
|
|
|
%service_add_pre exim.service
|
|
|
|
%endif
|
|
|
|
|
2006-06-03 19:23:03 +00:00
|
|
|
%post
|
2013-01-09 19:55:32 +00:00
|
|
|
%if 0%{?suse_version} < 1131
|
2006-06-03 19:23:03 +00:00
|
|
|
%run_permissions
|
2013-01-09 19:55:32 +00:00
|
|
|
%else
|
|
|
|
%set_permissions /usr/sbin/exim
|
|
|
|
%endif
|
2012-03-07 16:07:13 +00:00
|
|
|
if ! test -s etc/exim/exim.conf; then
|
2006-06-03 19:23:03 +00:00
|
|
|
if test -s etc/exim.conf; then
|
|
|
|
mv etc/exim.conf etc/exim/
|
2012-03-07 16:07:13 +00:00
|
|
|
echo moving exim.conf to /etc/exim/
|
2006-06-03 19:23:03 +00:00
|
|
|
else
|
2012-03-07 16:07:13 +00:00
|
|
|
cp -p usr/share/doc/packages/%{name}/configure.default etc/exim/exim.conf
|
2006-06-03 19:23:03 +00:00
|
|
|
echo copying default config file to /etc/exim/exim.conf
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
# create logfiles if missing
|
|
|
|
for i in var/log/exim/main.log var/log/exim/panic.log var/log/exim/reject.log; do
|
|
|
|
if ! test -e $i; then touch $i; chown mail:mail $i; chmod 640 $i ; fi
|
|
|
|
done
|
2013-11-06 14:26:33 +00:00
|
|
|
%if 0%{?suse_version} > 1220
|
2013-11-06 14:19:55 +00:00
|
|
|
%{fillup_only}
|
|
|
|
%service_add_post exim.service
|
|
|
|
%else
|
2007-05-24 10:14:36 +00:00
|
|
|
%{fillup_and_insserv exim}
|
2013-11-06 14:19:55 +00:00
|
|
|
%endif
|
2006-06-03 19:23:03 +00:00
|
|
|
exit 0
|
2013-12-06 18:47:11 +00:00
|
|
|
%if %{?suse_version:1}%{?!suse_version:0}
|
2006-06-03 19:23:03 +00:00
|
|
|
|
|
|
|
%preun
|
2013-11-06 14:26:33 +00:00
|
|
|
%if 0%{?suse_version} > 1220
|
2013-11-06 14:19:55 +00:00
|
|
|
%service_del_preun exim.service
|
|
|
|
%else
|
2006-06-03 19:23:03 +00:00
|
|
|
%stop_on_removal exim
|
|
|
|
%endif
|
2013-11-06 14:19:55 +00:00
|
|
|
%endif
|
2006-06-03 19:23:03 +00:00
|
|
|
|
|
|
|
%postun
|
2013-12-06 18:47:11 +00:00
|
|
|
%if %{?suse_version:1}%{?!suse_version:0}
|
2013-11-06 14:26:33 +00:00
|
|
|
%if 0%{?suse_version} > 1220
|
2013-11-06 14:19:55 +00:00
|
|
|
%service_del_postun exim.service
|
|
|
|
%else
|
2006-06-03 19:23:03 +00:00
|
|
|
%restart_on_update exim
|
2014-08-12 14:24:43 +00:00
|
|
|
%insserv_cleanup
|
2006-06-03 19:23:03 +00:00
|
|
|
%endif
|
2013-11-06 14:19:55 +00:00
|
|
|
%endif
|
2014-08-12 14:45:40 +00:00
|
|
|
|
2006-06-03 19:23:03 +00:00
|
|
|
%verifyscript
|
|
|
|
%verify_permissions -e /usr/sbin/exim
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc ACKNOWLEDGMENTS CHANGES LICENCE NOTICE README.UPDATING README
|
|
|
|
%doc doc
|
|
|
|
%doc src/configure.default
|
|
|
|
%doc build-Linux-*/convert4r{3,4}
|
|
|
|
%doc util
|
|
|
|
%doc %{_mandir}/man8/*
|
|
|
|
/usr/sbin/exicyclog
|
|
|
|
/usr/sbin/exigrep
|
|
|
|
/usr/sbin/exiqgrep
|
|
|
|
%verify(not mode) %attr(4755,root,root) /usr/sbin/exim
|
|
|
|
/usr/sbin/exim_*
|
|
|
|
/usr/sbin/eximstats
|
|
|
|
/usr/sbin/exinext
|
|
|
|
/usr/sbin/exipick
|
|
|
|
/usr/sbin/exiqsumm
|
|
|
|
/usr/sbin/exiwhat
|
|
|
|
%dir /etc/exim
|
2013-11-06 14:26:33 +00:00
|
|
|
%if 0%{?suse_version} > 1220
|
2013-11-06 14:19:55 +00:00
|
|
|
%{_unitdir}/exim.service
|
|
|
|
%else
|
2006-06-03 19:23:03 +00:00
|
|
|
%config /etc/init.d/exim
|
2013-11-06 14:19:55 +00:00
|
|
|
%endif
|
2006-06-03 19:23:03 +00:00
|
|
|
%config(noreplace) /etc/logrotate.d/exim
|
|
|
|
%if %{?suse_version:%suse_version}%{?!suse_version:99999} < 1000
|
|
|
|
%config(noreplace) /etc/permissions.d/exim
|
|
|
|
%endif
|
2007-08-24 06:36:15 +00:00
|
|
|
%dir /etc/apparmor
|
|
|
|
%dir /etc/apparmor/profiles
|
2007-08-23 11:23:36 +00:00
|
|
|
%dir /etc/apparmor/profiles/extras
|
|
|
|
%config(noreplace) /etc/apparmor/profiles/extras/usr.sbin.exim
|
2006-06-03 19:23:03 +00:00
|
|
|
/usr/sbin/rcexim
|
|
|
|
/usr/bin/mailq
|
|
|
|
/usr/bin/runq
|
|
|
|
/usr/bin/rsmtp
|
|
|
|
/usr/bin/newaliases
|
|
|
|
/usr/sbin/sendmail
|
|
|
|
/usr/lib/sendmail
|
|
|
|
/var/adm/fillup-templates/sysconfig.exim
|
2012-03-07 16:07:13 +00:00
|
|
|
%dir %attr(750,mail,mail) /var/log/exim
|
2006-10-02 11:37:05 +00:00
|
|
|
|
2006-06-03 19:23:03 +00:00
|
|
|
%files -n eximon
|
|
|
|
%defattr(-,root,root)
|
2007-03-09 10:08:02 +00:00
|
|
|
/usr/bin/eximon
|
|
|
|
/usr/bin/eximon.bin
|
2006-06-03 19:23:03 +00:00
|
|
|
|
|
|
|
%files -n eximstats-html
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%attr(0750,root,www) /srv/www/eximstats
|
|
|
|
/etc/apache2
|
|
|
|
/etc/apache2/conf.d
|
|
|
|
/etc/apache2/conf.d/eximstats.conf
|
|
|
|
%{_sbindir}/eximstats-html-update.py
|
|
|
|
|
2007-05-24 09:55:38 +00:00
|
|
|
%changelog
|