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
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.0/%{name}-%{version}.tar.gz
19 # Source0-md5: 6226485f95def28ecb4ff8fc52915762
22 Source3: %{name}.sysconfig
23 Patch0: %{name}-config.patch
24 URL: http://dovecot.org/
25 BuildRequires: autoconf
26 BuildRequires: automake
27 BuildRequires: bzip2-devel
28 %{?with_sasl:BuildRequires: cyrus-sasl-devel >= 2.0}
29 BuildRequires: gettext-devel
30 %{?with_gssapi:BuildRequires: heimdal-devel}
31 BuildRequires: libcap-devel
32 BuildRequires: libtool
33 %{?with_mysql:BuildRequires: mysql-devel}
34 %{?with_ldap:BuildRequires: openldap-devel >= 2.3.3}
35 BuildRequires: openssl-devel >= 0.9.7d
36 BuildRequires: pam-devel
37 BuildRequires: pkgconfig
38 %{?with_pgsql:BuildRequires: postgresql-devel}
39 BuildRequires: sed >= 4.0
40 %{?with_sqlite:BuildRequires: sqlite3-devel}
41 BuildRequires: zlib-devel
42 Requires(post,preun): /sbin/chkconfig
43 Requires(postun): /usr/sbin/groupdel
44 Requires(postun): /usr/sbin/userdel
45 Requires(pre): /bin/id
46 Requires(pre): /usr/bin/getgid
47 Requires(pre): /usr/sbin/groupadd
48 Requires(pre): /usr/sbin/useradd
49 Requires: %{name} = %{epoch}:%{version}-%{release}
50 Requires: pam >= 0.79.0
51 Provides: group(dovecot)
53 Provides: user(dovecot)
54 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56 %define no_install_post_check_so 1
59 Dovecot is an IMAP and POP3 server for Linux/UNIX-like systems,
60 written with security primarily in mind. Although it's written with C,
61 it uses several coding techniques to avoid most of the common
64 Dovecot can work with standard mbox and maildir formats and it's fully
65 compatible with UW-IMAP and Courier IMAP servers as well as mail
66 clients accessing the mailboxes directly. It's also planned to support
67 storing mails in SQL databases.
69 Dovecot is easy to set up and doesn't require special maintenance.
70 Only thing you need is to get the authentication working properly - if
71 your users are in /etc/passwd there's hardly anything you have to do.
73 Dovecot should be pretty fast, mostly because of index files that
74 Dovecot maintains; instead of having to scan through all the data in
75 mailbox, Dovecot can get most of the wanted information from index
79 - should be quite ready for use with normal IMAP clients
80 - complete IMAP4rev1 and POP3 support
81 - supports THREAD, SORT and IDLE extensions, required by many IMAP
83 - complete TLS/SSL support
85 - shared mailboxes aren't yet supported
86 - Maildir++ quota is supported, bad hard filesystem quota can be
89 %description -l pl.UTF-8
90 Dovecot to serwer IMAP i POP3 dla systemów linuksowych/uniksowych,
91 pisany głównie z myślą o bezpieczeństwie. Chociaż jest pisany w C,
92 używa kilku technik kodowania zapobiegających większości popularnych
95 Dovecot może działać ze standardowymi formatami mbox i maildir, jest
96 całkowicie kompatybilny z serwerami UW-IMAP i Courier IMAP, a także z
97 klientami pocztowymi bezpośrednio dostającymi się do skrzynek.
98 Planowana jest także obsługa przechowywania listów w bazach SQL.
100 Dovecot jest łatwy do skonfigurowania i nie wymaga specjalnego
101 nadzoru. Wystarczy tylko doprowadzić do działania uwierzytelnianie -
102 jeśli użytkownicy są w /etc/passwd, to właściwie nie trzeba nic
105 Dovecot powinien być w miarę szybki, głównie z powodu plików
106 indeksowych utrzymywanych przez serwer; zamiast potrzeby skanowania
107 wszystkich danych w skrzynce, Dovecot może małym kosztem uzyskać
108 większość potrzebnych informacji z indeksu.
111 - powinien być gotowy do użycia ze zwykłymi klientami IMAP
112 - pełna obsługa IMAP4rev1 i POP3
113 - obsługa rozszerzeń THREAD, SORT i IDLE, wymaganych przez wiele
116 - pełna obsługa TLS/SSL
117 - quota Maildir++ jest obsługiwana, ale twarda quota na systemach
118 plików może być problematyczna
121 Summary: Development package for Dovecot plugins
122 Summary(pl.UTF-8): Pakiet programistyczny do tworzenia wtyczek dla Dovecota
123 Group: Development/Libraries
124 Requires: %{name}-libs = %{epoch}:%{version}-%{release}
127 Development package for Dovecot plugins.
129 %description devel -l pl.UTF-8
130 Pakiet programistyczny do tworzenia wtyczek dla Dovecota.
133 Summary: Dovecot shared libraries
134 Summary(pl.UTF-8): Współdzielone biblioteki Dovecota
135 Group: Development/Libraries
138 Dovecot shared libraries.
140 %description libs -l pl.UTF-8
141 Współdzielone biblioteki Dovecota.
147 %{__sed} -i 's,/usr/lib/dovecot,%{_libdir}/dovecot,g' doc/example-config/*.conf doc/example-config/conf.d/*.conf
158 %{?debug:--enable-debug} \
159 %{?with_ldap:--with-ldap=yes} \
160 %{?with_mysql:--with-mysql} \
161 %{?with_pgsql:--with-pgsql} \
162 %{?with_sqlite:--with-sqlite} \
163 %{?with_gssapi:--with-gssapi=plugin} \
170 --with-moduledir=%{_libdir}/%{name}/plugins \
171 --with-ssldir=/var/lib/openssl \
172 --sysconfdir=%{_sysconfdir}
177 rm -rf $RPM_BUILD_ROOT
178 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,sysconfig,security}
179 install -d $RPM_BUILD_ROOT{/var/lib/dovecot,/var/run/dovecot/login}
182 DESTDIR=$RPM_BUILD_ROOT
184 mv -f $RPM_BUILD_ROOT%{_datadir}/doc/%{name}/example-config/* $RPM_BUILD_ROOT%{_sysconfdir}/dovecot
186 cp -a %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name}
187 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
188 cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
190 touch $RPM_BUILD_ROOT/etc/security/blacklist.imap
192 find $RPM_BUILD_ROOT%{_libdir}/%{name} -name '*.la' | xargs rm
194 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/dovecot-config $RPM_BUILD_ROOT%{_libdir}/%{name}-devel
196 rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
197 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/README
200 rm -rf $RPM_BUILD_ROOT
203 %groupadd -g 172 dovecot
204 %useradd -u 172 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovecot dovecot
205 %groupadd -g 254 dovenull
206 %useradd -u 254 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovenull dovenull
209 /sbin/chkconfig --add dovecot
210 if [ -f /var/lock/subsys/dovecot ]; then
211 /etc/rc.d/init.d/dovecot restart >&2
213 echo "Run \"/etc/rc.d/init.d/dovecot start\" to start dovecot daemon."
217 if [ "$1" = "0" ]; then
218 if [ -f /var/lock/subsys/dovecot ]; then
219 /etc/rc.d/init.d/dovecot stop >&2
221 /sbin/chkconfig --del dovecot
225 if [ "$1" = "0" ]; then
229 %groupremove dovenull
232 %post libs -p /sbin/ldconfig
233 %postun libs -p /sbin/ldconfig
235 %triggerpostun -- dovecot < 1:2.0.0
236 # upgrading dovecot < 1.1
237 echo "Configuration change default_mail_env -> mail_location"
238 %{__sed} -i -e "s/^default_mail_env/mail_location/" /etc/dovecot/dovecot.conf
239 # upgrading dovecot < 2.0
241 for a in /etc/dovecot/dovecot-db-example.conf \
242 /etc/dovecot/dovecot-dict-sql-example.conf \
243 /etc/dovecot/dovecot-ldap-example.conf \
244 /etc/dovecot/dovecot-sql-example.conf \
245 /etc/dovecot/dovecot.conf; do
247 [ "$i" -eq 0 ] && echo "Read http://wiki2.dovecot.org/Upgrading/2.0"
249 echo "Trying to migrate $a config file to dovecot 2."
250 cp -a "$a" "$a-1.2.org"
253 # convert config and prefix stderr lines with #
254 %{_bindir}/doveconf -n -c "$a-1.2.org" > "$a" 2> "$a.log" || :
257 if [ "$i" -eq 1 ]; then
258 echo "Please verify contents of %{_sysconfdir}/%{name}/* files."
262 %defattr(644,root,root,755)
263 # COPYING contains some notes, not actual LGPL text
264 %doc AUTHORS COPYING ChangeLog NEWS README TODO doc/*.txt doc/*.c*f doc/wiki/*.txt
265 %attr(755,root,root) %{_bindir}/doveadm
266 %attr(755,root,root) %{_bindir}/doveconf
267 %attr(755,root,root) %{_bindir}/dsync
268 %attr(755,root,root) %{_sbindir}/%{name}
269 %attr(751,root,root) %dir %{_sysconfdir}/%{name}
270 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
271 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.ext
272 %attr(751,root,root) %dir %{_sysconfdir}/%{name}/conf.d
273 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/conf.d/*.conf
274 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/conf.d/*.ext
275 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/%{name}
276 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.imap
277 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
278 %attr(754,root,root) /etc/rc.d/init.d/%{name}
279 %attr(755,root,root) %{_libdir}/%{name}/anvil
280 %attr(755,root,root) %{_libdir}/%{name}/auth
281 %attr(755,root,root) %{_libdir}/%{name}/checkpassword-reply
282 %attr(755,root,root) %{_libdir}/%{name}/config
283 %attr(755,root,root) %{_libdir}/%{name}/deliver
284 %attr(755,root,root) %{_libdir}/%{name}/dict
285 %attr(755,root,root) %{_libdir}/%{name}/director
286 %attr(755,root,root) %{_libdir}/%{name}/dns-client
287 %attr(755,root,root) %{_libdir}/%{name}/doveadm-server
288 %attr(755,root,root) %{_libdir}/%{name}/dovecot-lda
289 %attr(755,root,root) %{_libdir}/%{name}/gdbhelper
290 %attr(755,root,root) %{_libdir}/%{name}/imap
291 %attr(755,root,root) %{_libdir}/%{name}/imap-login
292 %attr(755,root,root) %{_libdir}/%{name}/listview
293 %attr(755,root,root) %{_libdir}/%{name}/lmtp
294 %attr(755,root,root) %{_libdir}/%{name}/log
295 %attr(755,root,root) %{_libdir}/%{name}/maildirlock
296 %attr(755,root,root) %{_libdir}/%{name}/pop3
297 %attr(755,root,root) %{_libdir}/%{name}/pop3-login
298 %attr(755,root,root) %{_libdir}/%{name}/rawlog
299 %attr(755,root,root) %{_libdir}/%{name}/script
300 %attr(755,root,root) %{_libdir}/%{name}/script-login
301 %attr(755,root,root) %{_libdir}/%{name}/ssl-params
302 %dir %{_libdir}/%{name}/plugins
303 %attr(755,root,root) %{_libdir}/%{name}/plugins/*.so
304 %dir %{_libdir}/%{name}/plugins/auth
305 %attr(755,root,root) %{_libdir}/%{name}/plugins/auth/*.so
306 %dir %{_libdir}/%{name}/plugins/dict
307 %attr(755,root,root) %{_libdir}/%{name}/plugins/dict/*.so
308 %dir %{_libdir}/%{name}/plugins/doveadm
309 %attr(755,root,root) %{_libdir}/%{name}/plugins/doveadm/*.so
310 %dir /var/lib/dovecot
311 %dir /var/run/dovecot
312 %attr(750,root,dovenull) %dir /var/run/dovecot/login
314 %{_mandir}/man1/deliver.1*
315 %{_mandir}/man1/dove*.1*
316 %{_mandir}/man1/dsync.1*
317 %{_mandir}/man7/doveadm-search-query.7*
320 %defattr(644,root,root,755)
321 %attr(755,root,root) %{_libdir}/%{name}/libdovecot.so
322 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so
323 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so
324 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so
325 %{_libdir}/%{name}-devel
326 %{_includedir}/%{name}
327 %{_aclocaldir}/dovecot.m4
330 %defattr(644,root,root,755)
331 %dir %{_libdir}/%{name}
332 %attr(755,root,root) %{_libdir}/%{name}/libdovecot.so.0.0.0
333 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so.0.0.0
334 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so.0.0.0
335 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so.0.0.0
336 # Note: we are in %{_libdir}/dovecot, ldconfig does not look into this
337 # directory. This is why the following files are not %ghost
338 %attr(755,root,root) %{_libdir}/%{name}/libdovecot.so.0
339 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so.0
340 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so.0
341 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so.0