Summary: The exim mail transfer agent Name: exim Version: 4.69 Release: 1 License: GPLv2+ Url: http://www.exim.org/ Group: System Environment/Daemons Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root Provides: MTA smtpd smtpdaemon server(smtp) /usr/bin/newaliases Provides: /usr/sbin/sendmail /usr/bin/mailq /usr/bin/rmail #BuildRequires: clamav-devel #BuildRequires: coreutils Source0: ftp://ftp.exim.org/pub/exim/exim4/%{name}-%{version}.tar.bz2 Source1: ftp://ftp.exim.org/pub/exim/exim4/%{name}-%{version}.tar.bz2.asc Patch0: %{name}-%{version}-aix-config.patch Patch1: %{name}-%{version}-dynamic-pcre.patch Patch2: %{name}-%{version}-obvious-wrong.patch BuildRequires: pcre-devel >= 7.4 BuildRequires: sqlite-devel >= 3.5.6 BuildRequires: gnutls-devel >= 2.2.2 Requires: pcre >= 7.4 Requires: sqlite >= 3.5.6 Requires: gnutls >= 2.2.2 #Source2: exim.init #Source4: exim.logrotate #Source20: exim-greylist.conf.inc #Source21: mk-greylist-db.sql #Source22: greylist-tidy.sh #Patch4: exim-rhl.patch #Patch8: exim-4.24-libdir.patch #Patch12: exim-4.33-cyrus.patch #Patch13: exim-4.43-pamconfig.patch #Patch14: exim-4.50-spamdconf.patch #Patch17: exim-4.61-ldap-deprecated.patch #Patch18: exim-4.62-dlopen-localscan.patch #Patch19: exim-4.63-procmail.patch #Patch20: exim-4.63-allow-filter.patch #Patch21: exim-4.63-localhost-is-local.patch #Patch22: exim-4.66-greylist-conf.patch #Patch23: exim-4.67-smarthost-config.patch Requires: /etc/aliases Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) #BuildRequires: db4-devel openssl-devel openldap-devel pam-devel #BuildRequires: lynx pcre-devel sqlite-devel tcp_wrappers-devel #BuildRequires: cyrus-sasl-devel openldap-devel openssl-devel mysql-devel postgresql-devel #BuildRequires: perl(ExtUtils::Embed) %description Exim is a message transfer 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 general. There is a great deal of flexibility in the way mail can be routed, and there are extensive facilities for checking incoming mail. Exim can be installed in place of sendmail, although the configuration of exim is quite different to that of sendmail. %package mon Summary: X11 monitor application for exim Group: Applications/System License: GPL %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 clamav Summary: Clam Antivirus scanner dæmon configuration for use with Exim Group: System Environment/Daemons Requires: clamav-server exim Obsoletes: clamav-exim <= 0.86.2 %description clamav This package contains configuration files which invoke a copy of the clamav dæmon for use with Exim. It can be activated by adding (or uncommenting) av_scanner = clamd:%{_var}/run/clamd.exim/clamd.sock in your exim.conf, and using the 'malware' condition in the DATA ACL, as follows: deny message = This message contains malware ($malware_name) malware = * For further details of Exim content scanning, see chapter 41 of the Exim specification: http://www.exim.org/exim-html-%{version}/doc/html/spec_html/ch41.html %package greylist Summary: Example configuration for greylisting using Exim Group: System Environment/Daemons Requires: sqlite exim %{_sysconfdir}/cron.daily %description greylist This package contains a simple example of how to do greylisting in Exim's ACL configuration. It contains a cron job to remove old entries from the greylisting database, and an ACL subroutine which needs to be included from the main exim.conf file. To enable greylisting, install this package and then uncomment the lines in Exim's configuration /etc/exim/exim.conf which enable it. You need to uncomment at least two lines -- the '.include' directive which includes the new ACL subroutine, and the line which invokes the new subroutine. By default, this implementation only greylists mails which appears 'suspicious' in some way. During normal processing of the ACLs we collect a list of 'offended' which it's committed, which may include having SpamAssassin points, lacking a Message-ID: header, coming from a blacklisted host, etc. There are examples of these in the default configuration file, mostly commented out. These should be sufficient for you to you trigger greylisting for whatever 'offences' you can dream of, or even to make greylisting unconditional. %prep %setup -q cp src/EDITME Local/Makefile cp exim_monitor/EDITME Local/eximon.conf %patch0 %patch1 %patch2 #%patch4 -p1 -b .rhl #%patch6 -p1 -b .config #%patch8 -p1 -b .libdir #%patch12 -p1 -b .cyrus #%patch13 -p1 -b .pam #%patch14 -p1 -b .spamd #%patch15 -p1 -b .pcre #%patch17 -p1 -b .ldap #%patch18 -p1 -b .dl #%patch19 -p1 -b .procmail #%patch20 -p1 -b .filter #%patch21 -p1 -b .localhost #%patch22 -p1 -b .grey #%patch23 -p1 -b .smarthost %build make %install export PATH=/opt/freeware/bin:$PATH [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}%{_bindir} mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} mkdir -p ${RPM_BUILD_ROOT}%{_libdir} mkdir -p ${RPM_BUILD_ROOT}/etc/exim cd build-`scripts/os-type`-`scripts/arch-type` install -m 4775 exim ${RPM_BUILD_ROOT}%{_sbindir} for i in eximon eximon.bin exim_dumpdb exim_fixdb exim_tidydb \ exinext exiwhat exim_dbmbuild exicyclog exim_lock \ exigrep eximstats exipick exiqgrep exiqsumm \ exim_checkaccess convert4r4 do install -m 0755 $i ${RPM_BUILD_ROOT}%{_sbindir} done cd .. install -m 0644 src/configure.default ${RPM_BUILD_ROOT}/etc/exim/exim.conf mkdir -p ${RPM_BUILD_ROOT}/usr/lib cd ${RPM_BUILD_ROOT}/usr/lib ln -sf ../sbin/exim sendmail.exim cd - pushd ${RPM_BUILD_ROOT}%{_sbindir} ln -sf exim sendmail.exim cd cd ${RPM_BUILD_ROOT}%{_bindir} ln -sf ../sbin/exim mailq.exim ln -sf ../sbin/exim runq.exim ln -sf ../sbin/exim rsmtp.exim ln -sf ../sbin/exim rmail.exim ln -sf ../sbin/exim newaliases.exim cd - 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 -m 0644 doc/exim.8 ${RPM_BUILD_ROOT}%{_mandir}/man8/exim.8 pod2man --center=EXIM --section=8 \ ${RPM_BUILD_ROOT}/usr/sbin/eximstats \ ${RPM_BUILD_ROOT}%{_mandir}/man8/eximstats.8 EXIT mkdir -p $RPM_BUILD_ROOT%{_initrddir} install %SOURCE2 $RPM_BUILD_ROOT%{_initrddir}/exim mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d install -m 0644 %SOURCE4 $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/exim # generate ghost .pem file mkdir -p $RPM_BUILD_ROOT/etc/pki/tls/{certs,private} touch $RPM_BUILD_ROOT/etc/pki/tls/{certs,private}/exim.pem chmod 600 $RPM_BUILD_ROOT/etc/pki/tls/{certs,private}/exim.pem # Munge the clamav init and config files from clamav-devel. This really ought # to be a subpackage of clamav, but this hack will have to do for now. function clamsubst() { sed -e "s!!$3!g;s!!$4!g;""$5" %{_datadir}/clamav/template/"$1" >"$RPM_BUILD_ROOT$2" } mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/clamd.d clamsubst clamd.conf %{_sysconfdir}/clamd.d/exim.conf exim exim \ 's!^##*\(\(LogFile\|LocalSocket\|PidFile\|User\)\s\|\(StreamSaveToDisk\|ScanMail\|LogTime\|ScanArchive\)$\)!\1!;s!^Example!#Example!;' clamsubst clamd.init %{_initrddir}/clamd.exim exim exim '' clamsubst clamd.logrotate %{_sysconfdir}/logrotate.d/clamd.exim exim exim '' cat < $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/clamd.exim CLAMD_CONFIG='%_sysconfdir/clamd.d/exim.conf' CLAMD_SOCKET=%{_var}/run/clamd.exim/clamd.sock EOF ln -sf clamd $RPM_BUILD_ROOT/usr/sbin/clamd.exim mkdir -p $RPM_BUILD_ROOT%{_var}/run/clamd.exim # Set up the greylist subpackage install -m644 %{SOURCE20} $RPM_BUILD_ROOT/%_sysconfdir/exim/exim-greylist.conf.inc install -m644 %{SOURCE21} $RPM_BUILD_ROOT/%_sysconfdir/exim/mk-greylist-db.sql mkdir -p $RPM_BUILD_ROOT/%_sysconfdir/cron.daily install -m755 %{SOURCE22} $RPM_BUILD_ROOT/%_sysconfdir/cron.daily/greylist-tidy.sh touch $RPM_BUILD_ROOT/%_var/spool/exim/db/greylist.db %pre %{_sbindir}/useradd -d %{_var}/spool/exim -s /sbin/nologin -G mail -M -r -u 93 exim 2>/dev/null # Copy TLS certs from old location to new -- don't move them, because the # config file may be modified and may be pointing to the old location. if [ ! -f /etc/pki/tls/certs/exim.pem -a -f %{_datadir}/ssl/certs/exim.pem ] ; then cp %{_datadir}/ssl/certs/exim.pem /etc/pki/tls/certs/exim.pem cp %{_datadir}/ssl/private/exim.pem /etc/pki/tls/private/exim.pem fi exit 0 %post /sbin/chkconfig --add exim %{_sbindir}/alternatives --install %{_sbindir}/sendmail mta %{_sbindir}/sendmail.exim 10 \ --slave %{_bindir}/mailq mta-mailq %{_bindir}/mailq.exim \ --slave %{_bindir}/runq mta-runq %{_bindir}/runq.exim \ --slave %{_bindir}/rsmtp mta-rsmtp %{_bindir}/rsmtp.exim \ --slave %{_bindir}/rmail mta-rmail %{_bindir}/rmail.exim \ --slave /etc/pam.d/smtp mta-pam /etc/pam.d/exim \ --slave %{_bindir}/newaliases mta-newaliases %{_bindir}/newaliases.exim \ --slave /usr/lib/sendmail mta-sendmail /usr/lib/sendmail.exim \ --slave %{_mandir}/man1/mailq.1.gz mta-mailqman %{_mandir}/man8/exim.8.gz \ --initscript exim if [ ! -f /etc/pki/tls/certs/exim.pem ] ; then umask 077 FQDN=`hostname` if [ "x${FQDN}" = "x" ]; then FQDN=localhost.localdomain fi cat << EOF | openssl req -new -x509 -days 365 -nodes \ -out /etc/pki/tls/certs/exim.pem \ -keyout /etc/pki/tls/private/exim.pem &>/dev/null -- SomeState SomeCity SomeOrganization SomeOrganizationalUnit ${FQDN} root@${FQDN} EOF chown exim.exim /etc/pki/tls/{private,certs}/exim.pem chmod 600 /etc/pki/tls/{private,certs}/exim.pem fi %preun if [ $1 = 0 ]; then /sbin/service exim stop > /dev/null 2>&1 /sbin/chkconfig --del exim %{_sbindir}/alternatives --remove mta %{_sbindir}/sendmail.exim fi %postun if [ "$1" -ge "1" ]; then /sbin/service exim condrestart > /dev/null 2>&1 mta=`readlink /etc/alternatives/mta` if [ "$mta" == "%{_sbindir}/sendmail.exim" ]; then /usr/sbin/alternatives --set mta %{_sbindir}/sendmail.exim fi fi %post greylist if [ ! -r %{_var}/spool/exim/db/greylist.db ]; then sqlite3 %{_var}/spool/exim/db/greylist.db < %{_sysconfdir}/exim/mk-greylist-db.sql chown exim.exim %{_var}/spool/exim/db/greylist.db chmod 0660 %{_var}/spool/exim/db/greylist.db fi %clean ###[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %attr(4755,root,root) %{_sbindir}/exim %{_sbindir}/exim_dumpdb %{_sbindir}/exim_fixdb %{_sbindir}/exim_tidydb %{_sbindir}/exinext %{_sbindir}/exiwhat %{_sbindir}/exim_dbmbuild %{_sbindir}/exicyclog %{_sbindir}/exigrep %{_sbindir}/eximstats %{_sbindir}/exipick %{_sbindir}/exiqgrep %{_sbindir}/exiqsumm %{_sbindir}/exim_lock %{_sbindir}/exim_checkaccess %{_sbindir}/convert4r4 %{_sbindir}/sendmail.exim %{_bindir}/mailq.exim %{_bindir}/runq.exim %{_bindir}/rsmtp.exim %{_bindir}/rmail.exim %{_bindir}/newaliases.exim /usr/lib/sendmail.exim %{_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 %defattr(-,root,mail) %dir %{_sysconfdir}/exim %config(noreplace) %{_sysconfdir}/exim/exim.conf %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/exim %{_sysconfdir}/rc.d/init.d/exim %config(noreplace) %{_sysconfdir}/logrotate.d/exim %config(noreplace) %{_sysconfdir}/pam.d/exim %doc ACKNOWLEDGMENTS LICENCE NOTICE README.UPDATING README %doc doc util/unknownuser.sh %attr(0600,root,root) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) /etc/pki/tls/certs/exim.pem %attr(0600,root,root) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) /etc/pki/tls/private/exim.pem %files mon %defattr(-,root,root) %{_sbindir}/eximon %{_sbindir}/eximon.bin %post clamav /sbin/chkconfig --add clamd.exim %preun clamav test "$1" != 0 || %{_initrddir}/clamd.exim stop &>/dev/null || : test "$1" != 0 || /sbin/chkconfig --del clamd.exim %postun clamav test "$1" = 0 || %{_initrddir}/clamd.exim condrestart >/dev/null || : %files clamav %defattr(-,root,root,-) %{_sbindir}/clamd.exim %attr(0755,root,root) %config %{_initrddir}/clamd.exim %config(noreplace) %verify(not mtime) %{_sysconfdir}/clamd.d/exim.conf %config(noreplace) %verify(not mtime) %{_sysconfdir}/sysconfig/clamd.exim %config(noreplace) %verify(not mtime) %{_sysconfdir}/logrotate.d/clamd.exim %attr(0750,exim,exim) %dir %{_var}/run/clamd.exim %files greylist %config %{_sysconfdir}/exim/exim-greylist.conf.inc %ghost %{_var}/spool/exim/db/greylist.db %{_sysconfdir}/exim/mk-greylist-db.sql %{_sysconfdir}/cron.daily/greylist-tidy.sh %changelog * Fri Mar 28 2008 Michael Perzl - 4.69-1 - first version for AIX V5.1 and higher