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 CPPFLAGS="%{rpmcppflags} -I/usr/include/libstemmer" \
172 %{?debug:--enable-debug} \
173 %{?with_ldap:--with-ldap=yes} \
174 %{?with_mysql:--with-mysql} \
175 %{?with_pgsql:--with-pgsql} \
176 %{?with_sqlite:--with-sqlite} \
177 %{?with_gssapi:--with-gssapi=plugin} \
187 --with-moduledir=%{_libdir}/%{name}/plugins \
188 --with-ssldir=/var/lib/openssl \
189 --sysconfdir=%{_sysconfdir} \
190 --with-systemdsystemunitdir=%{systemdunitdir}
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} \
200 $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
203 DESTDIR=$RPM_BUILD_ROOT
205 mv -f $RPM_BUILD_ROOT%{_datadir}/doc/%{name}/example-config/* $RPM_BUILD_ROOT%{_sysconfdir}/dovecot
207 cp -a %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name}
208 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
209 cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
210 install %{SOURCE4} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
212 touch $RPM_BUILD_ROOT/etc/security/blacklist.imap
214 find $RPM_BUILD_ROOT%{_libdir}/%{name} -name '*.la' | xargs rm
216 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
217 %{__rm} -r $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/README
220 rm -rf $RPM_BUILD_ROOT
223 %groupadd -g 172 dovecot
224 %useradd -u 172 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovecot dovecot
225 %groupadd -g 254 dovenull
226 %useradd -u 254 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovenull dovenull
229 /sbin/chkconfig --add dovecot
230 %service dovecot restart
231 %systemd_post dovecot.socket dovecot.service
234 if [ "$1" = "0" ]; then
235 %service dovecot stop
236 /sbin/chkconfig --del dovecot
238 %systemd_preun dovecot.service dovecot.socket
241 if [ "$1" = "0" ]; then
245 %groupremove dovenull
249 %post libs -p /sbin/ldconfig
250 %postun libs -p /sbin/ldconfig
253 # restart devocot if pam is upgraded
254 # (dovecot is linked with old libpam but tries to open modules linked with new libpam)
255 if [ "$2" != 1 ]; then
256 %service -q dovecot restart
259 %triggerpostun -- dovecot < 1:2.0.0
260 # upgrading dovecot < 1.1
261 echo "Configuration change default_mail_env -> mail_location"
262 %{__sed} -i -e "s/^default_mail_env/mail_location/" /etc/dovecot/dovecot.conf
263 # upgrading dovecot < 2.0
265 for a in /etc/dovecot/dovecot-db-example.conf \
266 /etc/dovecot/dovecot-dict-sql-example.conf \
267 /etc/dovecot/dovecot-ldap-example.conf \
268 /etc/dovecot/dovecot-sql-example.conf \
269 /etc/dovecot/dovecot.conf; do
271 [ "$i" -eq 0 ] && echo "Read http://wiki2.dovecot.org/Upgrading/2.0"
273 echo "Trying to migrate $a config file to dovecot 2."
274 cp -a "$a" "$a-1.2.org"
277 # convert config and prefix stderr lines with #
278 %{_bindir}/doveconf -n -c "$a-1.2.org" > "$a" 2> "$a.log" || :
281 if [ "$i" -eq 1 ]; then
282 echo "Please verify contents of %{_sysconfdir}/%{name}/* files."
285 %triggerpostun -- %{name} < 1:2.2.4-2
286 %systemd_trigger dovecot.service dovecot.socket
289 %defattr(644,root,root,755)
290 # COPYING contains some notes, not actual LGPL text
291 %doc AUTHORS COPYING ChangeLog NEWS README TODO doc/*.txt doc/*.c*f doc/wiki/*.txt
292 %attr(755,root,root) %{_bindir}/doveadm
293 %attr(755,root,root) %{_bindir}/doveconf
294 %attr(755,root,root) %{_bindir}/dsync
295 %attr(755,root,root) %{_sbindir}/%{name}
296 %attr(751,root,root) %dir %{_sysconfdir}/%{name}
297 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
298 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.ext
299 %attr(751,root,root) %dir %{_sysconfdir}/%{name}/conf.d
300 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/conf.d/*.conf
301 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/conf.d/*.ext
302 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/%{name}
303 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.imap
304 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
305 %attr(754,root,root) /etc/rc.d/init.d/%{name}
306 %attr(755,root,root) %{_libdir}/%{name}/aggregator
307 %attr(755,root,root) %{_libdir}/%{name}/anvil
308 %attr(755,root,root) %{_libdir}/%{name}/auth
309 %attr(755,root,root) %{_libdir}/%{name}/checkpassword-reply
310 %attr(755,root,root) %{_libdir}/%{name}/config
311 %attr(755,root,root) %{_libdir}/%{name}/decode2text.sh
312 %attr(755,root,root) %{_libdir}/%{name}/deliver
313 %attr(755,root,root) %{_libdir}/%{name}/dict
314 %attr(755,root,root) %{_libdir}/%{name}/director
315 %attr(755,root,root) %{_libdir}/%{name}/dns-client
316 %attr(755,root,root) %{_libdir}/%{name}/doveadm-server
317 %attr(755,root,root) %{_libdir}/%{name}/dovecot-lda
318 %attr(755,root,root) %{_libdir}/%{name}/gdbhelper
319 %attr(755,root,root) %{_libdir}/%{name}/imap
320 %attr(755,root,root) %{_libdir}/%{name}/imap-login
321 %attr(755,root,root) %{_libdir}/%{name}/imap-urlauth
322 %attr(755,root,root) %{_libdir}/%{name}/imap-urlauth-login
323 %attr(755,root,root) %{_libdir}/%{name}/imap-urlauth-worker
324 %attr(755,root,root) %{_libdir}/%{name}/indexer
325 %attr(755,root,root) %{_libdir}/%{name}/indexer-worker
326 %attr(755,root,root) %{_libdir}/%{name}/ipc
327 %attr(755,root,root) %{_libdir}/%{name}/lmtp
328 %attr(755,root,root) %{_libdir}/%{name}/log
329 %attr(755,root,root) %{_libdir}/%{name}/maildirlock
330 %attr(755,root,root) %{_libdir}/%{name}/pop3
331 %attr(755,root,root) %{_libdir}/%{name}/pop3-login
332 %attr(755,root,root) %{_libdir}/%{name}/quota-status
333 %attr(755,root,root) %{_libdir}/%{name}/rawlog
334 %attr(755,root,root) %{_libdir}/%{name}/replicator
335 %attr(755,root,root) %{_libdir}/%{name}/script
336 %attr(755,root,root) %{_libdir}/%{name}/script-login
337 %attr(755,root,root) %{_libdir}/%{name}/ssl-params
338 %attr(755,root,root) %{_libdir}/%{name}/stats
339 %attr(755,root,root) %{_libdir}/%{name}/xml2text
340 %dir %{_libdir}/%{name}/plugins
341 %attr(755,root,root) %{_libdir}/%{name}/plugins/*.so
342 %dir %{_libdir}/%{name}/plugins/auth
343 %attr(755,root,root) %{_libdir}/%{name}/plugins/auth/*.so
344 %dir %{_libdir}/%{name}/plugins/dict
345 %attr(755,root,root) %{_libdir}/%{name}/plugins/dict/*.so
346 %dir %{_libdir}/%{name}/plugins/doveadm
347 %attr(755,root,root) %{_libdir}/%{name}/plugins/doveadm/*.so
348 %{systemdunitdir}/dovecot.service
349 %{systemdunitdir}/dovecot.socket
350 /usr/lib/tmpfiles.d/%{name}.conf
351 %dir /var/lib/dovecot
352 %dir /var/run/dovecot
353 %attr(750,root,dovenull) %dir /var/run/dovecot/login
355 %{_mandir}/man1/deliver.1*
356 %{_mandir}/man1/dove*.1*
357 %{_mandir}/man1/dsync.1*
358 %{_mandir}/man7/doveadm-search-query.7*
361 %defattr(644,root,root,755)
362 %attr(755,root,root) %{_libdir}/%{name}/libdovecot.so
363 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-compression.so
364 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-dsync.so
365 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so
366 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so
367 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-sql.so
368 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so
369 %{_libdir}/%{name}/%{name}-config
370 %{_includedir}/%{name}
371 %{_aclocaldir}/dovecot.m4
374 %defattr(644,root,root,755)
375 %dir %{_libdir}/%{name}
377 %attr(755,root,root) %{_libdir}/%{name}/libdovecot.so.0.0.0
378 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-compression.so.0.0.0
379 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-dsync.so.0.0.0
380 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so.0.0.0
381 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so.0.0.0
382 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-sql.so.0.0.0
383 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so.0.0.0
384 # Note: we are in %{_libdir}/dovecot, ldconfig does not look into this
385 # directory. This is why the following files are not %ghost
386 %attr(755,root,root) %{_libdir}/%{name}/libdovecot.so.0
387 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-compression.so.0
388 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-dsync.so.0
389 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so.0
390 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so.0
391 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-sql.so.0
392 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so.0