| 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.4%{?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="/@unixroot/usr/bin/sh.exe"
|
|---|
| 209 | export MAKESHELL="/@unixroot/usr/bin/sh.exe"
|
|---|
| 210 | export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
|---|
| 211 | export LFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
|---|
| 212 | export CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
|
|---|
| 213 |
|
|---|
| 214 | %ifnarch s390 s390x sparc sparcv9 sparcv9v sparc64 sparc64v
|
|---|
| 215 | export PIE=-fpie
|
|---|
| 216 | %else
|
|---|
| 217 | export PIE=-fPIE
|
|---|
| 218 | %endif
|
|---|
| 219 | make _lib=%{_lib} SHELL="/@unixroot/usr/bin/sh.exe" FULLECHO=
|
|---|
| 220 |
|
|---|
| 221 | %if 0%{?buildsa}
|
|---|
| 222 | # build sa-exim
|
|---|
| 223 | cd sa-exim*
|
|---|
| 224 | perl -pi -e 's|\@lynx|HOME=/ /usr/bin/lynx|g;' Makefile
|
|---|
| 225 | make SACONF=%{_sysconfdir}/exim/sa-exim.conf CFLAGS="$RPM_OPT_FLAGS -fPIC"
|
|---|
| 226 | %endif
|
|---|
| 227 |
|
|---|
| 228 | %install
|
|---|
| 229 | rm -rf $RPM_BUILD_ROOT
|
|---|
| 230 |
|
|---|
| 231 | mkdir -p $RPM_BUILD_ROOT%{_sbindir}
|
|---|
| 232 | mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
|---|
| 233 | mkdir -p $RPM_BUILD_ROOT%{_libdir}
|
|---|
| 234 | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d
|
|---|
| 235 | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/exim
|
|---|
| 236 |
|
|---|
| 237 | cd build-`scripts/os-type`-`scripts/arch-type`
|
|---|
| 238 | install -m 4775 exim.exe $RPM_BUILD_ROOT%{_sbindir}
|
|---|
| 239 |
|
|---|
| 240 | # eximon eximon.bin
|
|---|
| 241 | for i in exim_dumpdb.exe exim_fixdb.exe exim_tidydb.exe \
|
|---|
| 242 | exinext exiwhat exim_dbmbuild.exe exicyclog exim_lock.exe \
|
|---|
| 243 | exigrep eximstats exipick exiqgrep exiqsumm \
|
|---|
| 244 | exim_checkaccess convert4r4
|
|---|
| 245 | do
|
|---|
| 246 | install -m 0755 $i $RPM_BUILD_ROOT%{_sbindir}
|
|---|
| 247 | done
|
|---|
| 248 |
|
|---|
| 249 | mkdir -p $RPM_BUILD_ROOT%{_libdir}/exim/%{version}-%{release}/lookups
|
|---|
| 250 | #for i in mysql.so pgsql.so
|
|---|
| 251 | #do
|
|---|
| 252 | # install -m755 lookups/$i \
|
|---|
| 253 | # $RPM_BUILD_ROOT%{_libdir}/exim/%{version}-%{release}/lookups
|
|---|
| 254 | #done
|
|---|
| 255 |
|
|---|
| 256 | cd ..
|
|---|
| 257 |
|
|---|
| 258 | install -m 0644 src/configure.default $RPM_BUILD_ROOT%{_sysconfdir}/exim/exim.conf
|
|---|
| 259 | #install -m 0644 %SOURCE11 $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/exim
|
|---|
| 260 |
|
|---|
| 261 | mkdir -p $RPM_BUILD_ROOT/usr/lib
|
|---|
| 262 | #pushd $RPM_BUILD_ROOT/usr/lib
|
|---|
| 263 | #ln -sf ../sbin/exim sendmail.exim
|
|---|
| 264 | #popd
|
|---|
| 265 |
|
|---|
| 266 | #pushd $RPM_BUILD_ROOT%{_sbindir}/
|
|---|
| 267 | #ln -sf exim sendmail.exim
|
|---|
| 268 | #popd
|
|---|
| 269 |
|
|---|
| 270 | #pushd $RPM_BUILD_ROOT%{_bindir}/
|
|---|
| 271 | #ln -sf ../sbin/exim mailq.exim
|
|---|
| 272 | #ln -sf ../sbin/exim runq.exim
|
|---|
| 273 | #ln -sf ../sbin/exim rsmtp.exim
|
|---|
| 274 | #ln -sf ../sbin/exim rmail.exim
|
|---|
| 275 | #ln -sf ../sbin/exim newaliases.exim
|
|---|
| 276 | #popd
|
|---|
| 277 |
|
|---|
| 278 | install -d -m 0750 $RPM_BUILD_ROOT%{_var}/spool/exim
|
|---|
| 279 | install -d -m 0750 $RPM_BUILD_ROOT%{_var}/spool/exim/db
|
|---|
| 280 | install -d -m 0750 $RPM_BUILD_ROOT%{_var}/spool/exim/input
|
|---|
| 281 | install -d -m 0750 $RPM_BUILD_ROOT%{_var}/spool/exim/msglog
|
|---|
| 282 | install -d -m 0750 $RPM_BUILD_ROOT%{_var}/log/exim
|
|---|
| 283 |
|
|---|
| 284 | mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8
|
|---|
| 285 | install -m644 doc/exim.8 $RPM_BUILD_ROOT%{_mandir}/man8/exim.8
|
|---|
| 286 | pod2man --center=EXIM --section=8 \
|
|---|
| 287 | $RPM_BUILD_ROOT%{_sbindir}/eximstats > \
|
|---|
| 288 | $RPM_BUILD_ROOT%{_mandir}/man8/eximstats.8
|
|---|
| 289 |
|
|---|
| 290 | #mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
|
|---|
| 291 | #install -m 644 %SOURCE3 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/exim
|
|---|
| 292 |
|
|---|
| 293 | #mkdir -p $RPM_BUILD_ROOT%{_initrddir}
|
|---|
| 294 | #install %SOURCE2 $RPM_BUILD_ROOT%{_initrddir}/exim
|
|---|
| 295 |
|
|---|
| 296 | #mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
|
|---|
| 297 | #install -m 0644 %SOURCE4 $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/exim
|
|---|
| 298 |
|
|---|
| 299 | #mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily
|
|---|
| 300 | #install -m 0755 %SOURCE5 $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/exim-tidydb
|
|---|
| 301 |
|
|---|
| 302 | %if 0%{?buildsa}
|
|---|
| 303 | # install sa
|
|---|
| 304 | cd sa-exim*
|
|---|
| 305 | mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/exim
|
|---|
| 306 | install *.so $RPM_BUILD_ROOT%{_libexecdir}/exim
|
|---|
| 307 | install -m 644 *.conf $RPM_BUILD_ROOT%{_sysconfdir}/exim
|
|---|
| 308 | ln -s sa-exim*.so $RPM_BUILD_ROOT%{_libexecdir}/exim/sa-exim.so
|
|---|
| 309 | %endif
|
|---|
| 310 |
|
|---|
| 311 | # generate ghost .pem file
|
|---|
| 312 | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pki/tls/certs
|
|---|
| 313 | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pki/tls/private
|
|---|
| 314 | touch $RPM_BUILD_ROOT%{_sysconfdir}/pki/tls/certs/exim.pem
|
|---|
| 315 | touch $RPM_BUILD_ROOT%{_sysconfdir}/pki/tls/private/exim.pem
|
|---|
| 316 | chmod 600 $RPM_BUILD_ROOT%{_sysconfdir}/pki/tls/certs/exim.pem
|
|---|
| 317 | chmod 600 $RPM_BUILD_ROOT%{_sysconfdir}/pki/tls/private/exim.pem
|
|---|
| 318 |
|
|---|
| 319 | # generate alternatives ghosts
|
|---|
| 320 | #mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
|
|---|
| 321 | #for i in %{_sbindir}/sendmail %{_bindir}/{mailq,runq,rsmtp,rmail,newaliases} \
|
|---|
| 322 | # /usr/lib/sendmail %{_sysconfdir}/pam.d/smtp %{_mandir}/man1/mailq.1.gz
|
|---|
| 323 | #do
|
|---|
| 324 | # touch $RPM_BUILD_ROOT$i
|
|---|
| 325 | #done
|
|---|
| 326 |
|
|---|
| 327 | %if 0%{?buildclam}
|
|---|
| 328 | # Munge the clamav init and config files from clamav-devel. This really ought
|
|---|
| 329 | # to be a subpackage of clamav, but this hack will have to do for now.
|
|---|
| 330 | %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
|
|---|
| 331 |
|
|---|
| 332 |
|
|---|
| 333 | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/clamd.d
|
|---|
| 334 | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
|
|---|
| 335 |
|
|---|
| 336 | #%clamsubst clamd.conf %{_sysconfdir}/clamd.d/exim.conf exim exim \
|
|---|
| 337 | # s!^##*\(\(LogFile\|LocalSocket\|PidFile\|User\)\s\|\(StreamSaveToDisk\|ScanMail\|LogTime\|ScanArchive\)$\)!\1!;s!^Example!#Example!;
|
|---|
| 338 | #
|
|---|
| 339 | #%clamsubst clamd.init %{_initrddir}/clamd.exim exim exim
|
|---|
| 340 | #%clamsubst clamd.logrotate %{_sysconfdir}/logrotate.d/clamd.exim exim exim
|
|---|
| 341 |
|
|---|
| 342 |
|
|---|
| 343 | cat <<EOF > $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/clamd.exim
|
|---|
| 344 | CLAMD_CONFIG='%_sysconfdir/clamd.d/exim.conf'
|
|---|
| 345 | CLAMD_SOCKET=%{_var}/run/clamd.exim/clamd.sock
|
|---|
| 346 | EOF
|
|---|
| 347 | #ln -sf clamd $RPM_BUILD_ROOT/usr/sbin/clamd.exim
|
|---|
| 348 |
|
|---|
| 349 | mkdir -p $RPM_BUILD_ROOT%{_var}/run/clamd.exim
|
|---|
| 350 | mkdir -p $RPM_BUILD_ROOT%{_var}/log
|
|---|
| 351 | touch $RPM_BUILD_ROOT%{_var}/log/clamd.exim
|
|---|
| 352 |
|
|---|
| 353 | %endif
|
|---|
| 354 |
|
|---|
| 355 | # Set up the greylist subpackage
|
|---|
| 356 | install -m644 %{SOURCE20} $RPM_BUILD_ROOT/%_sysconfdir/exim/exim-greylist.conf.inc
|
|---|
| 357 | install -m644 %{SOURCE21} $RPM_BUILD_ROOT/%_sysconfdir/exim/mk-greylist-db.sql
|
|---|
| 358 | mkdir -p $RPM_BUILD_ROOT/%_sysconfdir/cron.daily
|
|---|
| 359 | install -m755 %{SOURCE22} $RPM_BUILD_ROOT/%_sysconfdir/cron.daily/greylist-tidy.sh
|
|---|
| 360 | touch $RPM_BUILD_ROOT/%_var/spool/exim/db/greylist.db
|
|---|
| 361 |
|
|---|
| 362 | %clean
|
|---|
| 363 | rm -rf $RPM_BUILD_ROOT
|
|---|
| 364 |
|
|---|
| 365 | #%pre
|
|---|
| 366 | #%{_sbindir}/groupadd -g 93 exim 2>/dev/null
|
|---|
| 367 | #%{_sbindir}/useradd -d %{_var}/spool/exim -s /sbin/nologin -G mail -M -r -u 93 -g exim exim 2>/dev/null
|
|---|
| 368 | ## Copy TLS certs from old location to new -- don't move them, because the
|
|---|
| 369 | ## config file may be modified and may be pointing to the old location.
|
|---|
| 370 | #if [ ! -f /etc/pki/tls/certs/exim.pem -a -f %{_datadir}/ssl/certs/exim.pem ] ; then
|
|---|
| 371 | # cp %{_datadir}/ssl/certs/exim.pem /etc/pki/tls/certs/exim.pem
|
|---|
| 372 | # cp %{_datadir}/ssl/private/exim.pem /etc/pki/tls/private/exim.pem
|
|---|
| 373 | #fi
|
|---|
| 374 | #exit 0
|
|---|
| 375 |
|
|---|
| 376 | #%post
|
|---|
| 377 | #/sbin/chkconfig --add exim
|
|---|
| 378 | #%{_sbindir}/alternatives --install %{_sbindir}/sendmail mta %{_sbindir}/sendmail.exim 10 \
|
|---|
| 379 | # --slave %{_bindir}/mailq mta-mailq %{_bindir}/mailq.exim \
|
|---|
| 380 | # --slave %{_bindir}/runq mta-runq %{_bindir}/runq.exim \
|
|---|
| 381 | # --slave %{_bindir}/rsmtp mta-rsmtp %{_bindir}/rsmtp.exim \
|
|---|
| 382 | # --slave %{_bindir}/rmail mta-rmail %{_bindir}/rmail.exim \
|
|---|
| 383 | # --slave /etc/pam.d/smtp mta-pam /etc/pam.d/exim \
|
|---|
| 384 | # --slave %{_bindir}/newaliases mta-newaliases %{_bindir}/newaliases.exim \
|
|---|
| 385 | # --slave /usr/lib/sendmail mta-sendmail /usr/lib/sendmail.exim \
|
|---|
| 386 | # --slave %{_mandir}/man1/mailq.1.gz mta-mailqman %{_mandir}/man8/exim.8.gz \
|
|---|
| 387 | # --initscript exim
|
|---|
| 388 |
|
|---|
| 389 | #%preun
|
|---|
| 390 | #if [ $1 = 0 ]; then
|
|---|
| 391 | # /sbin/service exim stop > /dev/null 2>&1
|
|---|
| 392 | # /sbin/chkconfig --del exim
|
|---|
| 393 | # %{_sbindir}/alternatives --remove mta %{_sbindir}/sendmail.exim
|
|---|
| 394 | #fi
|
|---|
| 395 |
|
|---|
| 396 | #%postun
|
|---|
| 397 | #if [ "$1" -ge "1" ]; then
|
|---|
| 398 | # /sbin/service exim condrestart > /dev/null 2>&1
|
|---|
| 399 | # mta=`readlink /etc/alternatives/mta`
|
|---|
| 400 | # if [ "$mta" == "%{_sbindir}/sendmail.exim" ]; then
|
|---|
| 401 | # /usr/sbin/alternatives --set mta %{_sbindir}/sendmail.exim
|
|---|
| 402 | # fi
|
|---|
| 403 | #fi
|
|---|
| 404 |
|
|---|
| 405 | #%post greylist
|
|---|
| 406 | #if [ ! -r %{_var}/spool/exim/db/greylist.db ]; then
|
|---|
| 407 | # sqlite3 %{_var}/spool/exim/db/greylist.db < %{_sysconfdir}/exim/mk-greylist-db.sql
|
|---|
| 408 | # chown exim.exim %{_var}/spool/exim/db/greylist.db
|
|---|
| 409 | # chmod 0660 %{_var}/spool/exim/db/greylist.db
|
|---|
| 410 | #fi
|
|---|
| 411 |
|
|---|
| 412 | %post
|
|---|
| 413 | %wps_object_create_begin
|
|---|
| 414 | EXIM4_FOLDER:WPFolder|Exim %version|<WP_DESKTOP>|TITLE=Exim %version;
|
|---|
| 415 | EXIM4_EXIMD:WPProgram|Exim daemon|<EXIM4_FOLDER>|EXENAME=((%_sbindir/exim.exe));STARTUPDIR=((%_sbindir));PARAMETERS=-bd -q5m;TITLE=Exim4 daemon;
|
|---|
| 416 | EXIM4_EXIM_CONF:WPShadow|exim.conf|<EXIM4_FOLDER>|SHADOWID=((%_sysconfdir/exim/exim.conf))
|
|---|
| 417 | %wps_object_create_end
|
|---|
| 418 |
|
|---|
| 419 | %postun
|
|---|
| 420 | %wps_object_delete_all
|
|---|
| 421 |
|
|---|
| 422 | %files
|
|---|
| 423 | %defattr(-,root,root)
|
|---|
| 424 | %attr(4755,root,root) %{_sbindir}/exim.exe
|
|---|
| 425 | %{_sbindir}/exim_dumpdb.exe
|
|---|
| 426 | %{_sbindir}/exim_fixdb.exe
|
|---|
| 427 | %{_sbindir}/exim_tidydb.exe
|
|---|
| 428 | %{_sbindir}/exinext
|
|---|
| 429 | %{_sbindir}/exiwhat
|
|---|
| 430 | %{_sbindir}/exim_dbmbuild.exe
|
|---|
| 431 | %{_sbindir}/exicyclog
|
|---|
| 432 | %{_sbindir}/exigrep
|
|---|
| 433 | %{_sbindir}/eximstats
|
|---|
| 434 | %{_sbindir}/exipick
|
|---|
| 435 | %{_sbindir}/exiqgrep
|
|---|
| 436 | %{_sbindir}/exiqsumm
|
|---|
| 437 | %{_sbindir}/exim_lock.exe
|
|---|
| 438 | %{_sbindir}/exim_checkaccess
|
|---|
| 439 | %{_sbindir}/convert4r4
|
|---|
| 440 | #%{_sbindir}/sendmail.exim
|
|---|
| 441 | #%{_bindir}/mailq.exim
|
|---|
| 442 | #%{_bindir}/runq.exim
|
|---|
| 443 | #%{_bindir}/rsmtp.exim
|
|---|
| 444 | #%{_bindir}/rmail.exim
|
|---|
| 445 | #%{_bindir}/newaliases.exim
|
|---|
| 446 | #/usr/lib/sendmail.exim
|
|---|
| 447 | %{_mandir}/*/*
|
|---|
| 448 | %dir %{_libdir}/exim
|
|---|
| 449 | %dir %{_libdir}/exim/%{version}-%{release}
|
|---|
| 450 | %dir %{_libdir}/exim/%{version}-%{release}/lookups
|
|---|
| 451 |
|
|---|
| 452 | %defattr(-,exim,exim)
|
|---|
| 453 | %dir %{_var}/spool/exim
|
|---|
| 454 | %dir %{_var}/spool/exim/db
|
|---|
| 455 | %dir %{_var}/spool/exim/input
|
|---|
| 456 | %dir %{_var}/spool/exim/msglog
|
|---|
| 457 | %dir %{_var}/log/exim
|
|---|
| 458 |
|
|---|
| 459 | %defattr(-,root,mail)
|
|---|
| 460 | %dir %{_sysconfdir}/exim
|
|---|
| 461 | %config(noreplace) %{_sysconfdir}/exim/exim.conf
|
|---|
| 462 |
|
|---|
| 463 | %defattr(-,root,root)
|
|---|
| 464 | #%config(noreplace) %{_sysconfdir}/sysconfig/exim
|
|---|
| 465 | #%{_sysconfdir}/rc.d/init.d/exim
|
|---|
| 466 | #%config(noreplace) %{_sysconfdir}/logrotate.d/exim
|
|---|
| 467 | #%config(noreplace) %{_sysconfdir}/pam.d/exim
|
|---|
| 468 | #%{_sysconfdir}/cron.daily/exim-tidydb
|
|---|
| 469 |
|
|---|
| 470 | %doc ACKNOWLEDGMENTS LICENCE NOTICE README.UPDATING README
|
|---|
| 471 | %doc doc util/unknownuser.sh
|
|---|
| 472 |
|
|---|
| 473 | %attr(0600,root,root) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{_sysconfdir}/pki/tls/certs/exim.pem
|
|---|
| 474 | %attr(0600,root,root) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{_sysconfdir}/pki/tls/private/exim.pem
|
|---|
| 475 |
|
|---|
| 476 | %attr(0755,root,root) %ghost %{_sbindir}/sendmail
|
|---|
| 477 | %attr(0755,root,root) %ghost %{_bindir}/mailq
|
|---|
| 478 | %attr(0755,root,root) %ghost %{_bindir}/runq
|
|---|
| 479 | %attr(0755,root,root) %ghost %{_bindir}/rsmtp
|
|---|
| 480 | %attr(0755,root,root) %ghost %{_bindir}/rmail
|
|---|
| 481 | %attr(0755,root,root) %ghost %{_bindir}/newaliases
|
|---|
| 482 | %attr(0755,root,root) %ghost /usr/lib/sendmail
|
|---|
| 483 | #%ghost %{_sysconfdir}/pam.d/smtp
|
|---|
| 484 | #%ghost %{_mandir}/man1/mailq.1.gz
|
|---|
| 485 |
|
|---|
| 486 | #%files mysql
|
|---|
| 487 | #%defattr(-,root,root,-)
|
|---|
| 488 | #%{_libdir}/exim/%{version}-%{release}/lookups/mysql.so
|
|---|
| 489 |
|
|---|
| 490 | #%files pgsql
|
|---|
| 491 | #%defattr(-,root,root,-)
|
|---|
| 492 | #%{_libdir}/exim/%{version}-%{release}/lookups/pgsql.so
|
|---|
| 493 |
|
|---|
| 494 | #%files mon
|
|---|
| 495 | #%defattr(-,root,root)
|
|---|
| 496 | #%{_sbindir}/eximon
|
|---|
| 497 | #%{_sbindir}/eximon.bin
|
|---|
| 498 |
|
|---|
| 499 | %if 0%{?buildsa}
|
|---|
| 500 | %files sa
|
|---|
| 501 | %defattr(-,root,root)
|
|---|
| 502 | %{_libexecdir}/exim
|
|---|
| 503 | %config(noreplace) %{_sysconfdir}/exim/sa-*.conf
|
|---|
| 504 | %doc sa-exim*/*.html
|
|---|
| 505 | %doc sa-exim*/{ACKNOWLEDGEMENTS,INSTALL,LICENSE,TODO}
|
|---|
| 506 | %endif
|
|---|
| 507 |
|
|---|
| 508 | %if 0%{?buildclam}
|
|---|
| 509 | #%post clamav
|
|---|
| 510 | #/bin/touch %{_var}/log/clamd.exim
|
|---|
| 511 | #/bin/chown exim.exim %{_var}/log/clamd.exim
|
|---|
| 512 | #/sbin/chkconfig --add clamd.exim
|
|---|
| 513 |
|
|---|
| 514 | #%preun clamav
|
|---|
| 515 | #test "$1" != 0 || %{_initrddir}/clamd.exim stop &>/dev/null || :
|
|---|
| 516 | #test "$1" != 0 || /sbin/chkconfig --del clamd.exim
|
|---|
| 517 |
|
|---|
| 518 | #%postun clamav
|
|---|
| 519 | #test "$1" = 0 || %{_initrddir}/clamd.exim condrestart >/dev/null || :
|
|---|
| 520 |
|
|---|
| 521 | %files clamav
|
|---|
| 522 | %defattr(-,root,root,-)
|
|---|
| 523 | #%{_sbindir}/clamd.exim
|
|---|
| 524 | #%attr(0755,root,root) %config %{_initrddir}/clamd.exim
|
|---|
| 525 | #%config(noreplace) %verify(not mtime) %{_sysconfdir}/clamd.d/exim.conf
|
|---|
| 526 | %config(noreplace) %verify(not mtime) %{_sysconfdir}/sysconfig/clamd.exim
|
|---|
| 527 | #%config(noreplace) %verify(not mtime) %{_sysconfdir}/logrotate.d/clamd.exim
|
|---|
| 528 | %attr(0750,exim,exim) %dir %{_var}/run/clamd.exim
|
|---|
| 529 | %ghost %attr(0644,exim,exim) %{_var}/log/clamd.exim
|
|---|
| 530 | %endif
|
|---|
| 531 |
|
|---|
| 532 | %files greylist
|
|---|
| 533 | %defattr(-,root,root,-)
|
|---|
| 534 | %config %{_sysconfdir}/exim/exim-greylist.conf.inc
|
|---|
| 535 | %ghost %{_var}/spool/exim/db/greylist.db
|
|---|
| 536 | %{_sysconfdir}/exim/mk-greylist-db.sql
|
|---|
| 537 | %{_sysconfdir}/cron.daily/greylist-tidy.sh
|
|---|
| 538 |
|
|---|
| 539 | %changelog
|
|---|
| 540 |
|
|---|