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