3 %bcond_without gssapi # without GSSAPI support
4 %bcond_without ldap # without LDAP auth
5 %bcond_without mysql # without MySQL auth
6 %bcond_without pgsql # without PostgreSQL auth
7 %bcond_without sqlite # without SQLite3 auth
8 %bcond_without sasl # without SASL auth
9 %bcond_without tests # tests
11 Summary: IMAP and POP3 server written with security primarily in mind
12 Summary(pl.UTF-8): Serwer IMAP i POP3 pisany głównie z myślą o bezpieczeństwie
17 License: MIT (libraries), LGPL v2.1 (the rest)
18 Group: Networking/Daemons
19 Source0: http://dovecot.org/releases/2.2/%{name}-%{version}.tar.gz
20 # Source0-md5: c6c176943bd832c780fbb5d2f8850952
23 Source3: %{name}.sysconfig
24 Source4: %{name}.tmpfiles
25 Patch0: %{name}-config.patch
26 Patch1: %{name}-rpath.patch
27 Patch2: %{name}-exttextcat.patch
28 URL: http://dovecot.org/
29 BuildRequires: autoconf
30 BuildRequires: automake
31 BuildRequires: bzip2-devel
32 BuildRequires: clucene-core-devel >= 2.3.3.4
33 BuildRequires: curl-devel
34 %{?with_sasl:BuildRequires: cyrus-sasl-devel >= 2.0}
35 BuildRequires: expat-devel
36 BuildRequires: gettext-devel
37 %{?with_gssapi:BuildRequires: heimdal-devel}
38 BuildRequires: libcap-devel
39 BuildRequires: libstemmer-devel
40 BuildRequires: libexttextcat-devel
41 BuildRequires: libtool
42 BuildRequires: lz4-devel
43 %{?with_mysql:BuildRequires: mysql-devel}
44 %{?with_ldap:BuildRequires: openldap-devel >= 2.3.3}
45 BuildRequires: openssl-devel >= 0.9.7d
46 BuildRequires: pam-devel
47 BuildRequires: pkgconfig
48 %{?with_pgsql:BuildRequires: postgresql-devel}
49 BuildRequires: rpmbuild(macros) >= 1.647
50 BuildRequires: sed >= 4.0
51 %{?with_sqlite:BuildRequires: sqlite3-devel}
52 BuildRequires: zlib-devel
53 Requires(post,preun): /sbin/chkconfig
54 Requires(postun): /usr/sbin/groupdel
55 Requires(postun): /usr/sbin/userdel
56 Requires(pre): /bin/id
57 Requires(pre): /usr/bin/getgid
58 Requires(pre): /usr/sbin/groupadd
59 Requires(pre): /usr/sbin/useradd
60 Requires: %{name}-libs = %{epoch}:%{version}-%{release}
61 Requires: pam >= 0.79.0
62 Provides: group(dovecot)
64 Provides: user(dovecot)
65 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67 %define no_install_post_check_so 1
70 Dovecot is an IMAP and POP3 server for Linux/UNIX-like systems,
71 written with security primarily in mind. Although it's written with C,
72 it uses several coding techniques to avoid most of the common
75 Dovecot can work with standard mbox and maildir formats and it's fully
76 compatible with UW-IMAP and Courier IMAP servers as well as mail
77 clients accessing the mailboxes directly. It's also planned to support
78 storing mails in SQL databases.
80 Dovecot is easy to set up and doesn't require special maintenance.
81 Only thing you need is to get the authentication working properly - if
82 your users are in /etc/passwd there's hardly anything you have to do.
84 Dovecot should be pretty fast, mostly because of index files that
85 Dovecot maintains; instead of having to scan through all the data in
86 mailbox, Dovecot can get most of the wanted information from index
90 - should be quite ready for use with normal IMAP clients
91 - complete IMAP4rev1 and POP3 support
92 - supports THREAD, SORT and IDLE extensions, required by many IMAP
94 - complete TLS/SSL support
96 - shared mailboxes aren't yet supported
97 - Maildir++ quota is supported, bad hard filesystem quota can be
100 %description -l pl.UTF-8
101 Dovecot to serwer IMAP i POP3 dla systemów linuksowych/uniksowych,
102 pisany głównie z myślą o bezpieczeństwie. Chociaż jest pisany w C,
103 używa kilku technik kodowania zapobiegających większości popularnych
106 Dovecot może działać ze standardowymi formatami mbox i maildir, jest
107 całkowicie kompatybilny z serwerami UW-IMAP i Courier IMAP, a także z
108 klientami pocztowymi bezpośrednio dostającymi się do skrzynek.
109 Planowana jest także obsługa przechowywania listów w bazach SQL.
111 Dovecot jest łatwy do skonfigurowania i nie wymaga specjalnego
112 nadzoru. Wystarczy tylko doprowadzić do działania uwierzytelnianie -
113 jeśli użytkownicy są w /etc/passwd, to właściwie nie trzeba nic
116 Dovecot powinien być w miarę szybki, głównie z powodu plików
117 indeksowych utrzymywanych przez serwer; zamiast potrzeby skanowania
118 wszystkich danych w skrzynce, Dovecot może małym kosztem uzyskać
119 większość potrzebnych informacji z indeksu.
122 - powinien być gotowy do użycia ze zwykłymi klientami IMAP
123 - pełna obsługa IMAP4rev1 i POP3
124 - obsługa rozszerzeń THREAD, SORT i IDLE, wymaganych przez wiele
127 - pełna obsługa TLS/SSL
128 - quota Maildir++ jest obsługiwana, ale twarda quota na systemach
129 plików może być problematyczna
132 Summary: Development package for Dovecot plugins
133 Summary(pl.UTF-8): Pakiet programistyczny do tworzenia wtyczek dla Dovecota
134 Group: Development/Libraries
135 Requires: %{name}-libs = %{epoch}:%{version}-%{release}
138 Development package for Dovecot plugins.
140 %description devel -l pl.UTF-8
141 Pakiet programistyczny do tworzenia wtyczek dla Dovecota.
144 Summary: Dovecot shared libraries
145 Summary(pl.UTF-8): Współdzielone biblioteki Dovecota
146 Group: Development/Libraries
149 Dovecot shared libraries.
151 %description libs -l pl.UTF-8
152 Współdzielone biblioteki Dovecota.
160 %{__sed} -i 's,/usr/lib/dovecot,%{_libdir}/dovecot,g' doc/example-config/*.conf doc/example-config/conf.d/*.conf
170 ac_cv_prog_VALGRIND=no \
171 CPPFLAGS="%{rpmcppflags} -I/usr/include/libstemmer" \
173 %{?debug:--enable-debug} \
174 %{?with_ldap:--with-ldap=yes} \
175 %{?with_mysql:--with-mysql} \
176 %{?with_pgsql:--with-pgsql} \
177 %{?with_sqlite:--with-sqlite} \
178 %{?with_gssapi:--with-gssapi=plugin} \
188 --with-moduledir=%{_libdir}/%{name}/plugins \
189 --with-ssldir=/var/lib/openssl \
190 --sysconfdir=%{_sysconfdir} \
191 --with-systemdsystemunitdir=%{systemdunitdir}
195 %{?with_tests:%{__make} check}
198 rm -rf $RPM_BUILD_ROOT
199 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,sysconfig,security} \
200 $RPM_BUILD_ROOT{/var/lib/dovecot,/var/run/dovecot/login} \
201 $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
204 DESTDIR=$RPM_BUILD_ROOT
206 mv -f $RPM_BUILD_ROOT%{_datadir}/doc/%{name}/example-config/* $RPM_BUILD_ROOT%{_sysconfdir}/dovecot
208 cp -a %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name}
209 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
210 cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
211 install %{SOURCE4} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
213 touch $RPM_BUILD_ROOT/etc/security/blacklist.imap
215 find $RPM_BUILD_ROOT%{_libdir}/%{name} -name '*.la' | xargs rm
217 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
218 %{__rm} -r $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/README
221 rm -rf $RPM_BUILD_ROOT
224 %groupadd -g 172 dovecot
225 %useradd -u 172 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovecot dovecot
226 %groupadd -g 254 dovenull
227 %useradd -u 254 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovenull dovenull
230 /sbin/chkconfig --add dovecot
231 %service dovecot restart
232 %systemd_post dovecot.socket dovecot.service
235 if [ "$1" = "0" ]; then
236 %service dovecot stop
237 /sbin/chkconfig --del dovecot
239 %systemd_preun dovecot.service dovecot.socket
242 if [ "$1" = "0" ]; then
246 %groupremove dovenull
250 %post libs -p /sbin/ldconfig
251 %postun libs -p /sbin/ldconfig
254 # restart devocot if pam is upgraded
255 # (dovecot is linked with old libpam but tries to open modules linked with new libpam)
256 if [ "$2" != 1 ]; then
257 %service -q dovecot restart
260 %triggerpostun -- dovecot < 1:2.0.0
261 # upgrading dovecot < 1.1
262 echo "Configuration change default_mail_env -> mail_location"
263 %{__sed} -i -e "s/^default_mail_env/mail_location/" /etc/dovecot/dovecot.conf
264 # upgrading dovecot < 2.0
266 for a in /etc/dovecot/dovecot-db-example.conf \
267 /etc/dovecot/dovecot-dict-sql-example.conf \
268 /etc/dovecot/dovecot-ldap-example.conf \
269 /etc/dovecot/dovecot-sql-example.conf \
270 /etc/dovecot/dovecot.conf; do
272 [ "$i" -eq 0 ] && echo "Read http://wiki2.dovecot.org/Upgrading/2.0"
274 echo "Trying to migrate $a config file to dovecot 2."
275 cp -a "$a" "$a-1.2.org"
278 # convert config and prefix stderr lines with #
279 %{_bindir}/doveconf -n -c "$a-1.2.org" > "$a" 2> "$a.log" || :
282 if [ "$i" -eq 1 ]; then
283 echo "Please verify contents of %{_sysconfdir}/%{name}/* files."
286 %triggerpostun -- %{name} < 1:2.2.4-2
287 %systemd_trigger dovecot.service dovecot.socket
290 %defattr(644,root,root,755)
291 # COPYING contains some notes, not actual LGPL text
292 %doc AUTHORS COPYING ChangeLog NEWS README TODO doc/*.txt doc/*.c*f doc/wiki/*.txt
293 %attr(755,root,root) %{_bindir}/doveadm
294 %attr(755,root,root) %{_bindir}/doveconf
295 %attr(755,root,root) %{_bindir}/dsync
296 %attr(755,root,root) %{_sbindir}/%{name}
297 %attr(751,root,root) %dir %{_sysconfdir}/%{name}
298 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
299 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.ext
300 %attr(751,root,root) %dir %{_sysconfdir}/%{name}/conf.d
301 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/conf.d/*.conf
302 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/conf.d/*.ext
303 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/%{name}
304 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.imap
305 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
306 %attr(754,root,root) /etc/rc.d/init.d/%{name}
307 %attr(755,root,root) %{_libdir}/%{name}/aggregator
308 %attr(755,root,root) %{_libdir}/%{name}/anvil
309 %attr(755,root,root) %{_libdir}/%{name}/auth
310 %attr(755,root,root) %{_libdir}/%{name}/checkpassword-reply
311 %attr(755,root,root) %{_libdir}/%{name}/config
312 %attr(755,root,root) %{_libdir}/%{name}/decode2text.sh
313 %attr(755,root,root) %{_libdir}/%{name}/deliver
314 %attr(755,root,root) %{_libdir}/%{name}/dict
315 %attr(755,root,root) %{_libdir}/%{name}/director
316 %attr(755,root,root) %{_libdir}/%{name}/dns-client
317 %attr(755,root,root) %{_libdir}/%{name}/doveadm-server
318 %attr(755,root,root) %{_libdir}/%{name}/dovecot-lda
319 %attr(755,root,root) %{_libdir}/%{name}/gdbhelper
320 %attr(755,root,root) %{_libdir}/%{name}/imap
321 %attr(755,root,root) %{_libdir}/%{name}/imap-login
322 %attr(755,root,root) %{_libdir}/%{name}/imap-urlauth
323 %attr(755,root,root) %{_libdir}/%{name}/imap-urlauth-login
324 %attr(755,root,root) %{_libdir}/%{name}/imap-urlauth-worker
325 %attr(755,root,root) %{_libdir}/%{name}/indexer
326 %attr(755,root,root) %{_libdir}/%{name}/indexer-worker
327 %attr(755,root,root) %{_libdir}/%{name}/ipc
328 %attr(755,root,root) %{_libdir}/%{name}/lmtp
329 %attr(755,root,root) %{_libdir}/%{name}/log
330 %attr(755,root,root) %{_libdir}/%{name}/maildirlock
331 %attr(755,root,root) %{_libdir}/%{name}/pop3
332 %attr(755,root,root) %{_libdir}/%{name}/pop3-login
333 %attr(755,root,root) %{_libdir}/%{name}/quota-status
334 %attr(755,root,root) %{_libdir}/%{name}/rawlog
335 %attr(755,root,root) %{_libdir}/%{name}/replicator
336 %attr(755,root,root) %{_libdir}/%{name}/script
337 %attr(755,root,root) %{_libdir}/%{name}/script-login
338 %attr(755,root,root) %{_libdir}/%{name}/ssl-params
339 %attr(755,root,root) %{_libdir}/%{name}/stats
340 %attr(755,root,root) %{_libdir}/%{name}/xml2text
341 %dir %{_libdir}/%{name}/plugins
342 %attr(755,root,root) %{_libdir}/%{name}/plugins/*.so
343 %dir %{_libdir}/%{name}/plugins/auth
344 %attr(755,root,root) %{_libdir}/%{name}/plugins/auth/*.so
345 %dir %{_libdir}/%{name}/plugins/dict
346 %attr(755,root,root) %{_libdir}/%{name}/plugins/dict/*.so
347 %dir %{_libdir}/%{name}/plugins/doveadm
348 %attr(755,root,root) %{_libdir}/%{name}/plugins/doveadm/*.so
349 %{systemdunitdir}/dovecot.service
350 %{systemdunitdir}/dovecot.socket
351 /usr/lib/tmpfiles.d/%{name}.conf
352 %dir /var/lib/dovecot
353 %dir /var/run/dovecot
354 %attr(750,root,dovenull) %dir /var/run/dovecot/login
356 %{_mandir}/man1/deliver.1*
357 %{_mandir}/man1/dove*.1*
358 %{_mandir}/man1/dsync.1*
359 %{_mandir}/man7/doveadm-search-query.7*
362 %defattr(644,root,root,755)
363 %attr(755,root,root) %{_libdir}/%{name}/libdovecot.so
364 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-compression.so
365 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-dsync.so
366 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so
367 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so
368 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-sql.so
369 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so
370 %{_libdir}/%{name}/%{name}-config
371 %{_includedir}/%{name}
372 %{_aclocaldir}/dovecot.m4
375 %defattr(644,root,root,755)
376 %dir %{_libdir}/%{name}
378 %attr(755,root,root) %{_libdir}/%{name}/libdovecot.so.0.0.0
379 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-compression.so.0.0.0
380 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-dsync.so.0.0.0
381 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so.0.0.0
382 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so.0.0.0
383 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-sql.so.0.0.0
384 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so.0.0.0
385 # Note: we are in %{_libdir}/dovecot, ldconfig does not look into this
386 # directory. This is why the following files are not %ghost
387 %attr(755,root,root) %{_libdir}/%{name}/libdovecot.so.0
388 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-compression.so.0
389 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-dsync.so.0
390 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so.0
391 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so.0
392 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-sql.so.0
393 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so.0