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
9 Summary: IMAP and POP3 server written with security primarily in mind
10 Summary(pl): Serwer IMAP i POP3 pisany g³ównie z my¶l± o bezpieczeñstwie
14 License: LGPL v2.1 and MIT
15 Group: Networking/Daemons
16 Source0: http://dovecot.org/releases/%{name}-%{version}.tar.gz
17 # Source0-md5: b42be5947e641909918a863da3249951
20 Source3: %{name}.sysconfig
21 Patch0: %{name}-config.patch
22 Patch1: %{name}-pop3-undeleted.patch
23 URL: http://dovecot.org/
24 BuildRequires: autoconf
25 BuildRequires: automake
26 %{?with_sasl:BuildRequires: cyrus-sasl-devel >= 2.0}
27 BuildRequires: heimdal-devel
28 BuildRequires: gettext-devel
29 BuildRequires: libtool
30 %{?with_mysql:BuildRequires: mysql-devel}
31 %{?with_ldap:BuildRequires: openldap-devel >= 2.3.0}
32 BuildRequires: openssl-devel >= 0.9.7d
33 BuildRequires: pam-devel
34 BuildRequires: pkgconfig
35 %{?with_pgsql:BuildRequires: postgresql-devel}
36 BuildRequires: sed >= 4.0
37 %{?with_sqlite:BuildRequires: sqlite3-devel}
38 Requires(post,preun): /sbin/chkconfig
39 Requires(postun): /usr/sbin/groupdel
40 Requires(postun): /usr/sbin/userdel
41 Requires(pre): /bin/id
42 Requires(pre): /usr/bin/getgid
43 Requires(pre): /usr/sbin/groupadd
44 Requires(pre): /usr/sbin/useradd
45 Requires: pam >= 0.79.0
46 Provides: group(dovecot)
47 Provides: user(dovecot)
49 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52 Dovecot is an IMAP and POP3 server for Linux/UNIX-like systems,
53 written with security primarily in mind. Although it's written with C,
54 it uses several coding techniques to avoid most of the common
57 Dovecot can work with standard mbox and maildir formats and it's fully
58 compatible with UW-IMAP and Courier IMAP servers as well as mail
59 clients accessing the mailboxes directly. It's also planned to support
60 storing mails in SQL databases.
62 Dovecot is easy to set up and doesn't require special maintenance.
63 Only thing you need is to get the authentication working properly - if
64 your users are in /etc/passwd there's hardly anything you have to do.
66 Dovecot should be pretty fast, mostly because of index files that
67 Dovecot maintains; instead of having to scan through all the data in
68 mailbox, Dovecot can get most of the wanted information from index
72 - should be quite ready for use with normal IMAP clients
73 - complete IMAP4rev1 support
74 - supports THREAD and SORT extensions, required by many IMAP webmails
75 - complete TLS/SSL support, using either GNUTLS or OpenSSL
77 - shared mailboxes aren't yet supported
78 - Maildir++ quota isn't yet supported; hard filesystem quota can also
80 - mbox support isn't yet perfect - there's a few more or less
81 theoretical problems, but nothing too bad.
84 Dovecot to serwer IMAP i POP3 dla systemów linuksowych/uniksowych,
85 pisany g³ównie z my¶l± o bezpieczeñstwie. Chocia¿ jest pisany w C,
86 u¿ywa kilku technik kodowania zapobiegaj±cych wiêkszo¶ci popularnych
89 Dovecot mo¿e dzia³aæ ze standardowymi formatami mbox i maildir, jest
90 ca³kowicie kompatybilny z serwerami UW-IMAP i Courier IMAP, a tak¿e z
91 klientami pocztowymi bezpo¶rednio dostaj±cymi siê do skrzynek.
92 Planowana jest tak¿e obs³uga przechowywania listów w bazach SQL.
94 Dovecot jest ³atwy do skonfigurowania i nie wymaga specjalnego
95 nadzoru. Wystarczy tylko doprowadziæ do dzia³ania uwierzytelnianie -
96 je¶li u¿ytkownicy s± w /etc/passwd, to w³a¶ciwie nie trzeba nic
99 Dovecot powinien byæ w miarê szybki, g³ównie z powodu plików
100 indeksowych utrzymywanych przez serwer; zamiast potrzeby skanowania
101 wszystkich danych w skrzynce, Dovecot mo¿e ma³ym kosztem uzyskaæ
102 wiêkszo¶æ potrzebnych informacji z indeksu.
105 - powinien byæ gotowy do u¿ycia ze zwyk³ymi klientami IMAP
106 - pe³na obs³uga IMAP4rev1
107 - obs³uga rozszerzeñ THREAD i SORT, wymaganych przez wiele webmaili
110 - jeszcze nie ma wspó³dzielonych skrzynek
111 - quota Maildir++ jeszcze nie jest obs³ugiwana; twarda quota na
112 systemach plików mo¿e sprawiaæ problemy
113 - obs³uga mboksów jeszcze nie jest idealna - jest jeszcze kilka mniej
114 lub bardziej teoretycznych problemów, ale nic strasznego.
120 %{__sed} -i 's,/usr/libexec,%{_libdir},g' dovecot-example.conf
130 %{?debug:--enable-debug} \
131 %{?with_ldap:--with-ldap} \
132 %{?with_mysql:--with-mysql} \
133 %{?with_pgsql:--with-pgsql} \
134 %{?with_sasl:--with-cyrus-sasl2} \
135 %{?with_sqlite:--with-sqlite} \
138 --with-ssl-dir=/var/lib/openssl \
139 --sysconfdir=/etc/%{name}
144 rm -rf $RPM_BUILD_ROOT
145 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,sysconfig,security}
146 install -d $RPM_BUILD_ROOT{%{_libdir},%{_bindir}}
147 install -d $RPM_BUILD_ROOT{/var/lib/dovecot,/var/run/dovecot/login}
150 moduledir=%{_libdir}/%{name}/plugins \
151 DESTDIR=$RPM_BUILD_ROOT
153 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{dovecot-example.conf,dovecot.conf}
155 install %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name}
156 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
157 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
159 touch $RPM_BUILD_ROOT/etc/security/blacklist.imap
162 rm -rf $RPM_BUILD_ROOT
165 %groupadd -g 172 dovecot
166 %useradd -u 172 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovecot dovecot
169 /sbin/chkconfig --add dovecot
170 if [ -f /var/lock/subsys/dovecot ]; then
171 /etc/rc.d/init.d/dovecot restart >&2
173 echo "Run \"/etc/rc.d/init.d/dovecot start\" to start dovecot daemon."
177 if [ "$1" = "0" ]; then
178 if [ -f /var/lock/subsys/dovecot ]; then
179 /etc/rc.d/init.d/dovecot stop >&2
181 /sbin/chkconfig --del dovecot
185 if [ "$1" = "0" ]; then
191 %defattr(644,root,root,755)
192 # COPYING contains some notes, not actual LGPL text
193 %doc AUTHORS COPYING ChangeLog NEWS README TODO doc/*.txt doc/*.c*f
194 %attr(755,root,root) %{_sbindir}/%{name}
195 %attr(755,root,root) %{_sbindir}/%{name}pw
196 %attr(750,root,root) %dir %{_sysconfdir}/%{name}
197 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
198 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/%{name}
199 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.imap
200 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
201 %attr(754,root,root) /etc/rc.d/init.d/%{name}
202 %attr(755,root,root) %{_libdir}/%{name}
203 %dir /var/lib/dovecot
204 %dir /var/run/dovecot
205 %attr(750,root,dovecot) %dir /var/run/dovecot/login