%define eximversion 4.14 %define docversion 4.10 %define exiscanrev 26 %define releasenum 1 # what version of RH are we building for? %define redhat8 0 %define redhat7 1 %define redhat6 0 # options for components %define build_mysql 1 %define build_pgsql 1 # Options for Redhat version 6.x: # rpmbuild -ba|--rebuild --define "rh6 1" %{?rh6:%define redhat8 0} %{?rh6:%define redhat7 0} %{?rh6:%define redhat6 1} # Options for Redhat version 6.x: # rpmbuild -ba|--rebuild --define "rh8 1" %{?rh8:%define redhat8 1} %{?rh8:%define redhat7 0} %{?rh8:%define redhat6 0} %define exact_openssl_version %(rpm -q openssl | cut -d - -f 2) %if %{redhat6} ## Currently I can't make exim/mysql build under RH6.2 with the RH6.2 powertools mysql ## so we'll drop that for now %define build_mysql 0 %endif Summary: exim mail transfer agent Name: exim Version: %{eximversion} %define release %{releasenum}.rh7x %if %{redhat6} %define release %{releasenum}.rh6x %endif %if %{redhat8} %define release %{releasenum}.rh8x %endif Release: %{release} Copyright: GPL Url: http://www.exim.org/ Group: System Environment/Daemons Buildroot: %{_tmppath}/%{name}-build.root Provides: smtpdaemon BuildPreReq: rpm >= 3.0.5 PreReq: /sbin/service PreReq: /sbin/chkconfig PreReq: openssl >= 0.9.5a PreReq: openssl = %{exact_openssl_version} Requires: openssl >= 0.9.5a ##Requires: bash >= 2.0 Requires: rpm >= 3.0.5 Requires: exim-mta #Conflicts: sendmail, postfix, qmail #Obsoletes: sendmail, postfix, qmail Source: ftp://ftp.exim.org/pub/exim/exim3/exim-%{version}.tar.bz2 Source1: aliases Source2: exim.init Source3: exim.sysconfig Source4: exim.logrotate Source5: exim.8 Source6: ftp://ftp.exim.org/pub/exim/exim4/FAQ-html.tar.bz2 Source7: ftp://ftp.exim.org/pub/exim/exim4/exim-html-%{docversion}.tar.bz2 Source8: ftp://ftp.exim.org/pub/exim/exim4/exim-postscript-%{docversion}.tar.bz2 Source9: ftp://ftp.exim.org/pub/exim/exim4/exim-pdf-%{docversion}.tar.bz2 #Source10: eximconfig Source11: exim.pam Source13: http://www.exim.org/ftp/exim4/config.samples.tar.bz2 Source14: http://duncanthrax.net/exiscan/exiscan-%{version}-%{exiscanrev}.tar.gz Patch0: exim-%{eximversion}-buildconfig.patch Patch1: exim-4.14-krb5inc.patch %if %{redhat8} BuildRequires: db4-devel %else BuildRequires: db3-devel %endif BuildRequires: openssl-devel BuildRequires: XFree86-devel %if %{build_mysql} BuildRequires: mysql-devel %endif %if %{build_pgsql} BuildRequires: postgresql-devel %endif BuildRequires: perl BuildRequires: openldap-devel %description Exim is a mail transport agent (MTA) developed at the University of Cambridge for use on Unix systems connected to the Internet. In style it is similar to Smail 3, but its facilities are more extensive, and 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. Exim is in production use at quite a few sites, some of which move hundreds of thousands of messages per day. This package includes all the utilities, but not the main MTA program. The main MTA program can be selected from one of the exim-base, exim-ldap exim-perl, exim-mysql or exim-pgsql packages depending on the types of additional lookup functionality required. Exiscan is compiled in to allow inbuilt scanning capability. See http://duncanthrax.net/exiscan/ %package mon Summary: X11 monitor application for exim Group: Applications/System Copyright: Free %description mon The Exim Monitor is an optional supplement to the Exim package. It displays information about Exim's processing in an X window, and an administrator can perform a number of control actions from the window interface. %package doc Summary: Exim documentation Group: Documentation %description doc This package includes the Exim FAQ and Exim manual in HTML, PostScript and PDF formats. %package base Summary: Main exim MTA program, compiled with basic libraries Group: System Environment/Daemons Provides: exim-mta Conflicts: exim-ldap exim-perl exim-mysql exim-pgsql Obsoletes: exim-ldap exim-perl exim-mysql exim-pgsql #Requires: exim %description base The main exim MTA program, compiled with all basic dbm lookups support, TLS (SSL) and all the main transports. This should suit many general purpose systems, and is the smallest binary. Exiscan is compiled in to allow inbuilt scanning capability. See http://duncanthrax.net/exiscan/ %package ldap Summary: Main exim MTA program, compiled with basic libraries & LDAP Group: System Environment/Daemons Provides: exim-mta Conflicts: exim-base exim-perl exim-mysql exim-pgsql Obsoletes: exim-base exim-perl exim-mysql exim-pgsql #Requires: exim %description ldap The main exim MTA program, compiled with all basic dbm lookups support, TLS (SSL), LDAP and all the main transports. This should suit all general purpose systems. Exiscan is compiled in to allow inbuilt scanning capability. See http://duncanthrax.net/exiscan/ %package perl Summary: Main exim MTA program, compiled with basic libraries + perl Group: System Environment/Daemons Provides: exim-mta Conflicts: exim-base exim-ldap exim-mysql exim-pgsql Obsoletes: exim-base exim-ldap exim-mysql exim-pgsql #Requires: exim %description perl The main exim MTA program, compiled with all basic dbm lookups support, TLS (SSL), LDAP and all the main transports, plus embedded perl support. Exiscan is compiled in to allow inbuilt scanning capability. See http://duncanthrax.net/exiscan/ %if %{build_mysql} %package mysql Summary: Main exim MTA program, compiled with basic libraries + perl + mysql Group: System Environment/Daemons Provides: exim-mta Conflicts: exim-base exim-ldap exim-perl exim-pgsql Obsoletes: exim-base exim-ldap exim-perl exim-pgsql #Requires: exim %description mysql The main exim MTA program, compiled with all basic dbm lookups support, TLS (SSL), LDAP and all the main transports, plus embedded perl support and mysql db lookup support. Exiscan is compiled in to allow inbuilt scanning capability. See http://duncanthrax.net/exiscan/ %endif %if %{build_pgsql} %package pgsql Summary: Main exim MTA program, compiled with basic libraries + perl + pgsql Group: System Environment/Daemons Provides: exim-mta Conflicts: exim-base exim-ldap exim-perl exim-mysql Obsoletes: exim-base exim-ldap exim-perl exim-mysql #Requires: exim %description pgsql The main exim MTA program, compiled with all basic dbm lookups support, TLS (SSL), LDAP and all the main transports, plus embedded perl support and postgresql lookups. Exiscan is compiled in to allow inbuilt scanning capability. See http://duncanthrax.net/exiscan/ %endif %prep %setup -q %setup -q -T -D -a 6 mv FAQ-html faq %setup -q -T -D -a 13 %setup -q -T -D -a 7 mv exim-html-%{docversion} html %setup -q -T -D -a 8 mv exim-postscript-%{docversion} ps %setup -q -T -D -a 9 mv exim-pdf-%{docversion} pdf %setup -q -T -D -a 14 patch -s -p1 Local/Makefile make CFLAGS="$RPM_OPT_FLAGS" cp build-`scripts/os-type`-`scripts/arch-type`/exim bins/exim-$version done %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/usr/sbin mkdir -p $RPM_BUILD_ROOT/usr/bin mkdir -p $RPM_BUILD_ROOT/usr/lib mkdir -p $RPM_BUILD_ROOT/etc/pam.d mkdir -p $RPM_BUILD_ROOT/etc/exim install bins/exim* $RPM_BUILD_ROOT/usr/sbin ln -s exim-base $RPM_BUILD_ROOT/usr/sbin/exim cd build-`scripts/os-type`-`scripts/arch-type` for i in eximon eximon.bin exim_dumpdb exim_fixdb exim_tidydb \ exinext exiwhat exim_dbmbuild exicyclog exim_lock \ exigrep eximstats exiqsumm convert4r? do install -m 0775 $i $RPM_BUILD_ROOT/usr/sbin done cd .. install -m 0644 src/configure.default $RPM_BUILD_ROOT/etc/exim/exim4.conf install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/etc/aliases install -m 0644 %{SOURCE11} $RPM_BUILD_ROOT/etc/pam.d/exim pushd $RPM_BUILD_ROOT/usr/lib/ ln -sf ../sbin/exim sendmail popd pushd $RPM_BUILD_ROOT/usr/sbin/ ln -sf exim sendmail popd pushd $RPM_BUILD_ROOT/usr/bin/ ln -sf ../sbin/exim mailq ln -sf ../sbin/exim runq ln -sf ../sbin/exim rsmtp ln -sf ../sbin/exim rmail ln -sf ../sbin/exim newaliases popd install -d -m 0750 $RPM_BUILD_ROOT/var/spool/exim install -d -m 0750 $RPM_BUILD_ROOT/var/spool/exim/db install -d -m 0750 $RPM_BUILD_ROOT/var/spool/exim/input install -d -m 0750 $RPM_BUILD_ROOT/var/spool/exim/msglog install -d -m 0750 $RPM_BUILD_ROOT/var/log/exim mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8 install %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man8/exim.8 mkdir -p $RPM_BUILD_ROOT/etc/sysconfig install -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/exim mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/exim mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d install -m 0644 %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/exim #install -m 0755 %{SOURCE10} $RPM_BUILD_ROOT/usr/sbin strip $RPM_BUILD_ROOT/usr/sbin/* || : chmod g-w $RPM_BUILD_ROOT/usr/sbin/* %clean rm -rf $RPM_BUILD_ROOT %post /sbin/chkconfig --add exim %pre # check that the exim group, if they exist, have the right uid/gid grep ^exim: /etc/group >/dev/null && { /usr/sbin/groupmod -g 93 exim } # create the 'exim' group if it doesn't exist grep ^exim: /etc/group >/dev/null || { /usr/sbin/groupadd -g 93 -r exim } # check that the exim user, if they exist, have the right uid/gid grep ^exim: /etc/passwd >/dev/null && { /usr/sbin/usermod -u 93 -g exim exim } # create exim user if absent grep ^exim: /etc/passwd >/dev/null || { /usr/sbin/useradd -d /var/spool/exim -u 93 -g exim -r exim } %preun if [ $1 = 0 ]; then /sbin/service exim stop > /dev/null 2>&1 [ -d /var/log/exim ] && rm -f /var/log/exim/* /sbin/chkconfig --del exim fi %postun if [ "$1" -ge "1" ]; then /sbin/service exim condrestart > /dev/null 2>&1 fi %post base ln -sf exim-base /usr/sbin/exim %post ldap ln -sf exim-ldap /usr/sbin/exim %post perl ln -sf exim-perl /usr/sbin/exim %if %{build_mysql} %post mysql ln -sf exim-mysql /usr/sbin/exim %endif %if %{build_pgsql} %post pgsql ln -sf exim-pgsql /usr/sbin/exim %endif %files %defattr(-,root,root) /usr/sbin/exim_dumpdb /usr/sbin/exim_fixdb /usr/sbin/exim_tidydb /usr/sbin/exinext /usr/sbin/exiwhat /usr/sbin/exim_dbmbuild /usr/sbin/exicyclog /usr/sbin/exigrep /usr/sbin/eximstats /usr/sbin/exiqsumm /usr/sbin/exim_lock /usr/sbin/convert4r? #/usr/sbin/eximconfig /usr/lib/sendmail /usr/sbin/sendmail /usr/bin/mailq /usr/bin/runq /usr/bin/rsmtp /usr/bin/rmail /usr/bin/newaliases %{_mandir}/*/* %defattr(-,exim,exim) %dir /var/spool/exim %dir /var/spool/exim/db %dir /var/spool/exim/input %dir /var/spool/exim/msglog %dir /var/log/exim %dir /etc/exim %defattr(-,root,mail) %config(noreplace) /etc/exim/exim4.conf %config(noreplace) /etc/aliases %defattr(-,root,root) %config /etc/sysconfig/exim %config /etc/rc.d/init.d/exim %config /etc/logrotate.d/exim %config /etc/pam.d/exim %doc LICENCE NOTICE README* %doc doc util/unknownuser.sh util/transport-filter.pl %files mon %defattr(-,root,root) /usr/sbin/eximon /usr/sbin/eximon.bin %files doc %defattr(-,root,root) %doc faq html ps pdf config.samples util %files base %defattr(-,root,root) %attr(4755,root,root)/usr/sbin/exim-base %ghost /usr/sbin/exim %files ldap %defattr(-,root,root) %attr(4755,root,root)/usr/sbin/exim-ldap %ghost /usr/sbin/exim %files perl %defattr(-,root,root) %attr(4755,root,root)/usr/sbin/exim-perl %ghost /usr/sbin/exim %if %{build_mysql} %files mysql %defattr(-,root,root) %attr(4755,root,root)/usr/sbin/exim-mysql %ghost /usr/sbin/exim %endif %if %{build_pgsql} %defattr(-,root,root) %files pgsql %attr(4755,root,root)/usr/sbin/exim-pgsql %ghost /usr/sbin/exim %endif %changelog * Wed Mar 12 2003 Nigel Metheringham - Updated to exim 4.14 with appropriate exiscan * Fri Sep 6 2002 Nigel Metheringham - Updated to exim 4.10 - changed config file to exim4.conf (to prevent exim3 conf being used) - integrated in current exiscan - added convert4r4 - remarkably few other changes * Mon Jul 16 2001 Nigel Metheringham - Updates for exim 3.31 - exim-base now excludes ldap, exim-ldap has been added instead * Tue Jun 19 2001 Nigel Metheringham - More mods for exim 3.30 - Again runs as exim.exim (previous few have used mail.mail) - modded deps slightly for RH6 * Mon Jun 18 2001 Nigel Metheringham - Hacked dependancies since rpm seems to have changed... - Added patches for current bugs - bumped release to outrace RH :-) * Thu Mar 22 2001 Nigel Metheringham - Atempted to make spec file support RH6.x & RH7.x - Rearranged packaging to make several exim varients - broke build method drastically - added system filter, also modded eximconfig appropriately - changed all the RPM_SOURCE_DIR/.. refs to %{SOURCEx} - moved the config file to /etc/exim/exim.conf - it really needs its own directory (esp if you put query passwords in it) * Sat Feb 17 2001 Tim Waugh - Run as user mail, group mail when we drop privileges (bug #28193). * Tue Feb 13 2001 Tim Powers - added conflict with postfix * Thu Jan 25 2001 Tim Waugh - Avoid using zero-length salt in crypteq expansion. * Tue Jan 23 2001 Tim Waugh - Redo initscript internationalisation. - Initscript uses bash not sh. * Mon Jan 22 2001 Tim Waugh - Okay, the real bug was in libident. * Mon Jan 22 2001 Tim Waugh - Revert the RST patch for now; if it's needed, it's a pidentd bug and should be fixed there. * Mon Jan 22 2001 Tim Waugh - 3.22. - Build requires XFree86-devel. * Mon Jan 15 2001 Tim Waugh - New-style prereqs. - Initscript internationalisation. * Thu Jan 11 2001 Tim Waugh - Security patch no longer required; 3.20 and later have a hide feature to do the same thing. - Mark exim.conf noreplace. - Better libident (RST) patch. * Wed Jan 10 2001 Tim Waugh - Fix eximconfig so that it tells the user the correct place to look for documentation - Fix configure.default to deliver mail as group mail so that local delivery works * Tue Jan 09 2001 Tim Waugh - 3.21 * Mon Jan 08 2001 Tim Waugh - Enable TLS support (bug #23196) * Mon Jan 08 2001 Tim Waugh - 3.20 (bug #21895). Absorbs configure.default patch - Put URLs in source tags where applicable - Add build requirement on pam-devel * Wed Oct 18 2000 Bernhard Rosenkraenzer - Fix up eximconfig's header generation (we're not Debian), Bug #18068 - BuildRequires db2-devel (Bug #18089) - Fix typo in logrotate script (Bug #18308) - Local delivery must be setuid to work (Bug #18314) - Don't send TCP RST packages to ident (Bug #19048) * Wed Oct 18 2000 Bernhard Rosenkraenzer - 3.16 - fix security bug - some specfile cleanups - fix handling of RPM_OPT_FLAGS * Fri Aug 18 2000 Tim Powers - fixed bug #16535, logrotate script changes * Thu Aug 17 2000 Tim Powers - fixed bug #16460 - fixed bug #16458 - fixed bug #16476 * Wed Aug 2 2000 Tim Powers - fixed bug #15142 * Fri Jul 28 2000 Than Ngo - add missing restart function in startup script - add rm -rf $RPM_BUILD_ROOT in install section - use %%{_tmppath} * Fri Jul 28 2000 Tim Powers - fixed initscript so that condrestart doesn't return 1 when the test fails * Mon Jul 24 2000 Prospector - rebuilt * Mon Jul 17 2000 Tim Powers - inits bakc to rc.d/init.d, using service to start inits * Thu Jul 13 2000 Tim Powers - applied patch from bug #13890 * Mon Jul 10 2000 Tim Powers - rebuilt * Thu Jul 06 2000 Tim Powers - added patch submitted by , fixes bug #13539 * Thu Jul 06 2000 Tim Powers - fixed broken prereq to require /etc/init.d * Tue Jun 27 2000 Tim Powers - PreReq initscripts >= 5.20 * Mon Jun 26 2000 Tim Powers - fix init.d script location - add condrestart to init.d script * Wed Jun 14 2000 Nalin Dahyabhai - migrate to system-auth setup * Tue Jun 6 2000 Tim Powers - fixed man page location * Tue May 9 2000 Tim Powers - rebuilt for 7.0 * Fri Feb 04 2000 Tim Powers - fixed the groups to be in Red Hat groups. - removed Vendor header since it is going to be marked Red Hat in our build system. - quiet setups - strip binaries - fixed so that man pages can be auto gzipped by new RPM (in files list /usr/man/*/* ) - built for Powertools 6.2 * Tue Jan 18 2000 Mark Bergsma - Upgraded to exim 3.13 - Removed i386 specialization - Added syslog support * Wed Dec 8 1999 Mark Bergsma - Upgraded to exim 3.12 - Procmail no longer used as the delivery agent * Wed Dec 1 1999 Mark Bergsma - Upgraded to exim 3.11 * Sat Nov 27 1999 Mark Bergsma - Added /etc/pam.d/exim * Wed Nov 24 1999 Mark Bergsma - Upgraded to exim 3.10 * Thu Nov 11 1999 Mark Bergsma - Added eximconfig script, thanks to Mark Baker - Exim now uses the Berkeley DB library. * Fri Aug 4 1999 Mark Bergsma - Upgraded to version 3.03 - Removed version number out of the spec file name. * Fri Jul 23 1999 Mark Bergsma - Added embedded Perl support. - Added tcp_wrappers support. - Added extra documentation in a new doc subpackage. * Mon Jul 12 1999 Mark Bergsma - Added /usr/sbin/sendmail as a link to exim. - Fixed wrong filenames in logrotate entry. * Sun Jul 11 1999 Mark Bergsma - Now using the '%changelog' tag. - Removed the SysV init links - let chkconfig handle them. - Replaced install -d with mkdir -p * Sat Jul 10 1999 Mark Bergsma - Fixed owner of the exim-mon files - the owner is now root * Thu Jul 08 1999 Mark Bergsma - Removed executable permission bits of /etc/exim.conf - Removed setuid permission bits of all programs except exim - Changed spool/log directory owner/groups to 'mail' - Changed the default configuration file to make exim run as user and group 'mail'. * Thu Jul 08 1999 Mark Bergsma - Added the /usr/bin/rmail -> /usr/sbin/exim symlink. - Added the convert4r3 script. - Added the transport-filter.pl script to the documentation. * Thu Jul 08 1999 Mark Bergsma - Added procmail transport and director, and made that the default. - Added the unknownuser.sh script to the documentation. * Thu Jul 08 1999 Mark Bergsma - Added manpage for exim. - Fixed symlinks pointing to targets under Buildroot. - The exim logfiles will now only be removed when uninstalling, not upgrading. * Wed Jul 07 1999 Mark Bergsma - Added 'Obsoletes' header. - Added several symlinks to /usr/sbin/exim. * Wed Jul 07 1999 Mark Bergsma - First RPM packet release. - Not tested on other architectures/OS'es than i386/Linux..