2 %bcond_without pgsql # without PostgreSQL support
3 %bcond_without mysql # without MySQL support
4 %bcond_without whoson # without whoson support
5 %bcond_without ldap # without LDAP support
6 %bcond_without exiscan # without exiscan support
7 %bcond_without spf # without spf support
8 %bcond_without srs # without srs support
9 %bcond_with saexim # with sa-exim support
11 %define exiscan_version 4.42-27
12 %define saexim_version 3.1
13 Summary: University of Cambridge Mail Transfer Agent
14 Summary(pl): Agent Transferu Poczty Uniwersytetu w Cambridge
15 Summary(pt_BR): Servidor de correio eletrônico exim
21 Group: Networking/Daemons
22 Source0: ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/%{name}-%{version}.tar.bz2
23 # Source0-md5: eb6a06e70a78a03200b4e4aefbb7b0aa
24 Source1: ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/%{name}-texinfo-4.40.tar.bz2
25 # Source1-md5: cc91bd804ee0f7fd70991e2e6b529033
27 Source3: %{name}.cron.db
28 Source4: %{name}4.conf
29 Source5: analyse-log-errors
30 Source6: %{name}on.desktop
31 # 20021016: http://www.logic.univie.ac.at/~ametzler/debian/exim4manpages/
32 Source7: %{name}4-man-021016.tar.bz2
33 # Source7-md5: b552704ebf853a401946038a2b7e8e98
34 Source8: http://duncanthrax.net/exiscan-acl/exiscan-acl-%{exiscan_version}.patch.bz2
35 # Source8-md5: bc81a47009d24433a282e5c3a668fcb3
36 Source9: %{name}.aliases
38 Source11: %{name}.logrotate
39 Source12: %{name}.sysconfig
40 Source13: ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/FAQ.txt.bz2
41 # Source13-md5: 7c695675e5e60693916b787001252d56
42 Source14: ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/config.samples.tar.bz2
43 # Source14-md5: 42c7d5c02d06fdd3d8b6ba124ad9fd05
44 Source15: %{name}4-smtp.pamd
45 Source16: %{name}on.png
46 Source17: http://marc.merlins.org/linux/exim/files/sa-exim-%{saexim_version}.tar.gz
47 # Source17-md5: 34892f195384c127f7c40c461a9ef421
48 Patch0: %{name}4-EDITME.patch
49 Patch1: %{name}4-monitor-EDITME.patch
50 Patch2: %{name}4-texinfo.patch
51 Patch3: %{name}4-use_system_pcre.patch
52 Patch4: %{name}4-Makefile-Default.patch
53 Patch5: %{name}4-exiscan-pld.patch
54 URL: http://www.exim.org/
55 %{?with_ldap:BuildRequires: openldap-devel >= 2.0.0}
56 %{?with_spf:BuildRequires: libspf2-devel}
57 %{?with_srs:BuildRequires: libsrs_alt-devel}
58 %{?with_mysql:BuildRequires: mysql-devel}
59 %{?with_pgsql:BuildRequires: postgresql-devel}
60 %{?with_whoson:BuildRequires: whoson-devel}
61 BuildRequires: XFree86-devel
62 BuildRequires: db-devel
63 BuildRequires: openssl-devel >= 0.9.7d
64 BuildRequires: pam-devel
65 BuildRequires: pcre-devel
66 BuildRequires: perl-devel >= 1:5.6.0
67 BuildRequires: texinfo
69 Requires(pre): /bin/id
70 Requires(pre): /usr/bin/getgid
71 Requires(pre): /usr/sbin/groupadd
72 Requires(pre): /usr/sbin/useradd
73 Requires(postun): /usr/sbin/groupdel
74 Requires(postun): /usr/sbin/userdel
75 Requires(post): fileutils
76 Requires(post): /bin/hostname
77 Requires(post,preun): /sbin/chkconfig
78 Requires: pam >= 0.77.3
86 Obsoletes: qmail-client
88 Obsoletes: sendmail-cf
89 Obsoletes: sendmail-doc
94 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
97 Smail like Mail Transfer Agent with single configuration file.
98 Features: flexible retry algorithms, header & envelope rewriting,
99 multiple deliveries down single connection or multiple deliveries in
100 parallel, regular expressions in configuration parameters, file
101 lookups, supports sender and/or reciever verification, selective
102 relaying, supports virtual domains, built-in mail filtering and can be
103 configured to drop root privilleges when possible.
106 Agent transferu poczty (MTA) z pojedynczym plikiem konfiguracyjnym.
107 Jego zalety: ¶wietne algorytmy, mo¿liwo¶æ przepisywania nag³ówków &
108 koperty, wielokrotne dostarczanie poczty podczas jednego po³±czenia
109 lub równoleg³e dostarczanie poczty, wyra¿enia regularne w parametrach
110 konfiguracyjnych, weryfikacja nadawcy i/lub odbiorcy, selektywne
111 relayowanie, wsparcie dla wirtualnych domen, wbudowany system filtrów,
112 mo¿liwo¶æ odrzucania praw roota kiedy jest to mo¿liwe.
114 %description -l pt_BR
115 O exim é um agente de transporte de correio eletrônico (MTA),
116 desenvolvido na Universidade de Cambridge para uso em sistemas Unix
117 conectados a Internet. Similar em estilo ao smail 3, suas facilidades
118 são mais extensivas e em particular ele tem opções para verificação do
119 remetente e destinatário, para recusar mensagens de máquinas, redes ou
120 remetentes específicos.
123 Summary: X11 based Exim administration tool
124 Summary(pl): Narzêdzia administracyjne exima dla X11
125 Summary(pt_BR): Monitor X11 para o exim
126 Group: X11/Applications
129 X11 based monitor & administration utility for the Exim Mail Transfer
132 %description X11 -l pl
133 Bazuj±ce na X11 narzêdzia dla Exima - monitor i program
136 %description X11 -l pt_BR
137 O monitor exim é um suplemento opcional ao pacote exim. Ele mostra
138 informações sobre o processamento do exim em uma janela X11. O
139 administrador pode executar uma série de ações de controle a partir
151 %{?with_exiscan:test -f %{SOURCE8} || exit 1; bzip2 -d -c %{SOURCE8} | patch -p1 || exit 1}
152 %{?with_saexim:test -f %{SOURCE17} || exit 1; gzip -d -c %{SOURCE17} | tar -x || exit 1}
154 install %{SOURCE13} doc/FAQ.txt.bz2
155 install %{SOURCE14} doc/config.samples.tar.bz2
158 cp -f src/EDITME Local/Makefile
159 cp -f exim_monitor/EDITME Local/eximon.conf
164 cd sa-exim-%{saexim_version}
165 %{__make} -j1 sa-exim.h
166 echo '#define SPAMASSASSIN_CONF "%{_sysconfdir}/mail/spamassassin/local.cf"' >> sa-exim.h
167 cat sa-exim.c > ../src/local_scan.c
168 cat sa-exim.h > ../src/sa-exim.h
174 CFLAGS="%{rpmcflags} %{?with_spf:-DSPF} %{?with_srs:-DSRS}" \
176 XLFLAGS=-L%{_prefix}/X11R6/%{_lib} \
177 X11_LD_LIB=%{_prefix}/X11R6/%{_lib} \
178 %{?with_mysql:LOOKUP_MYSQL=yes} \
179 %{?with_pgsql:LOOKUP_PGSQL=yes} \
180 %{?with_whoson:LOOKUP_WHOSON=yes} \
181 %{?with_ldap:LOOKUP_LDAP=yes LDAP_LIB_TYPE=OPENLDAP2} \
182 LOOKUP_LIBS="%{?with_ldap:-lldap -llber} %{?with_mysql:-lmysqlclient} %{?with_pgsql:-lpq} %{?with_whoson:-lwhoson} %{?with_spf:-lspf2} %{?with_srs:-lsrs_alt}" \
183 LOOKUP_INCLUDE="%{?with_mysql:-I%{_includedir}/mysql} %{?with_pgsql:-I%{_includedir}/pgsql}"
185 makeinfo --force exim-texinfo-*/doc/*.texinfo
188 rm -rf $RPM_BUILD_ROOT
189 install -d $RPM_BUILD_ROOT%{_sysconfdir}/mail
190 install -d $RPM_BUILD_ROOT/etc/{cron.{daily,weekly},logrotate.d,rc.d/init.d,sysconfig,pam.d}
191 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir}/man8,/usr/lib}
192 install -d $RPM_BUILD_ROOT%{_var}/{spool/exim/{db,input,msglog},log/{archiv,}/exim,mail}
193 install -d $RPM_BUILD_ROOT{%{_infodir},%{_prefix}/X11R6/bin,%{_desktopdir},%{_pixmapsdir}}
195 install build-Linux-*/exim{,_fixdb,_tidydb,_dbmbuild,on.bin,_dumpdb,_lock} \
196 build-Linux-*/exi{cyclog,next,what} %{SOURCE10} \
197 build-Linux-*/{exigrep,eximstats,exiqsumm,convert4r4} \
198 util/unknownuser.sh \
199 $RPM_BUILD_ROOT%{_bindir}
200 install build-Linux-*/eximon.bin $RPM_BUILD_ROOT%{_prefix}/X11R6/bin
201 install build-Linux-*/eximon $RPM_BUILD_ROOT%{_prefix}/X11R6/bin
204 install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.weekly/
205 install %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
206 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
207 install %{SOURCE11} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
208 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/mail/exim.conf
209 install {doc,man}/*.8 $RPM_BUILD_ROOT%{_mandir}/man8/
210 install %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/mail/aliases
211 install *.info* $RPM_BUILD_ROOT%{_infodir}/
212 install %{SOURCE15} $RPM_BUILD_ROOT/etc/pam.d/smtp
214 %{?with_saexim:install sa-exim-%{saexim_version}/sa-exim.conf $RPM_BUILD_ROOT/%{_sysconfdir}/mail/sa-exim.conf}
216 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/sendmail
217 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT/usr/lib/sendmail
218 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/mailq
219 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/rsmtp
220 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/rmail
221 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/runq
223 install %{SOURCE6} $RPM_BUILD_ROOT%{_desktopdir}
224 install %{SOURCE16} $RPM_BUILD_ROOT%{_pixmapsdir}
226 touch $RPM_BUILD_ROOT%{_var}/log/exim/{main,reject,panic,process}.log
229 rm -rf $RPM_BUILD_ROOT
232 if [ -n "`/usr/bin/getgid exim`" ]; then
233 if [ "`getgid exim`" != "79" ]; then
234 echo "Warning: group exim haven't gid=79. Correct this before installing exim" 1>&2
238 /usr/sbin/groupadd -g 79 -r -f exim
241 if [ -n "`/bin/id -u exim 2>/dev/null`" ]; then
242 if [ "`id -u exim`" != "79" ]; then
243 echo "Warning: user exim doesn't have uid=79. Correct this before installing Exim" 1>&2
247 /usr/sbin/useradd -u 79 -r -d /var/spool/exim -s /bin/false -c "Exim pseudo user" -g exim exim 1>&2
252 /sbin/chkconfig --add %{name}
253 if [ -f /var/lock/subsys/exim ]; then
254 /etc/rc.d/init.d/%{name} restart >&2
256 echo "Run \"/etc/rc.d/init.d/%{name} start\" to start exim daemon."
259 if [ ! -f /etc/mail/mailname ]; then
260 rm -f /etc/mail/mailname && hostname -f > /etc/mail/mailname
261 chmod 644 /etc/mail/mailname
264 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
267 if [ "$1" = "0" ]; then
268 if [ -f /var/lock/subsys/exim ]; then
269 /etc/rc.d/init.d/exim stop >&2
271 /sbin/chkconfig --del %{name}
275 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
276 if [ "$1" = "0" ]; then
277 /usr/sbin/userdel exim
278 /usr/sbin/groupdel exim
281 %triggerpostun -- exim < 3.90
282 if [ -f /etc/mail/exim.conf ]; then
284 mv /etc/mail/exim.conf /etc/mail/exim.conf.3
285 /usr/bin/convert4r4 < /etc/mail/exim.conf.3 > /etc/mail/exim.conf
289 %defattr(644,root,root,755)
290 %doc README* NOTICE LICENCE analyse-log-errors doc/{ChangeLog,NewStuff,dbm.discuss.txt,filter.txt,spec.txt,Exim*.upgrade,OptionLists.txt%{?with_exiscan:,exiscan-*.txt}} build-Linux-*/transport-filter.pl
291 %attr( 644,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/exim.conf
292 %{?with_saexim:%attr( 644,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/sa-exim.conf}
293 %attr( 644,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/aliases
294 %attr( 644,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/exim
295 %attr( 644,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/exim
296 %attr( 754,root,root) /etc/rc.d/init.d/exim
297 %attr(4755,root,root) %{_bindir}/exim
298 %attr( 770,root,exim) %dir %{_var}/spool/exim
299 %attr( 750,exim,exim) %dir %{_var}/spool/exim/db
300 %attr( 700,exim,root) %dir %{_var}/spool/exim/input
301 %attr( 750,exim,root) %dir %{_var}/spool/exim/msglog
302 %attr( 755,root,root) %{_bindir}/exim_*
303 %attr( 755,root,root) %{_bindir}/exinext
304 %attr( 755,root,root) %{_bindir}/exiwhat
305 %attr( 755,root,root) %{_bindir}/exicyclog
306 %attr( 755,root,root) %{_bindir}/exigrep
307 %attr( 755,root,root) %{_bindir}/eximstats
308 %attr( 755,root,root) %{_bindir}/exiqsumm
309 %attr( 755,root,root) %{_bindir}/unknownuser.sh
310 %attr( 755,root,root) %{_bindir}/newaliases
311 %attr( 755,root,root) %{_bindir}/convert4r4
312 %attr( 755,root,root) %{_sbindir}/*
313 %attr( 755,root,root) /usr/lib/sendmail
314 %attr( 754,root,root) /etc/cron.weekly/exim.cron.db
315 %attr( 750,exim,root) %dir %{_var}/log/exim
316 %attr( 750,exim,root) %dir %{_var}/log/archiv/exim
317 %attr( 640,exim,root) %ghost %{_var}/log/exim/*
318 %attr( 640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/pam.d/smtp
323 %defattr(644,root,root,755)
324 %attr(755,root,root) %{_prefix}/X11R6/bin/*
325 %{_desktopdir}/%{name}on.desktop
326 %{_pixmapsdir}/%{name}on.png