]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without pgsql # without PostgreSQL support | |
4 | %bcond_without mysql # without MySQL support | |
5 | %bcond_without sqlite # without sqlite | |
6 | %bcond_without whoson # without whoson support | |
7 | %bcond_without sasl # without SASL | |
8 | %bcond_without ldap # without LDAP support | |
9 | %bcond_without spf # without spf support | |
10 | %bcond_without srs # without srs support | |
11 | %bcond_with dynamic # dynamic modules | |
12 | %bcond_without hiredis # without redis | |
13 | # opendmarc.spec not ready, so off by default | |
14 | %bcond_with dmarc # DMARC support | |
15 | %bcond_without lmdb # LMDB support | |
16 | ||
17 | %if "%{pld_release}" == "ac" | |
18 | # hiredis build segfaults on ac-alpha | |
19 | %undefine with_hiredis | |
20 | %endif | |
21 | ||
22 | Summary: University of Cambridge Mail Transfer Agent | |
23 | Summary(pl.UTF-8): Agent Transferu Poczty Uniwersytetu w Cambridge | |
24 | Summary(pt_BR.UTF-8): Servidor de correio eletrônico exim | |
25 | Name: exim | |
26 | Version: 4.94 | |
27 | Release: 13 | |
28 | Epoch: 2 | |
29 | License: GPL v2+ | |
30 | Group: Networking/Daemons/SMTP | |
31 | Source0: ftp://ftp.exim.org/pub/exim/exim4/%{name}-%{version}.tar.bz2 | |
32 | # Source0-md5: 5773e8a0379bd621d57bc66c36ffff17 | |
33 | Source1: ftp://ftp.exim.org/pub/exim/exim4/%{name}-html-%{version}.tar.bz2 | |
34 | # Source1-md5: e840b2f90c08bdaa8c7a356c5cab79dd | |
35 | Source2: %{name}.init | |
36 | Source3: %{name}.cron.db | |
37 | Source4: %{name}4.conf | |
38 | Source5: analyse-log-errors | |
39 | Source6: %{name}on.desktop | |
40 | # 20021016: http://www.logic.univie.ac.at/~ametzler/debian/exim4manpages/ | |
41 | Source7: %{name}4-man-021016.tar.bz2 | |
42 | # Source7-md5: b552704ebf853a401946038a2b7e8e98 | |
43 | Source9: %{name}.aliases | |
44 | Source10: newaliases | |
45 | Source11: %{name}.logrotate | |
46 | Source12: %{name}.sysconfig | |
47 | Source14: ftp://ftp.exim.org/pub/exim/exim4/old/config.samples.tar.bz2 | |
48 | # Source14-md5: 4b93321938a800caa6127c48ad60a42b | |
49 | Source15: %{name}4-smtp.pamd | |
50 | Source16: %{name}on.png | |
51 | # sh branch.sh | |
52 | Patch100: %{name}-git.patch | |
53 | # Patch100-md5: c82fd767d6b8c8e2f245afa16970ae39 | |
54 | Patch0: %{name}4-EDITME.patch | |
55 | Patch1: %{name}4-monitor-EDITME.patch | |
56 | Patch2: %{name}4-cflags.patch | |
57 | Patch3: exim-defs.patch | |
58 | Patch4: %{name}4-Makefile-Default.patch | |
59 | # http://marc.merlins.org/linux/exim/files/sa-exim-cvs/localscan_dlopen_exim_4.20_or_better.patch | |
60 | Patch5: localscan_dlopen_%{name}_4.20_or_better.patch | |
61 | ||
62 | Patch8: %{name}-spam-timeout.patch | |
63 | ||
64 | Patch20: %{name}4-disableSSLv3.patch | |
65 | URL: http://www.exim.org/ | |
66 | %{?with_sasl:BuildRequires: cyrus-sasl-devel >= 2.1.0} | |
67 | BuildRequires: db-devel | |
68 | %{?with_hiredis:BuildRequires: hiredis-devel} | |
69 | BuildRequires: libidn-devel | |
70 | BuildRequires: libidn2-devel | |
71 | %{?with_spf:BuildRequires: libspf2-devel >= 1.2.5-2} | |
72 | %{?with_srs:BuildRequires: libsrs_alt-devel >= 1.0} | |
73 | %{?with_lmdb:BuildRequires: lmdb-devel} | |
74 | %{?with_mysql:BuildRequires: mysql-devel} | |
75 | %{?with_dmarc:BuildRequires: opendmarc-devel} | |
76 | %{?with_ldap:BuildRequires: openldap-devel >= 2.3.0} | |
77 | BuildRequires: openssl-devel >= 0.9.7d | |
78 | BuildRequires: pam-devel | |
79 | BuildRequires: pcre-devel | |
80 | BuildRequires: perl-devel >= 1:5.6.0 | |
81 | %{?with_pgsql:BuildRequires: postgresql-devel} | |
82 | BuildRequires: readline-devel | |
83 | BuildRequires: rpm >= 4.4.9-56 | |
84 | BuildRequires: rpm-perlprov >= 4.1-13 | |
85 | BuildRequires: rpmbuild(macros) >= 1.268 | |
86 | %{?with_sqlite:BuildRequires: sqlite3-devel} | |
87 | %{?with_whoson:BuildRequires: whoson-devel} | |
88 | %if "%{pld_release}" != "ac" | |
89 | BuildRequires: xorg-lib-libX11-devel | |
90 | BuildRequires: xorg-lib-libXaw-devel | |
91 | %else | |
92 | BuildRequires: XFree86-devel | |
93 | %endif | |
94 | Requires(post): /bin/hostname | |
95 | Requires(post): fileutils | |
96 | Requires(post,preun): /sbin/chkconfig | |
97 | Requires(postun): /usr/sbin/groupdel | |
98 | Requires(postun): /usr/sbin/userdel | |
99 | Requires(pre): /bin/id | |
100 | Requires(pre): /usr/bin/getgid | |
101 | Requires(pre): /usr/sbin/groupadd | |
102 | Requires(pre): /usr/sbin/useradd | |
103 | Requires: findutils | |
104 | Requires: pam >= 0.79.0 | |
105 | Requires: rc-scripts | |
106 | Requires: which | |
107 | Provides: group(exim) | |
108 | Provides: smtpdaemon | |
109 | Provides: user(exim) | |
110 | Obsoletes: exipick | |
111 | Obsoletes: smtpdaemon | |
112 | Conflicts: logrotate < 3.8.3 | |
113 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
114 | ||
115 | %description | |
116 | Smail like Mail Transfer Agent with single configuration file. | |
117 | Features: flexible retry algorithms, header & envelope rewriting, | |
118 | multiple deliveries down single connection or multiple deliveries in | |
119 | parallel, regular expressions in configuration parameters, file | |
120 | lookups, supports sender and/or reciever verification, selective | |
121 | relaying, supports virtual domains, built-in mail filtering and can be | |
122 | configured to drop root privilleges when possible. | |
123 | ||
124 | %description -l pl.UTF-8 | |
125 | Agent transferu poczty (MTA) z pojedynczym plikiem konfiguracyjnym. | |
126 | Jego zalety: świetne algorytmy, możliwość przepisywania nagłówków & | |
127 | koperty, wielokrotne dostarczanie poczty podczas jednego połączenia | |
128 | lub równoległe dostarczanie poczty, wyrażenia regularne w parametrach | |
129 | konfiguracyjnych, weryfikacja nadawcy i/lub odbiorcy, selektywne | |
130 | relayowanie, wsparcie dla wirtualnych domen, wbudowany system filtrów, | |
131 | możliwość odrzucania praw roota kiedy jest to możliwe. | |
132 | ||
133 | %description -l pt_BR.UTF-8 | |
134 | O exim é um agente de transporte de correio eletrônico (MTA), | |
135 | desenvolvido na Universidade de Cambridge para uso em sistemas Unix | |
136 | conectados a Internet. Similar em estilo ao smail 3, suas facilidades | |
137 | são mais extensivas e em particular ele tem opções para verificação do | |
138 | remetente e destinatário, para recusar mensagens de máquinas, redes ou | |
139 | remetentes específicos. | |
140 | ||
141 | %package X11 | |
142 | Summary: X11 based Exim administration tool | |
143 | Summary(pl.UTF-8): Narzędzia administracyjne exima dla X11 | |
144 | Summary(pt_BR.UTF-8): Monitor X11 para o exim | |
145 | Group: X11/Applications | |
146 | ||
147 | %description X11 | |
148 | X11 based monitor & administration utility for the Exim Mail Transfer | |
149 | Agent. | |
150 | ||
151 | %description X11 -l pl.UTF-8 | |
152 | Bazujące na X11 narzędzia dla Exima - monitor i program | |
153 | administracyjny. | |
154 | ||
155 | %description X11 -l pt_BR.UTF-8 | |
156 | O monitor exim é um suplemento opcional ao pacote exim. Ele mostra | |
157 | informações sobre o processamento do exim em uma janela X11. O | |
158 | administrador pode executar uma série de ações de controle a partir | |
159 | desta interface. | |
160 | ||
161 | %package devel | |
162 | Summary: Header files for Exim | |
163 | Summary(pl.UTF-8): Pliki nagłówkowe dla Exima | |
164 | Group: Development/Libraries | |
165 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
166 | ||
167 | %description devel | |
168 | Header files for Exim. | |
169 | ||
170 | %description devel -l pl.UTF-8 | |
171 | Pliki nagłówkowe dla Exima. | |
172 | ||
173 | %global dynamic_type yes | |
174 | %{?with_dynamic:%global dynamic_type 2} | |
175 | ||
176 | %prep | |
177 | %setup -q -a1 -a7 | |
178 | %patch100 -p2 | |
179 | %patch0 -p1 | |
180 | %patch1 -p1 | |
181 | %patch2 -p1 | |
182 | %patch3 -p1 | |
183 | %patch4 -p1 | |
184 | %patch5 -p1 | |
185 | ||
186 | %patch8 -p1 | |
187 | ||
188 | install %{SOURCE4} exim4.conf | |
189 | install %{SOURCE14} doc/config.samples.tar.bz2 | |
190 | %patch20 -p1 | |
191 | install -d Local | |
192 | cat << 'EOF' >> Local/Makefile-Linux | |
193 | CC=%{__cc} | |
194 | CUSTOM_CFLAGS=%{rpmcppflags} %{rpmcflags} | |
195 | CFLAGS_DYNAMIC=-shared -rdynamic -fPIC %{rpmldflags} | |
196 | LOOKUP_CDB=yes | |
197 | XLFLAGS=-L%{_prefix}/X11R6/%{_lib} | |
198 | X11_LD_LIB=%{_prefix}/X11R6/%{_lib} | |
199 | %{?with_dynamic:LOOKUP_MODULE_DIR=%{_libdir}/%{name}/modules} | |
200 | EXPERIMENTAL_ARC=yes | |
201 | EXPERIMENTAL_DCC=yes | |
202 | EXPERIMENTAL_PRDR=yes | |
203 | EXPERIMENTAL_DSN_INFO=yes | |
204 | EXPERIMENTAL_QUEUEFILE=yes | |
205 | EXPERIMENTAL_QUEUE_RAMP=yes | |
206 | SUPPORT_DANE=yes | |
207 | SUPPORT_I18N=yes | |
208 | SUPPORT_I18N_2008=yes | |
209 | LDFLAGS+= -lidn -lidn2 | |
210 | SUPPORT_PROXY=yes | |
211 | %if %{with dmarc} | |
212 | SUPPORT_DMARC=yes | |
213 | LOOKUP_LIBS+=-lopendmarc | |
214 | %endif | |
215 | %if %{with spf} | |
216 | SUPPORT_SPF=yes | |
217 | LOOKUP_LIBS+=-lspf2 | |
218 | %endif | |
219 | %if %{with srs} | |
220 | EXPERIMENTAL_SRS=yes | |
221 | LOOKUP_LIBS+=-lsrs_alt | |
222 | %endif | |
223 | %if %{with hiredis} | |
224 | LOOKUP_REDIS=yes | |
225 | LOOKUP_LIBS+=-lhiredis | |
226 | %endif | |
227 | %if %{with mysql} | |
228 | LOOKUP_MYSQL=%{dynamic_type} | |
229 | # for dynamic | |
230 | LOOKUP_MYSQL_INCLUDE=-I%{_includedir}/mysql | |
231 | LOOKUP_MYSQL_LIBS=-lmysqlclient | |
232 | # for static | |
233 | LOOKUP_INCLUDE+=-I%{_includedir}/mysql | |
234 | LOOKUP_LIBS+=-lmysqlclient | |
235 | %endif | |
236 | %if %{with pgsql} | |
237 | LOOKUP_PGSQL=%{dynamic_type} | |
238 | # for dynamic | |
239 | LOOKUP_PGSQL_INCLUDE=-I%{_includedir}/pgsql | |
240 | LOOKUP_PGSQL_LIBS=-lpq | |
241 | # for static | |
242 | LOOKUP_INCLUDE+=-I%{_includedir}/pgsql | |
243 | LOOKUP_LIBS+=-lpq | |
244 | %endif | |
245 | %if %{with sqlite} | |
246 | LOOKUP_SQLITE=%{dynamic_type} | |
247 | # for dynamic | |
248 | LOOKUP_SQLITE_LIBS=-lsqlite3 | |
249 | # for static | |
250 | LOOKUP_LIBS+=-lsqlite3 | |
251 | %endif | |
252 | %if %{with whoson} | |
253 | LOOKUP_WHOSON=%{dynamic_type} | |
254 | # for dynamic | |
255 | LOOKUP_WHOSON_LIBS=-lwhoson | |
256 | # for static | |
257 | LOOKUP_LIBS+=-lwhoson | |
258 | %endif | |
259 | %if %{with sasl} | |
260 | AUTH_CYRUS_SASL=yes | |
261 | LOOKUP_LIBS+=-lsasl2 | |
262 | %endif | |
263 | %if %{with ldap} | |
264 | LOOKUP_LDAP=%{dynamic_type} | |
265 | LDAP_LIB_TYPE=OPENLDAP2 | |
266 | # for dynamic | |
267 | LOOKUP_LDAP_LIBS=-lldap -llber | |
268 | # for static | |
269 | LOOKUP_LIBS+=-lldap -llber | |
270 | %endif | |
271 | %if %{with lmdb} | |
272 | EXPERIMENTAL_LMDB=yes | |
273 | LOOKUP_LIBS+=-llmdb | |
274 | %endif | |
275 | DLOPEN_LOCAL_SCAN=yes | |
276 | EOF | |
277 | ||
278 | # have to be after Local/Makefile-Linux creation | |
279 | cp -f src/EDITME Local/Makefile | |
280 | cp -f exim_monitor/EDITME Local/eximon.conf | |
281 | ||
282 | %build | |
283 | %{__make} -e \ | |
284 | FULLECHO='' | |
285 | ||
286 | %install | |
287 | rm -rf $RPM_BUILD_ROOT | |
288 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/mail | |
289 | install -d $RPM_BUILD_ROOT/etc/{cron.daily,logrotate.d,rc.d/init.d,sysconfig,pam.d,security} | |
290 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir}/man8,/usr/lib} | |
291 | install -d $RPM_BUILD_ROOT%{_var}/{spool/exim/{db,input,msglog},log/{archive,}/exim,mail} | |
292 | install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}} | |
293 | install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/modules | |
294 | ||
295 | install build-Linux-*/exim{,_fixdb,_tidydb,_dbmbuild,on.bin,_dumpdb,_lock} \ | |
296 | build-Linux-*/exi{cyclog,next,what} %{SOURCE10} \ | |
297 | build-Linux-*/{exigrep,exiqgrep,exipick,eximstats,exiqsumm,convert4r4} \ | |
298 | util/unknownuser.sh \ | |
299 | $RPM_BUILD_ROOT%{_bindir} | |
300 | install build-Linux-*/eximon.bin $RPM_BUILD_ROOT%{_bindir} | |
301 | install build-Linux-*/eximon $RPM_BUILD_ROOT%{_bindir} | |
302 | %{?with_dynamic:install build-Linux-*/*/*.so $RPM_BUILD_ROOT%{_libdir}/%{name}/modules} | |
303 | ||
304 | install %{SOURCE5} . | |
305 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.daily | |
306 | install %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/%{name} | |
307 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} | |
308 | install %{SOURCE11} $RPM_BUILD_ROOT/etc/logrotate.d/%{name} | |
309 | install exim4.conf $RPM_BUILD_ROOT%{_sysconfdir}/mail/exim.conf | |
310 | install {doc,man}/*.8 $RPM_BUILD_ROOT%{_mandir}/man8 | |
311 | install %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/mail/aliases | |
312 | install %{SOURCE15} $RPM_BUILD_ROOT/etc/pam.d/smtp | |
313 | ||
314 | ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/sendmail | |
315 | ln -sf %{_bindir}/exim $RPM_BUILD_ROOT/usr/lib/sendmail | |
316 | ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/mailq | |
317 | ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/rsmtp | |
318 | ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/rmail | |
319 | ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/runq | |
320 | ||
321 | install %{SOURCE6} $RPM_BUILD_ROOT%{_desktopdir} | |
322 | install %{SOURCE16} $RPM_BUILD_ROOT%{_pixmapsdir} | |
323 | ||
324 | install -d $RPM_BUILD_ROOT%{_includedir}/%{name} | |
325 | install src/{local_scan,store,mytypes}.h $RPM_BUILD_ROOT%{_includedir}/%{name} | |
326 | install build-Linux-*/config.h $RPM_BUILD_ROOT%{_includedir}/%{name} | |
327 | ||
328 | touch $RPM_BUILD_ROOT%{_var}/log/exim/{main,reject,panic,process}.log | |
329 | ||
330 | touch $RPM_BUILD_ROOT/etc/security/blacklist.smtp | |
331 | ||
332 | %clean | |
333 | rm -rf $RPM_BUILD_ROOT | |
334 | ||
335 | %pre | |
336 | %groupadd -g 79 exim | |
337 | %useradd -u 79 -d /var/spool/exim -s /bin/false -c "Exim pseudo user" -g exim exim | |
338 | ||
339 | %post | |
340 | umask 022 | |
341 | /sbin/chkconfig --add %{name} | |
342 | %service %{name} restart "exim daemon" | |
343 | ||
344 | if [ ! -f /etc/mail/mailname ]; then | |
345 | rm -f /etc/mail/mailname && hostname -f > /etc/mail/mailname | |
346 | fi | |
347 | newaliases | |
348 | ||
349 | %preun | |
350 | if [ "$1" = "0" ]; then | |
351 | %service exim stop | |
352 | /sbin/chkconfig --del %{name} | |
353 | fi | |
354 | ||
355 | %postun | |
356 | if [ "$1" = "0" ]; then | |
357 | %userremove exim | |
358 | %groupremove exim | |
359 | fi | |
360 | ||
361 | %files | |
362 | %defattr(644,root,root,755) | |
363 | %doc README* NOTICE LICENCE analyse-log-errors doc/{ChangeLog,NewStuff,dbm.discuss.txt,filter.txt,spec.txt,Exim*.upgrade,OptionLists.txt,experimental-spec.txt} build-Linux-*/transport-filter.pl | |
364 | %doc exim-html-*/exim-html-*/doc/html | |
365 | %dir %{_sysconfdir}/mail | |
366 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/exim.conf | |
367 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/aliases | |
368 | %attr(754,root,root) /etc/cron.daily/exim.cron.db | |
369 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/exim | |
370 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/smtp | |
371 | %attr(754,root,root) /etc/rc.d/init.d/exim | |
372 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.smtp | |
373 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/exim | |
374 | %attr(4755,root,root) %{_bindir}/exim | |
375 | %attr(755,root,root) %{_bindir}/exim_* | |
376 | %attr(755,root,root) %{_bindir}/exinext | |
377 | %attr(755,root,root) %{_bindir}/exiwhat | |
378 | %attr(755,root,root) %{_bindir}/exicyclog | |
379 | %attr(755,root,root) %{_bindir}/exigrep | |
380 | %attr(755,root,root) %{_bindir}/exipick | |
381 | %attr(755,root,root) %{_bindir}/exiqgrep | |
382 | %attr(755,root,root) %{_bindir}/eximstats | |
383 | %attr(755,root,root) %{_bindir}/exiqsumm | |
384 | %attr(755,root,root) %{_bindir}/unknownuser.sh | |
385 | %attr(755,root,root) %{_bindir}/newaliases | |
386 | %attr(755,root,root) %{_bindir}/convert4r4 | |
387 | %attr(755,root,root) %{_sbindir}/mailq | |
388 | %attr(755,root,root) %{_sbindir}/rmail | |
389 | %attr(755,root,root) %{_sbindir}/rsmtp | |
390 | %attr(755,root,root) %{_sbindir}/runq | |
391 | %attr(755,root,root) %{_sbindir}/sendmail | |
392 | %attr(755,root,root) /usr/lib/sendmail | |
393 | %attr(750,exim,root) %dir %{_var}/log/exim | |
394 | %attr(750,exim,root) %dir %{_var}/log/archive/exim | |
395 | %attr(640,exim,root) %ghost %{_var}/log/exim/* | |
396 | %attr(770,root,exim) %dir %{_var}/spool/exim | |
397 | %attr(750,exim,exim) %dir %{_var}/spool/exim/db | |
398 | %attr(700,exim,root) %dir %{_var}/spool/exim/input | |
399 | %attr(750,exim,root) %dir %{_var}/spool/exim/msglog | |
400 | %if %{with dynamic} | |
401 | %dir %{_libdir}/%{name} | |
402 | %dir %{_libdir}/%{name}/modules | |
403 | %{?with_mysql:%attr(755,root,root) %{_libdir}/%{name}/modules/mysql.so} | |
404 | %{?with_pgsql:%attr(755,root,root) %{_libdir}/%{name}/modules/pgsql.so} | |
405 | %{?with_sqlite:%attr(755,root,root) %{_libdir}/%{name}/modules/sqlite.so} | |
406 | %{?with_whoson:%attr(755,root,root) %{_libdir}/%{name}/modules/whoson.so} | |
407 | %endif | |
408 | %{_mandir}/man8/exicyclog.8* | |
409 | %{_mandir}/man8/exigrep.8* | |
410 | %{_mandir}/man8/exim.8* | |
411 | %{_mandir}/man8/exim_*.8* | |
412 | %{_mandir}/man8/eximstats.8* | |
413 | %{_mandir}/man8/exinext.8* | |
414 | %{_mandir}/man8/exiqsumm.8* | |
415 | %{_mandir}/man8/exiwhat.8* | |
416 | ||
417 | %files X11 | |
418 | %defattr(644,root,root,755) | |
419 | %attr(755,root,root) %{_bindir}/eximon | |
420 | %attr(755,root,root) %{_bindir}/eximon.bin | |
421 | %{_desktopdir}/eximon.desktop | |
422 | %{_pixmapsdir}/eximon.png | |
423 | %{_mandir}/man8/eximon.8* | |
424 | ||
425 | %files devel | |
426 | %defattr(644,root,root,755) | |
427 | %{_includedir}/%{name} |