]> git.pld-linux.org Git - packages/exim.git/blob - exim.spec
- added patch resolving CVE-2011-1764 (remote vulnerability in DKIM)
[packages/exim.git] / exim.spec
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 #
12 Summary:        University of Cambridge Mail Transfer Agent
13 Summary(pl.UTF-8):      Agent Transferu Poczty Uniwersytetu w Cambridge
14 Summary(pt_BR.UTF-8):   Servidor de correio eletrônico exim
15 Name:           exim
16 Version:        4.75
17 Release:        2
18 Epoch:          2
19 License:        GPL
20 Group:          Networking/Daemons/SMTP
21 Source0:        ftp://ftp.exim.org/pub/exim/exim4/%{name}-%{version}.tar.bz2
22 # Source0-md5:  427fb74bbd2afbea759e6da38f25af17
23 Source1:        ftp://ftp.exim.org/pub/exim/exim4/%{name}-html-%{version}.tar.bz2
24 # Source1-md5:  51744a0fc94ef403cb049dfc9f059ada
25 Source2:        %{name}.init
26 Source3:        %{name}.cron.db
27 Source4:        %{name}4.conf
28 Source5:        analyse-log-errors
29 Source6:        %{name}on.desktop
30 # 20021016: http://www.logic.univie.ac.at/~ametzler/debian/exim4manpages/
31 Source7:        %{name}4-man-021016.tar.bz2
32 # Source7-md5:  b552704ebf853a401946038a2b7e8e98
33 Source9:        %{name}.aliases
34 Source10:       newaliases
35 Source11:       %{name}.logrotate
36 Source12:       %{name}.sysconfig
37 Source13:       ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/FAQ.txt.bz2
38 # Source13-md5: ff781bd31fb1d574c8b9d33f4bfd34a7
39 Source14:       ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/config.samples.tar.bz2
40 # Source14-md5: 4b93321938a800caa6127c48ad60a42b
41 Source15:       %{name}4-smtp.pamd
42 Source16:       %{name}on.png
43 Patch0:         %{name}4-EDITME.patch
44 Patch1:         %{name}4-monitor-EDITME.patch
45 Patch2:         %{name}4-cflags.patch
46 Patch4:         %{name}4-Makefile-Default.patch
47 # http://marc.merlins.org/linux/exim/files/sa-exim-cvs/localscan_dlopen_exim_4.20_or_better.patch
48 Patch5:         localscan_dlopen_%{name}_4.20_or_better.patch
49 #Patch6:                %{name}-bug-1056.patch
50 # http://sourceforge.net/projects/eximdsn/
51 Patch7:         %{name}_463_dsn_1_3.patch
52 Patch8:         %{name}-spam-timeout.patch
53 Patch9:         %{name}-dkim.patch
54 Patch10:        %{name}-force-sigalrm.patch
55 Patch11:        %{name}-CVE-2011-1764.patch
56 URL:            http://www.exim.org/
57 %{?with_sasl:BuildRequires:     cyrus-sasl-devel >= 2.1.0}
58 BuildRequires:  db-devel
59 %{?with_spf:BuildRequires:      libspf2-devel >= 1.2.5-2}
60 %{?with_srs:BuildRequires:      libsrs_alt-devel >= 1.0}
61 %{?with_mysql:BuildRequires:    mysql-devel}
62 %{?with_ldap:BuildRequires:     openldap-devel >= 2.3.0}
63 BuildRequires:  openssl-devel >= 0.9.7d
64 BuildRequires:  pam-devel
65 BuildRequires:  pcre-devel
66 BuildRequires:  perl-devel >= 1:5.6.0
67 %{?with_pgsql:BuildRequires:    postgresql-devel}
68 BuildRequires:  readline-devel
69 BuildRequires:  rpm >= 4.4.9-56
70 BuildRequires:  rpmbuild(macros) >= 1.268
71 %{?with_sqlite:BuildRequires:   sqlite3-devel}
72 %{?with_whoson:BuildRequires:   whoson-devel}
73 %if "%{pld_release}" != "ac"
74 BuildRequires:  xorg-lib-libX11-devel
75 BuildRequires:  xorg-lib-libXaw-devel
76 %else
77 BuildRequires:  XFree86-devel
78 %endif
79 Requires(post): /bin/hostname
80 Requires(post): fileutils
81 Requires(post,preun):   /sbin/chkconfig
82 Requires(postun):       /usr/sbin/groupdel
83 Requires(postun):       /usr/sbin/userdel
84 Requires(pre):  /bin/id
85 Requires(pre):  /usr/bin/getgid
86 Requires(pre):  /usr/sbin/groupadd
87 Requires(pre):  /usr/sbin/useradd
88 Requires:       findutils
89 Requires:       pam >= 0.79.0
90 Requires:       rc-scripts
91 Provides:       group(exim)
92 Provides:       smtpdaemon
93 Provides:       user(exim)
94 Obsoletes:      smtpdaemon
95 Conflicts:      logrotate < 3.7-4
96 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
97
98 %description
99 Smail like Mail Transfer Agent with single configuration file.
100 Features: flexible retry algorithms, header & envelope rewriting,
101 multiple deliveries down single connection or multiple deliveries in
102 parallel, regular expressions in configuration parameters, file
103 lookups, supports sender and/or reciever verification, selective
104 relaying, supports virtual domains, built-in mail filtering and can be
105 configured to drop root privilleges when possible.
106
107 %description -l pl.UTF-8
108 Agent transferu poczty (MTA) z pojedynczym plikiem konfiguracyjnym.
109 Jego zalety: świetne algorytmy, możliwość przepisywania nagłówków &
110 koperty, wielokrotne dostarczanie poczty podczas jednego połączenia
111 lub równoległe dostarczanie poczty, wyrażenia regularne w parametrach
112 konfiguracyjnych, weryfikacja nadawcy i/lub odbiorcy, selektywne
113 relayowanie, wsparcie dla wirtualnych domen, wbudowany system filtrów,
114 możliwość odrzucania praw roota kiedy jest to możliwe.
115
116 %description -l pt_BR.UTF-8
117 O exim é um agente de transporte de correio eletrônico (MTA),
118 desenvolvido na Universidade de Cambridge para uso em sistemas Unix
119 conectados a Internet. Similar em estilo ao smail 3, suas facilidades
120 são mais extensivas e em particular ele tem opções para verificação do
121 remetente e destinatário, para recusar mensagens de máquinas, redes ou
122 remetentes específicos.
123
124 %package X11
125 Summary:        X11 based Exim administration tool
126 Summary(pl.UTF-8):      Narzędzia administracyjne exima dla X11
127 Summary(pt_BR.UTF-8):   Monitor X11 para o exim
128 Group:          X11/Applications
129
130 %description X11
131 X11 based monitor & administration utility for the Exim Mail Transfer
132 Agent.
133
134 %description X11 -l pl.UTF-8
135 Bazujące na X11 narzędzia dla Exima - monitor i program
136 administracyjny.
137
138 %description X11 -l pt_BR.UTF-8
139 O monitor exim é um suplemento opcional ao pacote exim. Ele mostra
140 informações sobre o processamento do exim em uma janela X11. O
141 administrador pode executar uma série de ações de controle a partir
142 desta interface.
143
144 %package devel
145 Summary:        Header files for Exim
146 Summary(pl.UTF-8):      Pliki nagłówkowe dla Exima
147 Group:          Development/Libraries
148 Requires:       %{name} = %{epoch}:%{version}-%{release}
149
150 %description devel
151 Header files for Exim.
152
153 %description devel -l pl.UTF-8
154 Pliki nagłówkowe dla Exima.
155
156 %prep
157 %setup -q -a1 -a7
158 %patch0 -p1
159 %patch1 -p1
160 %patch2 -p1
161 %patch4 -p1
162 %patch5 -p1
163 #%patch6 -p1
164 %patch7 -p1
165 %patch8 -p1
166 #%patch9 -p0
167 %patch10 -p1
168 %patch11 -p1
169
170 install %{SOURCE13} doc/FAQ.txt.bz2
171 install %{SOURCE14} doc/config.samples.tar.bz2
172
173 install -d Local
174 cat << 'EOF' >> Local/Makefile-Linux
175 CC=%{__cc}
176 CUSTOM_CFLAGS=%{rpmcppflags} %{rpmcflags}
177 CFLAGS_DYNAMIC=-shared -rdynamic -fPIC %{rpmldflags}
178 LOOKUP_CDB=yes
179 XLFLAGS=-L%{_prefix}/X11R6/%{_lib}
180 X11_LD_LIB=%{_prefix}/X11R6/%{_lib}
181 LOOKUP_MODULE_DIR=%{_libdir}/%{name}/modules
182 SUPPORT_DSN=yes
183 %{?with_spf:EXPERIMENTAL_SPF=yes}
184 %{?with_srs:EXPERIMENTAL_SRS=yes}
185 %if %{with mysql}
186 LOOKUP_MYSQL=2
187 LOOKUP_MYSQL_INCLUDE=-I%{_includedir}/mysql
188 LOOKUP_MYSQL_LIBS=-lmysqlclient
189 %endif
190 %if %{with pgsql}
191 LOOKUP_PGSQL=2
192 LOOKUP_PGSQL_INCLUDE=-I%{_includedir}/pgsql
193 LOOKUP_PGSQL_LIBS=-lpq
194 %endif
195 %if %{with sqlite}
196 LOOKUP_SQLITE=2
197 LOOKUP_SQLITE_LIBS=-lsqlite3
198 %endif
199 %if %{with whoson}
200 LOOKUP_WHOSON=2
201 LOOKUP_WHOSON_LIBS=-lwhoson
202 %endif
203 %{?with_sasl:AUTH_CYRUS_SASL=yes}
204 %if %{with ldap}
205 LOOKUP_LDAP=yes
206 LDAP_LIB_TYPE=OPENLDAP2
207 # currently dynamic ldap lookup not supported
208 # LOOKUP_LDAP_LIBS=-lldap -llber
209 %endif
210 LOOKUP_LIBS=%{?with_spf:-lspf2} %{?with_srs:-lsrs_alt} %{?with_sasl:-lsasl2} %{?with_ldap:-lldap -llber}
211 EOF
212
213 # have to be after Local/Makefile-Linux creation
214 cp -f src/EDITME Local/Makefile
215 cp -f exim_monitor/EDITME Local/eximon.conf
216
217 %build
218 %{__make} -e -j1 \
219         FULLECHO=''
220
221 %install
222 rm -rf $RPM_BUILD_ROOT
223 install -d $RPM_BUILD_ROOT%{_sysconfdir}/mail
224 install -d $RPM_BUILD_ROOT/etc/{cron.{daily,weekly},logrotate.d,rc.d/init.d,sysconfig,pam.d,security}
225 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir}/man8,%{_prefix}/lib}
226 install -d $RPM_BUILD_ROOT%{_var}/{spool/exim/{db,input,msglog},log/{archive,}/exim,mail}
227 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
228 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/modules
229
230 install build-Linux-*/exim{,_fixdb,_tidydb,_dbmbuild,on.bin,_dumpdb,_lock} \
231         build-Linux-*/exi{cyclog,next,what} %{SOURCE10} \
232         build-Linux-*/{exigrep,eximstats,exiqsumm,convert4r4} \
233         util/unknownuser.sh \
234         $RPM_BUILD_ROOT%{_bindir}
235 install build-Linux-*/eximon.bin $RPM_BUILD_ROOT%{_bindir}
236 install build-Linux-*/eximon $RPM_BUILD_ROOT%{_bindir}
237 install build-Linux-*/*/*.so $RPM_BUILD_ROOT%{_libdir}/%{name}/modules
238
239 install %{SOURCE5} .
240 install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.weekly
241 install %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
242 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
243 install %{SOURCE11} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
244 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/mail/exim.conf
245 install {doc,man}/*.8 $RPM_BUILD_ROOT%{_mandir}/man8
246 install %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/mail/aliases
247 install %{SOURCE15} $RPM_BUILD_ROOT/etc/pam.d/smtp
248
249 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/sendmail
250 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_prefix}/lib/sendmail
251 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/mailq
252 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/rsmtp
253 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/rmail
254 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/runq
255
256 install %{SOURCE6} $RPM_BUILD_ROOT%{_desktopdir}
257 install %{SOURCE16} $RPM_BUILD_ROOT%{_pixmapsdir}
258
259 install -d $RPM_BUILD_ROOT%{_includedir}/%{name}
260 install src/{local_scan,store,mytypes}.h $RPM_BUILD_ROOT%{_includedir}/%{name}
261 install build-Linux-*/config.h $RPM_BUILD_ROOT%{_includedir}/%{name}
262
263 touch $RPM_BUILD_ROOT%{_var}/log/exim/{main,reject,panic,process}.log
264
265 touch $RPM_BUILD_ROOT/etc/security/blacklist.smtp
266
267 %clean
268 rm -rf $RPM_BUILD_ROOT
269
270 %pre
271 %groupadd -g 79 exim
272 %useradd -u 79 -d /var/spool/exim -s /bin/false -c "Exim pseudo user" -g exim exim
273
274 %post
275 umask 022
276 /sbin/chkconfig --add %{name}
277 %service %{name} restart "exim daemon"
278
279 if [ ! -f /etc/mail/mailname ]; then
280         rm -f /etc/mail/mailname && hostname -f > /etc/mail/mailname
281 fi
282 newaliases
283
284 %preun
285 if [ "$1" = "0" ]; then
286         %service exim stop
287         /sbin/chkconfig --del %{name}
288 fi
289
290 %postun
291 if [ "$1" = "0" ]; then
292         %userremove exim
293         %groupremove exim
294 fi
295
296 %files
297 %defattr(644,root,root,755)
298 %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
299 %doc exim-html-*/doc/html
300 %dir %{_sysconfdir}/mail
301 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/exim.conf
302 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/aliases
303 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/exim
304 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/exim
305 %attr(754,root,root) /etc/rc.d/init.d/exim
306 %attr(4755,root,root) %{_bindir}/exim
307 %attr(770,root,exim) %dir %{_var}/spool/exim
308 %attr(750,exim,exim) %dir %{_var}/spool/exim/db
309 %attr(700,exim,root) %dir %{_var}/spool/exim/input
310 %attr(750,exim,root) %dir %{_var}/spool/exim/msglog
311 %attr(755,root,root) %{_bindir}/exim_*
312 %attr(755,root,root) %{_bindir}/exinext
313 %attr(755,root,root) %{_bindir}/exiwhat
314 %attr(755,root,root) %{_bindir}/exicyclog
315 %attr(755,root,root) %{_bindir}/exigrep
316 %attr(755,root,root) %{_bindir}/eximstats
317 %attr(755,root,root) %{_bindir}/exiqsumm
318 %attr(755,root,root) %{_bindir}/unknownuser.sh
319 %attr(755,root,root) %{_bindir}/newaliases
320 %attr(755,root,root) %{_bindir}/convert4r4
321 %attr(755,root,root) %{_sbindir}/mailq
322 %attr(755,root,root) %{_sbindir}/rmail
323 %attr(755,root,root) %{_sbindir}/rsmtp
324 %attr(755,root,root) %{_sbindir}/runq
325 %attr(755,root,root) %{_sbindir}/sendmail
326 %attr(755,root,root) %{_prefix}/lib/sendmail
327 %attr(754,root,root) /etc/cron.weekly/exim.cron.db
328 %attr(750,exim,root) %dir %{_var}/log/exim
329 %attr(750,exim,root) %dir %{_var}/log/archive/exim
330 %attr(640,exim,root) %ghost %{_var}/log/exim/*
331 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/smtp
332 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.smtp
333 %dir %{_libdir}/%{name}
334 %dir %{_libdir}/%{name}/modules
335 %{?with_mysql:%attr(755,root,root) %{_libdir}/%{name}/modules/mysql.so}
336 %{?with_pgsql:%attr(755,root,root) %{_libdir}/%{name}/modules/pgsql.so}
337 %{?with_sqlite:%attr(755,root,root) %{_libdir}/%{name}/modules/sqlite.so}
338 %{?with_whoson:%attr(755,root,root) %{_libdir}/%{name}/modules/whoson.so}
339 %{_mandir}/man8/*
340
341 %files X11
342 %defattr(644,root,root,755)
343 %attr(755,root,root) %{_bindir}/eximon
344 %attr(755,root,root) %{_bindir}/eximon.bin
345 %{_desktopdir}/eximon.desktop
346 %{_pixmapsdir}/eximon.png
347
348 %files devel
349 %defattr(644,root,root,755)
350 %{_includedir}/%{name}
This page took 0.065847 seconds and 4 git commands to generate.