| 1 | # SA-Exim has long since been obsoleted by the proper built-in ACL support
|
|---|
| 2 | # from exiscan. Disable it for FC6 unless people scream.
|
|---|
| 3 | %if 0%{?fedora} < 6
|
|---|
| 4 | %define buildsa 1
|
|---|
| 5 | %endif
|
|---|
| 6 | %define buildsa 0
|
|---|
| 7 |
|
|---|
| 8 | # Build clamav subpackage for FC5 and above.
|
|---|
| 9 | #%if 0%{?fedora} >= 5
|
|---|
| 10 | %define buildclam 1
|
|---|
| 11 | #%endif
|
|---|
| 12 |
|
|---|
| 13 | Summary: The exim mail transfer agent
|
|---|
| 14 | Name: exim
|
|---|
| 15 | Version: 4.73
|
|---|
| 16 | Release: 0.3%{?dist}
|
|---|
| 17 | License: GPLv2+
|
|---|
| 18 | Url: http://www.exim.org/
|
|---|
| 19 | Group: System Environment/Daemons
|
|---|
| 20 | Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|---|
| 21 |
|
|---|
| 22 | Provides: MTA smtpd smtpdaemon server(smtp)
|
|---|
| 23 |
|
|---|
| 24 | #Requires(post): /sbin/chkconfig /sbin/service %{_sbindir}/alternatives
|
|---|
| 25 | #Requires(preun): /sbin/chkconfig /sbin/service %{_sbindir}/alternatives
|
|---|
| 26 | #Requires(pre): %{_sbindir}/groupadd, %{_sbindir}/useradd
|
|---|
| 27 | %if 0%{?buildclam}
|
|---|
| 28 | #BuildRequires: clamav-devel
|
|---|
| 29 | %endif
|
|---|
| 30 | Source: ftp://ftp.exim.org/pub/exim/exim4/exim-%{version}.tar.gz
|
|---|
| 31 |
|
|---|
| 32 | Source1: exim-Makefile-OS2
|
|---|
| 33 | Source2: exim-os.h-OS2
|
|---|
| 34 | #Source2: exim.init
|
|---|
| 35 | #Source3: exim.sysconfig
|
|---|
| 36 | #Source4: exim.logrotate
|
|---|
| 37 | #Source5: exim-tidydb.sh
|
|---|
| 38 | #Source11: exim.pam
|
|---|
| 39 | %if 0%{?buildsa}
|
|---|
| 40 | #Source13: http://marc.merlins.org/linux/exim/files/sa-exim-4.2.tar.gz
|
|---|
| 41 | %endif
|
|---|
| 42 | Source20: exim-greylist.conf.inc
|
|---|
| 43 | Source21: exim-mk-greylist-db.sql
|
|---|
| 44 | Source22: exim-greylist-tidy.sh
|
|---|
| 45 |
|
|---|
| 46 | Patch1: exim-os2.diff
|
|---|
| 47 | Patch4: exim-rhl.patch
|
|---|
| 48 | Patch6: exim-4.50-config.patch
|
|---|
| 49 | #Patch8: exim-4.24-libdir.patch
|
|---|
| 50 | #Patch12: exim-4.33-cyrus.patch
|
|---|
| 51 | #Patch13: exim-4.43-pamconfig.patch
|
|---|
| 52 | #Patch14: exim-4.50-spamdconf.patch
|
|---|
| 53 | #Patch18: exim-4.71-dlopen-localscan.patch
|
|---|
| 54 | #Patch19: exim-4.63-procmail.patch
|
|---|
| 55 | #Patch20: exim-4.63-allow-filter.patch
|
|---|
| 56 | Patch21: exim-4.63-localhost-is-local.patch
|
|---|
| 57 | #Patch22: exim-4.66-greylist-conf.patch
|
|---|
| 58 | #Patch23: exim-4.67-smarthost-config.patch
|
|---|
| 59 | #Patch24: exim-4.71-dynlookup.patch
|
|---|
| 60 | #Patch25: exim-4.69-dynlookup-config.patch
|
|---|
| 61 | #Patch26: exim-4.69-strictaliasing.patch
|
|---|
| 62 |
|
|---|
| 63 | #Requires: /etc/pki/tls/certs /etc/pki/tls/private
|
|---|
| 64 | #Requires: /etc/aliases
|
|---|
| 65 | #Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
|---|
| 66 | BuildRequires: db4-devel openssl-devel
|
|---|
| 67 | #BuildRequires: openldap-devel pam-devel
|
|---|
| 68 | %if 0%{?buildsa}
|
|---|
| 69 | #BuildRequires: lynx
|
|---|
| 70 | %endif
|
|---|
| 71 | BuildRequires: pcre-devel sqlite-devel
|
|---|
| 72 | #BuildRequires: tcp_wrappers-devel cyrus-sasl-devel
|
|---|
| 73 | #BuildRequires: openldap-devel openssl-devel mysql-devel postgresql-devel
|
|---|
| 74 | #BuildRequires: libXaw-devel libXmu-devel libXext-devel libX11-devel libSM-devel
|
|---|
| 75 | #BuildRequires: libICE-devel libXpm-devel libXt-devel perl(ExtUtils::Embed)
|
|---|
| 76 |
|
|---|
| 77 | %description
|
|---|
| 78 | Exim is a message transfer agent (MTA) developed at the University of
|
|---|
| 79 | Cambridge for use on Unix systems connected to the Internet. It is
|
|---|
| 80 | freely available under the terms of the GNU General Public Licence. In
|
|---|
| 81 | style it is similar to Smail 3, but its facilities are more
|
|---|
| 82 | general. There is a great deal of flexibility in the way mail can be
|
|---|
| 83 | routed, and there are extensive facilities for checking incoming
|
|---|
| 84 | mail. Exim can be installed in place of sendmail, although the
|
|---|
| 85 | configuration of exim is quite different to that of sendmail.
|
|---|
| 86 |
|
|---|
| 87 | %package mysql
|
|---|
| 88 | Summary: MySQL lookup support for Exim
|
|---|
| 89 | Group: System Environment/Daemons
|
|---|
| 90 | Requires: exim = %{version}-%{release}
|
|---|
| 91 |
|
|---|
| 92 | %description mysql
|
|---|
| 93 | This package contains the MySQL lookup module for Exim
|
|---|
| 94 |
|
|---|
| 95 | %package pgsql
|
|---|
| 96 | Summary: PostgreSQL lookup support for Exim
|
|---|
| 97 | Group: System Environment/Daemons
|
|---|
| 98 | Requires: exim = %{version}-%{release}
|
|---|
| 99 |
|
|---|
| 100 | %description pgsql
|
|---|
| 101 | This package contains the PostgreSQL lookup module for Exim
|
|---|
| 102 |
|
|---|
| 103 | %package mon
|
|---|
| 104 | Summary: X11 monitor application for Exim
|
|---|
| 105 | Group: Applications/System
|
|---|
| 106 |
|
|---|
| 107 | %description mon
|
|---|
| 108 | The Exim Monitor is an optional supplement to the Exim package. It
|
|---|
| 109 | displays information about Exim's processing in an X window, and an
|
|---|
| 110 | administrator can perform a number of control actions from the window
|
|---|
| 111 | interface.
|
|---|
| 112 |
|
|---|
| 113 | %package sa
|
|---|
| 114 | Summary: Exim SpamAssassin at SMTP time - d/l plugin
|
|---|
| 115 | Group: System Environment/Daemons
|
|---|
| 116 | Requires: exim = %{version}-%{release}
|
|---|
| 117 |
|
|---|
| 118 | %description sa
|
|---|
| 119 | The exim-sa package is an old method for allowing SpamAssassin to be run on
|
|---|
| 120 | incoming mail at SMTP time. It is deprecated in favour of the built-in ACL
|
|---|
| 121 | support for content scanning.
|
|---|
| 122 |
|
|---|
| 123 | %package clamav
|
|---|
| 124 | Summary: Clam Antivirus scanner dÊmon configuration for use with Exim
|
|---|
| 125 | Group: System Environment/Daemons
|
|---|
| 126 | Requires: clamav-server exim
|
|---|
| 127 | Obsoletes: clamav-exim <= 0.86.2
|
|---|
| 128 | #Requires(post): /sbin/chkconfig /sbin/service
|
|---|
| 129 | #Requires(preun): /sbin/chkconfig /sbin/service
|
|---|
| 130 |
|
|---|
| 131 | %description clamav
|
|---|
| 132 | This package contains configuration files which invoke a copy of the
|
|---|
| 133 | clamav dÊmon for use with Exim. It can be activated by adding (or
|
|---|
| 134 | uncommenting)
|
|---|
| 135 |
|
|---|
| 136 | av_scanner = clamd:%{_var}/run/clamd.exim/clamd.sock
|
|---|
| 137 |
|
|---|
| 138 | in your exim.conf, and using the 'malware' condition in the DATA ACL,
|
|---|
| 139 | as follows:
|
|---|
| 140 |
|
|---|
| 141 | deny message = This message contains malware ($malware_name)
|
|---|
| 142 | malware = *
|
|---|
| 143 |
|
|---|
| 144 | For further details of Exim content scanning, see chapter 41 of the Exim
|
|---|
| 145 | specification:
|
|---|
| 146 | http://www.exim.org/exim-html-%{version}/doc/html/spec_html/ch41.html
|
|---|
| 147 |
|
|---|
| 148 | %package greylist
|
|---|
| 149 | Summary: Example configuration for greylisting using Exim
|
|---|
| 150 | Group: System Environment/Daemons
|
|---|
| 151 | Requires: sqlite exim %{_sysconfdir}/cron.daily
|
|---|
| 152 |
|
|---|
| 153 | %description greylist
|
|---|
| 154 | This package contains a simple example of how to do greylisting in Exim's
|
|---|
| 155 | ACL configuration. It contains a cron job to remove old entries from the
|
|---|
| 156 | greylisting database, and an ACL subroutine which needs to be included
|
|---|
| 157 | from the main exim.conf file.
|
|---|
| 158 |
|
|---|
| 159 | To enable greylisting, install this package and then uncomment the lines
|
|---|
| 160 | in Exim's configuration /etc/exim.conf which enable it. You need to
|
|---|
| 161 | uncomment at least two lines -- the '.include' directive which includes
|
|---|
| 162 | the new ACL subroutine, and the line which invokes the new subroutine.
|
|---|
| 163 |
|
|---|
| 164 | By default, this implementation only greylists mails which appears
|
|---|
| 165 | 'suspicious' in some way. During normal processing of the ACLs we collect
|
|---|
| 166 | a list of 'offended' which it's committed, which may include having
|
|---|
| 167 | SpamAssassin points, lacking a Message-ID: header, coming from a blacklisted
|
|---|
| 168 | host, etc. There are examples of these in the default configuration file,
|
|---|
| 169 | mostly commented out. These should be sufficient for you to you trigger
|
|---|
| 170 | greylisting for whatever 'offences' you can dream of, or even to make
|
|---|
| 171 | greylisting unconditional.
|
|---|
| 172 |
|
|---|
| 173 | %prep
|
|---|
| 174 | %setup -q
|
|---|
| 175 | %if 0%{?buildsa}
|
|---|
| 176 | #%setup -q -T -D -a 13
|
|---|
| 177 | %endif
|
|---|
| 178 |
|
|---|
| 179 | %patch1 -p1 -b .os2~
|
|---|
| 180 | %patch4 -p1 -b .rhl
|
|---|
| 181 | #YD included into main diff: %patch6 -p1 -b .config
|
|---|
| 182 | #%patch8 -p1 -b .libdir
|
|---|
| 183 | #%patch12 -p1 -b .cyrus
|
|---|
| 184 | #%patch13 -p1 -b .pam
|
|---|
| 185 | #%patch14 -p1 -b .spamd
|
|---|
| 186 | #%patch18 -p1 -b .dl
|
|---|
| 187 | #%patch19 -p1 -b .procmail
|
|---|
| 188 | #%patch20 -p1 -b .filter
|
|---|
| 189 | %patch21 -p1 -b .localhost
|
|---|
| 190 | #%patch22 -p1 -b .grey
|
|---|
| 191 | #%patch23 -p1 -b .smarthost
|
|---|
| 192 | #%patch24 -p1 -b .dynlookup
|
|---|
| 193 | #%patch25 -p1 -b .dynconfig
|
|---|
| 194 | #%patch26 -p1 -b .strictaliasing
|
|---|
| 195 |
|
|---|
| 196 | cp %{SOURCE1} OS/Makefile-OS2
|
|---|
| 197 | cp %{SOURCE2} OS/os.h-OS2
|
|---|
| 198 |
|
|---|
| 199 | cp src/EDITME Local/Makefile
|
|---|
| 200 | sed -i 's!^# LOOKUP_MODULE_DIR=.*!LOOKUP_MODULE_DIR=%{_libdir}/exim/%{version}-%{release}/lookups!' Local/Makefile
|
|---|
| 201 | #sed -i 's!^# AUTH_LIBS=-lsasl2!AUTH_LIBS=-lsasl2!' Local/Makefile
|
|---|
| 202 | sed -i 's!^EXIM_USER=.*!EXIM_USER=root!' Local/Makefile
|
|---|
| 203 | cp exim_monitor/EDITME Local/eximon.conf
|
|---|
| 204 |
|
|---|
| 205 |
|
|---|
| 206 | %build
|
|---|
| 207 |
|
|---|
| 208 | export CONFIG_SHELL="/bin/sh"
|
|---|
| 209 | export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
|---|
| 210 | export LFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
|---|
| 211 | export CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
|
|---|
| 212 |
|
|---|
| 213 | %ifnarch s390 s390x sparc sparcv9 sparcv9v sparc64 sparc64v
|
|---|
| 214 | export PIE=-fpie
|
|---|
| 215 | %else
|
|---|
| 216 | export PIE=-fPIE
|
|---|
| 217 | %endif
|
|---|
| 218 | make _lib=%{_lib} FULLECHO=
|
|---|
| 219 |
|
|---|
| 220 | %if 0%{?buildsa}
|
|---|
| 221 | # build sa-exim
|
|---|
| 222 | cd sa-exim*
|
|---|
| 223 | perl -pi -e 's|\@lynx|HOME=/ /usr/bin/lynx|g;' Makefile
|
|---|
| 224 | make SACONF=%{_sysconfdir}/exim/sa-exim.conf CFLAGS="$RPM_OPT_FLAGS -fPIC"
|
|---|
| 225 | %endif
|
|---|
| 226 |
|
|---|
| 227 | %install
|
|---|
| 228 | rm -rf $RPM_BUILD_ROOT
|
|---|
| 229 |
|
|---|
| 230 | mkdir -p $RPM_BUILD_ROOT%{_sbindir}
|
|---|
| 231 | mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
|---|
| 232 | mkdir -p $RPM_BUILD_ROOT%{_libdir}
|
|---|
| 233 | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d
|
|---|
| 234 | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/exim
|
|---|
| 235 |
|
|---|
| 236 | cd build-`scripts/os-type`-`scripts/arch-type`
|
|---|
| 237 | install -m 4775 exim.exe $RPM_BUILD_ROOT%{_sbindir}
|
|---|
| 238 |
|
|---|
| 239 | # eximon eximon.bin
|
|---|
| 240 | for i in exim_dumpdb.exe exim_fixdb.exe exim_tidydb.exe \
|
|---|
| 241 | exinext exiwhat exim_dbmbuild.exe exicyclog exim_lock.exe \
|
|---|
| 242 | exigrep eximstats exipick exiqgrep exiqsumm \
|
|---|
| 243 | exim_checkaccess convert4r4
|
|---|
| 244 | do
|
|---|
| 245 | install -m 0755 $i $RPM_BUILD_ROOT%{_sbindir}
|
|---|
| 246 | done
|
|---|
| 247 |
|
|---|
| 248 | mkdir -p $RPM_BUILD_ROOT%{_libdir}/exim/%{version}-%{release}/lookups
|
|---|
| 249 | #for i in mysql.so pgsql.so
|
|---|
| 250 | #do
|
|---|
| 251 | # install -m755 lookups/$i \
|
|---|
| 252 | # $RPM_BUILD_ROOT%{_libdir}/exim/%{version}-%{release}/lookups
|
|---|
| 253 | #done
|
|---|
| 254 |
|
|---|
| 255 | cd ..
|
|---|
| 256 |
|
|---|
| 257 | install -m 0644 src/configure.default $RPM_BUILD_ROOT%{_sysconfdir}/exim/exim.conf
|
|---|
| 258 | #install -m 0644 %SOURCE11 $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/exim
|
|---|
| 259 |
|
|---|
| 260 | mkdir -p $RPM_BUILD_ROOT/usr/lib
|
|---|
| 261 | #pushd $RPM_BUILD_ROOT/usr/lib
|
|---|
| 262 | #ln -sf ../sbin/exim sendmail.exim
|
|---|
| 263 | #popd
|
|---|
| 264 |
|
|---|
| 265 | #pushd $RPM_BUILD_ROOT%{_sbindir}/
|
|---|
| 266 | #ln -sf exim sendmail.exim
|
|---|
| 267 | #popd
|
|---|
| 268 |
|
|---|
| 269 | #pushd $RPM_BUILD_ROOT%{_bindir}/
|
|---|
| 270 | #ln -sf ../sbin/exim mailq.exim
|
|---|
| 271 | #ln -sf ../sbin/exim runq.exim
|
|---|
| 272 | #ln -sf ../sbin/exim rsmtp.exim
|
|---|
| 273 | #ln -sf ../sbin/exim rmail.exim
|
|---|
| 274 | #ln -sf ../sbin/exim newaliases.exim
|
|---|
| 275 | #popd
|
|---|
| 276 |
|
|---|
| 277 | install -d -m 0750 $RPM_BUILD_ROOT%{_var}/spool/exim
|
|---|
| 278 | install -d -m 0750 $RPM_BUILD_ROOT%{_var}/spool/exim/db
|
|---|
| 279 | install -d -m 0750 $RPM_BUILD_ROOT%{_var}/spool/exim/input
|
|---|
| 280 | install -d -m 0750 $RPM_BUILD_ROOT%{_var}/spool/exim/msglog
|
|---|
| 281 | install -d -m 0750 $RPM_BUILD_ROOT%{_var}/log/exim
|
|---|
| 282 |
|
|---|
| 283 | mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8
|
|---|
| 284 | install -m644 doc/exim.8 $RPM_BUILD_ROOT%{_mandir}/man8/exim.8
|
|---|
| 285 | pod2man --center=EXIM --section=8 \
|
|---|
| 286 | $RPM_BUILD_ROOT%{_sbindir}/eximstats > \
|
|---|
| 287 | $RPM_BUILD_ROOT%{_mandir}/man8/eximstats.8
|
|---|
| 288 |
|
|---|
| 289 | #mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
|
|---|
| 290 | #install -m 644 %SOURCE3 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/exim
|
|---|
| 291 |
|
|---|
| 292 | #mkdir -p $RPM_BUILD_ROOT%{_initrddir}
|
|---|
| 293 | #install %SOURCE2 $RPM_BUILD_ROOT%{_initrddir}/exim
|
|---|
| 294 |
|
|---|
| 295 | #mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
|
|---|
| 296 | #install -m 0644 %SOURCE4 $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/exim
|
|---|
| 297 |
|
|---|
| 298 | #mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily
|
|---|
| 299 | #install -m 0755 %SOURCE5 $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/exim-tidydb
|
|---|
| 300 |
|
|---|
| 301 | %if 0%{?buildsa}
|
|---|
| 302 | # install sa
|
|---|
| 303 | cd sa-exim*
|
|---|
| 304 | mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/exim
|
|---|
| 305 | install *.so $RPM_BUILD_ROOT%{_libexecdir}/exim
|
|---|
| 306 | install -m 644 *.conf $RPM_BUILD_ROOT%{_sysconfdir}/exim
|
|---|
| 307 | ln -s sa-exim*.so $RPM_BUILD_ROOT%{_libexecdir}/exim/sa-exim.so
|
|---|
| 308 | %endif
|
|---|
| 309 |
|
|---|
| 310 | # generate ghost .pem file
|
|---|
| 311 | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pki/tls/certs
|
|---|
| 312 | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pki/tls/private
|
|---|
| 313 | touch $RPM_BUILD_ROOT%{_sysconfdir}/pki/tls/certs/exim.pem
|
|---|
| 314 | touch $RPM_BUILD_ROOT%{_sysconfdir}/pki/tls/private/exim.pem
|
|---|
| 315 | chmod 600 $RPM_BUILD_ROOT%{_sysconfdir}/pki/tls/certs/exim.pem
|
|---|
| 316 | chmod 600 $RPM_BUILD_ROOT%{_sysconfdir}/pki/tls/private/exim.pem
|
|---|
| 317 |
|
|---|
| 318 | # generate alternatives ghosts
|
|---|
| 319 | #mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
|
|---|
| 320 | #for i in %{_sbindir}/sendmail %{_bindir}/{mailq,runq,rsmtp,rmail,newaliases} \
|
|---|
| 321 | # /usr/lib/sendmail %{_sysconfdir}/pam.d/smtp %{_mandir}/man1/mailq.1.gz
|
|---|
| 322 | #do
|
|---|
| 323 | # touch $RPM_BUILD_ROOT$i
|
|---|
| 324 | #done
|
|---|
| 325 |
|
|---|
| 326 | %if 0%{?buildclam}
|
|---|
| 327 | # Munge the clamav init and config files from clamav-devel. This really ought
|
|---|
| 328 | # to be a subpackage of clamav, but this hack will have to do for now.
|
|---|
| 329 | %define clamsubst(n1:n2:n3:n3:n5) sed -e "s!<SERVICE>!%3!g;s!<USER>!%4!g;%5" %{_datadir}/clamav/template/%1 > $RPM_BUILD_ROOT%2
|
|---|
| 330 |
|
|---|
| 331 |
|
|---|
| 332 | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/clamd.d
|
|---|
| 333 | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
|
|---|
| 334 |
|
|---|
| 335 | #%clamsubst clamd.conf %{_sysconfdir}/clamd.d/exim.conf exim exim \
|
|---|
| 336 | # s!^##*\(\(LogFile\|LocalSocket\|PidFile\|User\)\s\|\(StreamSaveToDisk\|ScanMail\|LogTime\|ScanArchive\)$\)!\1!;s!^Example!#Example!;
|
|---|
| 337 | #
|
|---|
| 338 | #%clamsubst clamd.init %{_initrddir}/clamd.exim exim exim
|
|---|
| 339 | #%clamsubst clamd.logrotate %{_sysconfdir}/logrotate.d/clamd.exim exim exim
|
|---|
| 340 |
|
|---|
| 341 |
|
|---|
| 342 | cat <<EOF > $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/clamd.exim
|
|---|
| 343 | CLAMD_CONFIG='%_sysconfdir/clamd.d/exim.conf'
|
|---|
| 344 | CLAMD_SOCKET=%{_var}/run/clamd.exim/clamd.sock
|
|---|
| 345 | EOF
|
|---|
| 346 | #ln -sf clamd $RPM_BUILD_ROOT/usr/sbin/clamd.exim
|
|---|
| 347 |
|
|---|
| 348 | mkdir -p $RPM_BUILD_ROOT%{_var}/run/clamd.exim
|
|---|
| 349 | mkdir -p $RPM_BUILD_ROOT%{_var}/log
|
|---|
| 350 | touch $RPM_BUILD_ROOT%{_var}/log/clamd.exim
|
|---|
| 351 |
|
|---|
| 352 | %endif
|
|---|
| 353 |
|
|---|
| 354 | # Set up the greylist subpackage
|
|---|
| 355 | install -m644 %{SOURCE20} $RPM_BUILD_ROOT/%_sysconfdir/exim/exim-greylist.conf.inc
|
|---|
| 356 | install -m644 %{SOURCE21} $RPM_BUILD_ROOT/%_sysconfdir/exim/mk-greylist-db.sql
|
|---|
| 357 | mkdir -p $RPM_BUILD_ROOT/%_sysconfdir/cron.daily
|
|---|
| 358 | install -m755 %{SOURCE22} $RPM_BUILD_ROOT/%_sysconfdir/cron.daily/greylist-tidy.sh
|
|---|
| 359 | touch $RPM_BUILD_ROOT/%_var/spool/exim/db/greylist.db
|
|---|
| 360 |
|
|---|
| 361 | %clean
|
|---|
| 362 | rm -rf $RPM_BUILD_ROOT
|
|---|
| 363 |
|
|---|
| 364 | #%pre
|
|---|
| 365 | #%{_sbindir}/groupadd -g 93 exim 2>/dev/null
|
|---|
| 366 | #%{_sbindir}/useradd -d %{_var}/spool/exim -s /sbin/nologin -G mail -M -r -u 93 -g exim exim 2>/dev/null
|
|---|
| 367 | ## Copy TLS certs from old location to new -- don't move them, because the
|
|---|
| 368 | ## config file may be modified and may be pointing to the old location.
|
|---|
| 369 | #if [ ! -f /etc/pki/tls/certs/exim.pem -a -f %{_datadir}/ssl/certs/exim.pem ] ; then
|
|---|
| 370 | # cp %{_datadir}/ssl/certs/exim.pem /etc/pki/tls/certs/exim.pem
|
|---|
| 371 | # cp %{_datadir}/ssl/private/exim.pem /etc/pki/tls/private/exim.pem
|
|---|
| 372 | #fi
|
|---|
| 373 | #exit 0
|
|---|
| 374 |
|
|---|
| 375 | #%post
|
|---|
| 376 | #/sbin/chkconfig --add exim
|
|---|
| 377 | #%{_sbindir}/alternatives --install %{_sbindir}/sendmail mta %{_sbindir}/sendmail.exim 10 \
|
|---|
| 378 | # --slave %{_bindir}/mailq mta-mailq %{_bindir}/mailq.exim \
|
|---|
| 379 | # --slave %{_bindir}/runq mta-runq %{_bindir}/runq.exim \
|
|---|
| 380 | # --slave %{_bindir}/rsmtp mta-rsmtp %{_bindir}/rsmtp.exim \
|
|---|
| 381 | # --slave %{_bindir}/rmail mta-rmail %{_bindir}/rmail.exim \
|
|---|
| 382 | # --slave /etc/pam.d/smtp mta-pam /etc/pam.d/exim \
|
|---|
| 383 | # --slave %{_bindir}/newaliases mta-newaliases %{_bindir}/newaliases.exim \
|
|---|
| 384 | # --slave /usr/lib/sendmail mta-sendmail /usr/lib/sendmail.exim \
|
|---|
| 385 | # --slave %{_mandir}/man1/mailq.1.gz mta-mailqman %{_mandir}/man8/exim.8.gz \
|
|---|
| 386 | # --initscript exim
|
|---|
| 387 |
|
|---|
| 388 | #%preun
|
|---|
| 389 | #if [ $1 = 0 ]; then
|
|---|
| 390 | # /sbin/service exim stop > /dev/null 2>&1
|
|---|
| 391 | # /sbin/chkconfig --del exim
|
|---|
| 392 | # %{_sbindir}/alternatives --remove mta %{_sbindir}/sendmail.exim
|
|---|
| 393 | #fi
|
|---|
| 394 |
|
|---|
| 395 | #%postun
|
|---|
| 396 | #if [ "$1" -ge "1" ]; then
|
|---|
| 397 | # /sbin/service exim condrestart > /dev/null 2>&1
|
|---|
| 398 | # mta=`readlink /etc/alternatives/mta`
|
|---|
| 399 | # if [ "$mta" == "%{_sbindir}/sendmail.exim" ]; then
|
|---|
| 400 | # /usr/sbin/alternatives --set mta %{_sbindir}/sendmail.exim
|
|---|
| 401 | # fi
|
|---|
| 402 | #fi
|
|---|
| 403 |
|
|---|
| 404 | #%post greylist
|
|---|
| 405 | #if [ ! -r %{_var}/spool/exim/db/greylist.db ]; then
|
|---|
| 406 | # sqlite3 %{_var}/spool/exim/db/greylist.db < %{_sysconfdir}/exim/mk-greylist-db.sql
|
|---|
| 407 | # chown exim.exim %{_var}/spool/exim/db/greylist.db
|
|---|
| 408 | # chmod 0660 %{_var}/spool/exim/db/greylist.db
|
|---|
| 409 | #fi
|
|---|
| 410 |
|
|---|
| 411 | %post
|
|---|
| 412 | %wps_object_create_begin
|
|---|
| 413 | EXIM4_FOLDER:WPFolder|Exim %version|<WP_DESKTOP>|TITLE=Exim %version;
|
|---|
| 414 | EXIM4_EXIMD:WPProgram|Exim daemon|<EXIM4_FOLDER>|EXENAME=((%_sbindir/exim.exe));STARTUPDIR=((%_sbindir));PARAMETERS=-bd -q5m;TITLE=Exim4 daemon;
|
|---|
| 415 | EXIM4_EXIM_CONF:WPShadow|exim.conf|<EXIM4_FOLDER>|SHADOWID=((%_sysconfdir/exim/exim.conf))
|
|---|
| 416 | %wps_object_create_end
|
|---|
| 417 |
|
|---|
| 418 | %postun
|
|---|
| 419 | %wps_object_delete_all
|
|---|
| 420 |
|
|---|
| 421 | %files
|
|---|
| 422 | %defattr(-,root,root)
|
|---|
| 423 | %attr(4755,root,root) %{_sbindir}/exim.exe
|
|---|
| 424 | %{_sbindir}/exim_dumpdb.exe
|
|---|
| 425 | %{_sbindir}/exim_fixdb.exe
|
|---|
| 426 | %{_sbindir}/exim_tidydb.exe
|
|---|
| 427 | %{_sbindir}/exinext
|
|---|
| 428 | %{_sbindir}/exiwhat
|
|---|
| 429 | %{_sbindir}/exim_dbmbuild.exe
|
|---|
| 430 | %{_sbindir}/exicyclog
|
|---|
| 431 | %{_sbindir}/exigrep
|
|---|
| 432 | %{_sbindir}/eximstats
|
|---|
| 433 | %{_sbindir}/exipick
|
|---|
| 434 | %{_sbindir}/exiqgrep
|
|---|
| 435 | %{_sbindir}/exiqsumm
|
|---|
| 436 | %{_sbindir}/exim_lock.exe
|
|---|
| 437 | %{_sbindir}/exim_checkaccess
|
|---|
| 438 | %{_sbindir}/convert4r4
|
|---|
| 439 | #%{_sbindir}/sendmail.exim
|
|---|
| 440 | #%{_bindir}/mailq.exim
|
|---|
| 441 | #%{_bindir}/runq.exim
|
|---|
| 442 | #%{_bindir}/rsmtp.exim
|
|---|
| 443 | #%{_bindir}/rmail.exim
|
|---|
| 444 | #%{_bindir}/newaliases.exim
|
|---|
| 445 | #/usr/lib/sendmail.exim
|
|---|
| 446 | %{_mandir}/*/*
|
|---|
| 447 | %dir %{_libdir}/exim
|
|---|
| 448 | %dir %{_libdir}/exim/%{version}-%{release}
|
|---|
| 449 | %dir %{_libdir}/exim/%{version}-%{release}/lookups
|
|---|
| 450 |
|
|---|
| 451 | %defattr(-,exim,exim)
|
|---|
| 452 | %dir %{_var}/spool/exim
|
|---|
| 453 | %dir %{_var}/spool/exim/db
|
|---|
| 454 | %dir %{_var}/spool/exim/input
|
|---|
| 455 | %dir %{_var}/spool/exim/msglog
|
|---|
| 456 | %dir %{_var}/log/exim
|
|---|
| 457 |
|
|---|
| 458 | %defattr(-,root,mail)
|
|---|
| 459 | %dir %{_sysconfdir}/exim
|
|---|
| 460 | %config(noreplace) %{_sysconfdir}/exim/exim.conf
|
|---|
| 461 |
|
|---|
| 462 | %defattr(-,root,root)
|
|---|
| 463 | #%config(noreplace) %{_sysconfdir}/sysconfig/exim
|
|---|
| 464 | #%{_sysconfdir}/rc.d/init.d/exim
|
|---|
| 465 | #%config(noreplace) %{_sysconfdir}/logrotate.d/exim
|
|---|
| 466 | #%config(noreplace) %{_sysconfdir}/pam.d/exim
|
|---|
| 467 | #%{_sysconfdir}/cron.daily/exim-tidydb
|
|---|
| 468 |
|
|---|
| 469 | %doc ACKNOWLEDGMENTS LICENCE NOTICE README.UPDATING README
|
|---|
| 470 | %doc doc util/unknownuser.sh
|
|---|
| 471 |
|
|---|
| 472 | %attr(0600,root,root) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{_sysconfdir}/pki/tls/certs/exim.pem
|
|---|
| 473 | %attr(0600,root,root) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{_sysconfdir}/pki/tls/private/exim.pem
|
|---|
| 474 |
|
|---|
| 475 | %attr(0755,root,root) %ghost %{_sbindir}/sendmail
|
|---|
| 476 | %attr(0755,root,root) %ghost %{_bindir}/mailq
|
|---|
| 477 | %attr(0755,root,root) %ghost %{_bindir}/runq
|
|---|
| 478 | %attr(0755,root,root) %ghost %{_bindir}/rsmtp
|
|---|
| 479 | %attr(0755,root,root) %ghost %{_bindir}/rmail
|
|---|
| 480 | %attr(0755,root,root) %ghost %{_bindir}/newaliases
|
|---|
| 481 | %attr(0755,root,root) %ghost /usr/lib/sendmail
|
|---|
| 482 | #%ghost %{_sysconfdir}/pam.d/smtp
|
|---|
| 483 | #%ghost %{_mandir}/man1/mailq.1.gz
|
|---|
| 484 |
|
|---|
| 485 | #%files mysql
|
|---|
| 486 | #%defattr(-,root,root,-)
|
|---|
| 487 | #%{_libdir}/exim/%{version}-%{release}/lookups/mysql.so
|
|---|
| 488 |
|
|---|
| 489 | #%files pgsql
|
|---|
| 490 | #%defattr(-,root,root,-)
|
|---|
| 491 | #%{_libdir}/exim/%{version}-%{release}/lookups/pgsql.so
|
|---|
| 492 |
|
|---|
| 493 | #%files mon
|
|---|
| 494 | #%defattr(-,root,root)
|
|---|
| 495 | #%{_sbindir}/eximon
|
|---|
| 496 | #%{_sbindir}/eximon.bin
|
|---|
| 497 |
|
|---|
| 498 | %if 0%{?buildsa}
|
|---|
| 499 | %files sa
|
|---|
| 500 | %defattr(-,root,root)
|
|---|
| 501 | %{_libexecdir}/exim
|
|---|
| 502 | %config(noreplace) %{_sysconfdir}/exim/sa-*.conf
|
|---|
| 503 | %doc sa-exim*/*.html
|
|---|
| 504 | %doc sa-exim*/{ACKNOWLEDGEMENTS,INSTALL,LICENSE,TODO}
|
|---|
| 505 | %endif
|
|---|
| 506 |
|
|---|
| 507 | %if 0%{?buildclam}
|
|---|
| 508 | #%post clamav
|
|---|
| 509 | #/bin/touch %{_var}/log/clamd.exim
|
|---|
| 510 | #/bin/chown exim.exim %{_var}/log/clamd.exim
|
|---|
| 511 | #/sbin/chkconfig --add clamd.exim
|
|---|
| 512 |
|
|---|
| 513 | #%preun clamav
|
|---|
| 514 | #test "$1" != 0 || %{_initrddir}/clamd.exim stop &>/dev/null || :
|
|---|
| 515 | #test "$1" != 0 || /sbin/chkconfig --del clamd.exim
|
|---|
| 516 |
|
|---|
| 517 | #%postun clamav
|
|---|
| 518 | #test "$1" = 0 || %{_initrddir}/clamd.exim condrestart >/dev/null || :
|
|---|
| 519 |
|
|---|
| 520 | %files clamav
|
|---|
| 521 | %defattr(-,root,root,-)
|
|---|
| 522 | #%{_sbindir}/clamd.exim
|
|---|
| 523 | #%attr(0755,root,root) %config %{_initrddir}/clamd.exim
|
|---|
| 524 | #%config(noreplace) %verify(not mtime) %{_sysconfdir}/clamd.d/exim.conf
|
|---|
| 525 | %config(noreplace) %verify(not mtime) %{_sysconfdir}/sysconfig/clamd.exim
|
|---|
| 526 | #%config(noreplace) %verify(not mtime) %{_sysconfdir}/logrotate.d/clamd.exim
|
|---|
| 527 | %attr(0750,exim,exim) %dir %{_var}/run/clamd.exim
|
|---|
| 528 | %ghost %attr(0644,exim,exim) %{_var}/log/clamd.exim
|
|---|
| 529 | %endif
|
|---|
| 530 |
|
|---|
| 531 | %files greylist
|
|---|
| 532 | %defattr(-,root,root,-)
|
|---|
| 533 | %config %{_sysconfdir}/exim/exim-greylist.conf.inc
|
|---|
| 534 | %ghost %{_var}/spool/exim/db/greylist.db
|
|---|
| 535 | %{_sysconfdir}/exim/mk-greylist-db.sql
|
|---|
| 536 | %{_sysconfdir}/cron.daily/greylist-tidy.sh
|
|---|
| 537 |
|
|---|
| 538 | %changelog
|
|---|
| 539 |
|
|---|