2 %bcond_without gssapi # without GSSAPI support
3 %bcond_without ldap # without LDAP auth
4 %bcond_without mysql # without MySQL auth
5 %bcond_without pgsql # without PostgreSQL auth
6 %bcond_without sqlite # without SQLite3 auth
7 %bcond_without sasl # without SASL auth
8 %bcond_without tests # tests
10 Summary: IMAP and POP3 server written with security primarily in mind
11 Summary(pl.UTF-8): Serwer IMAP i POP3 pisany głównie z myślą o bezpieczeństwie
16 License: MIT (libraries), LGPL v2.1 (the rest)
17 Group: Networking/Daemons
18 Source0: http://dovecot.org/releases/2.2/%{name}-%{version}.tar.gz
19 # Source0-md5: 8f62ea76489c47c369cbbe0b19818448
22 Source3: %{name}.sysconfig
23 Patch0: %{name}-config.patch
24 Patch1: %{name}-rpath.patch
25 Patch2: %{name}-disableSSLv3.patch
26 URL: http://dovecot.org/
27 BuildRequires: autoconf
28 BuildRequires: automake
29 BuildRequires: bzip2-devel
30 BuildRequires: clucene-core-devel >= 2.3.3.4
31 BuildRequires: curl-devel
32 %{?with_sasl:BuildRequires: cyrus-sasl-devel >= 2.0}
33 BuildRequires: expat-devel
34 BuildRequires: gettext-tools
35 %{?with_gssapi:BuildRequires: heimdal-devel}
36 BuildRequires: libcap-devel
37 BuildRequires: libicu-devel
38 BuildRequires: libstemmer-devel
39 BuildRequires: libexttextcat-devel
40 BuildRequires: libtool
41 BuildRequires: lz4-devel
42 %{?with_mysql:BuildRequires: mysql-devel}
43 %{?with_ldap:BuildRequires: openldap-devel >= 2.3.3}
44 BuildRequires: openssl-devel >= 0.9.7d
45 BuildRequires: pam-devel
46 BuildRequires: pkgconfig
47 %{?with_pgsql:BuildRequires: postgresql-devel}
48 BuildRequires: rpmbuild(macros) >= 1.647
49 BuildRequires: sed >= 4.0
50 %{?with_sqlite:BuildRequires: sqlite3-devel}
51 BuildRequires: xz-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}
194 %{?with_tests:%{__make} check}
197 rm -rf $RPM_BUILD_ROOT
198 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,sysconfig,security} \
199 $RPM_BUILD_ROOT{/var/lib/dovecot,/var/run/dovecot/login}
202 DESTDIR=$RPM_BUILD_ROOT
204 mv -f $RPM_BUILD_ROOT%{_datadir}/doc/%{name}/example-config/* $RPM_BUILD_ROOT%{_sysconfdir}/dovecot
206 cp -a %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name}
207 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
208 cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
210 touch $RPM_BUILD_ROOT/etc/security/blacklist.imap
212 find $RPM_BUILD_ROOT%{_libdir}/%{name} -name '*.la' | xargs rm
214 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
215 %{__rm} -r $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/README
218 rm -rf $RPM_BUILD_ROOT
221 %groupadd -g 172 dovecot
222 %useradd -u 172 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovecot dovecot
223 %groupadd -g 254 dovenull
224 %useradd -u 254 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovenull dovenull
227 /sbin/chkconfig --add dovecot
228 %service dovecot restart
231 if [ "$1" = "0" ]; then
232 %service dovecot stop
233 /sbin/chkconfig --del dovecot
237 if [ "$1" = "0" ]; then
241 %groupremove dovenull
244 %post libs -p /sbin/ldconfig
245 %postun libs -p /sbin/ldconfig
248 # restart devocot if pam is upgraded
249 # (dovecot is linked with old libpam but tries to open modules linked with new libpam)
250 if [ "$2" != 1 ]; then
251 %service -q dovecot restart
254 %triggerpostun -- dovecot < 1:2.0.0
255 # upgrading dovecot < 1.1
256 echo "Configuration change default_mail_env -> mail_location"
257 %{__sed} -i -e "s/^default_mail_env/mail_location/" /etc/dovecot/dovecot.conf
258 # upgrading dovecot < 2.0
260 for a in /etc/dovecot/dovecot-db-example.conf \
261 /etc/dovecot/dovecot-dict-sql-example.conf \
262 /etc/dovecot/dovecot-ldap-example.conf \
263 /etc/dovecot/dovecot-sql-example.conf \
264 /etc/dovecot/dovecot.conf; do
266 [ "$i" -eq 0 ] && echo "Read http://wiki2.dovecot.org/Upgrading/2.0"
268 echo "Trying to migrate $a config file to dovecot 2."
269 cp -a "$a" "$a-1.2.org"
272 # convert config and prefix stderr lines with #
273 %{_bindir}/doveconf -n -c "$a-1.2.org" > "$a" 2> "$a.log" || :
276 if [ "$i" -eq 1 ]; then
277 echo "Please verify contents of %{_sysconfdir}/%{name}/* files."
281 %defattr(644,root,root,755)
282 # COPYING contains some notes, not actual LGPL text
283 %doc AUTHORS COPYING ChangeLog NEWS README TODO doc/*.txt doc/*.c*f doc/wiki/*.txt
284 %attr(755,root,root) %{_bindir}/doveadm
285 %attr(755,root,root) %{_bindir}/doveconf
286 %attr(755,root,root) %{_bindir}/dsync
287 %attr(755,root,root) %{_sbindir}/%{name}
288 %attr(751,root,root) %dir %{_sysconfdir}/%{name}
289 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
290 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.ext
291 %attr(751,root,root) %dir %{_sysconfdir}/%{name}/conf.d
292 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/conf.d/*.conf
293 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/conf.d/*.ext
294 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/%{name}
295 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.imap
296 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
297 %attr(754,root,root) /etc/rc.d/init.d/%{name}
298 %attr(755,root,root) %{_libdir}/%{name}/aggregator
299 %attr(755,root,root) %{_libdir}/%{name}/anvil
300 %attr(755,root,root) %{_libdir}/%{name}/auth
301 %attr(755,root,root) %{_libdir}/%{name}/checkpassword-reply
302 %attr(755,root,root) %{_libdir}/%{name}/config
303 %attr(755,root,root) %{_libdir}/%{name}/decode2text.sh
304 %attr(755,root,root) %{_libdir}/%{name}/deliver
305 %attr(755,root,root) %{_libdir}/%{name}/dict
306 %attr(755,root,root) %{_libdir}/%{name}/director
307 %attr(755,root,root) %{_libdir}/%{name}/dns-client
308 %attr(755,root,root) %{_libdir}/%{name}/doveadm-server
309 %attr(755,root,root) %{_libdir}/%{name}/dovecot-lda
310 %attr(755,root,root) %{_libdir}/%{name}/gdbhelper
311 %attr(755,root,root) %{_libdir}/%{name}/imap
312 %attr(755,root,root) %{_libdir}/%{name}/imap-hibernate
313 %attr(755,root,root) %{_libdir}/%{name}/imap-login
314 %attr(755,root,root) %{_libdir}/%{name}/imap-urlauth
315 %attr(755,root,root) %{_libdir}/%{name}/imap-urlauth-login
316 %attr(755,root,root) %{_libdir}/%{name}/imap-urlauth-worker
317 %attr(755,root,root) %{_libdir}/%{name}/indexer
318 %attr(755,root,root) %{_libdir}/%{name}/indexer-worker
319 %attr(755,root,root) %{_libdir}/%{name}/ipc
320 %attr(755,root,root) %{_libdir}/%{name}/lmtp
321 %attr(755,root,root) %{_libdir}/%{name}/log
322 %attr(755,root,root) %{_libdir}/%{name}/maildirlock
323 %attr(755,root,root) %{_libdir}/%{name}/pop3
324 %attr(755,root,root) %{_libdir}/%{name}/pop3-login
325 %attr(755,root,root) %{_libdir}/%{name}/quota-status
326 %attr(755,root,root) %{_libdir}/%{name}/rawlog
327 %attr(755,root,root) %{_libdir}/%{name}/replicator
328 %attr(755,root,root) %{_libdir}/%{name}/script
329 %attr(755,root,root) %{_libdir}/%{name}/script-login
330 %attr(755,root,root) %{_libdir}/%{name}/ssl-params
331 %attr(755,root,root) %{_libdir}/%{name}/stats
332 %attr(755,root,root) %{_libdir}/%{name}/xml2text
333 %dir %{_libdir}/%{name}/plugins
334 %attr(755,root,root) %{_libdir}/%{name}/plugins/*.so
335 %dir %{_libdir}/%{name}/plugins/auth
336 %attr(755,root,root) %{_libdir}/%{name}/plugins/auth/*.so
337 %dir %{_libdir}/%{name}/plugins/dict
338 %attr(755,root,root) %{_libdir}/%{name}/plugins/dict/*.so
339 %dir %{_libdir}/%{name}/plugins/doveadm
340 %attr(755,root,root) %{_libdir}/%{name}/plugins/doveadm/*.so
341 %dir %{_libdir}/%{name}/plugins/stats
342 %attr(755,root,root) %{_libdir}/%{name}/plugins/stats/*.so
344 %dir /var/lib/dovecot
345 %dir /var/run/dovecot
346 %attr(750,root,dovenull) %dir /var/run/dovecot/login
348 %{_mandir}/man1/deliver.1*
349 %{_mandir}/man1/dove*.1*
350 %{_mandir}/man1/dsync.1*
351 %{_mandir}/man7/doveadm-search-query.7*
354 %defattr(644,root,root,755)
355 %attr(755,root,root) %{_libdir}/%{name}/libdovecot.so
356 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-compression.so
357 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-dsync.so
358 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-fts.so
359 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so
360 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-ldap.so
361 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so
362 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-sql.so
363 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so
364 %{_libdir}/%{name}/%{name}-config
365 %{_includedir}/%{name}
366 %{_aclocaldir}/dovecot.m4
369 %defattr(644,root,root,755)
370 %dir %{_libdir}/%{name}
372 %attr(755,root,root) %{_libdir}/%{name}/libdovecot.so.0.0.0
373 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-compression.so.0.0.0
374 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-dsync.so.0.0.0
375 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-fts.so.0.0.0
376 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so.0.0.0
377 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-ldap.so.0.0.0
378 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so.0.0.0
379 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-sql.so.0.0.0
380 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so.0.0.0
381 # Note: we are in %{_libdir}/dovecot, ldconfig does not look into this
382 # directory. This is why the following files are not %ghost
383 %attr(755,root,root) %{_libdir}/%{name}/libdovecot.so.0
384 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-compression.so.0
385 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-dsync.so.0
386 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-fts.so.0
387 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so.0
388 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-ldap.so.0
389 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so.0
390 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-sql.so.0
391 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so.0
392 %attr(755,root,root) %{_libdir}/%{name}/libdcrypt_openssl.so