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.UTF-8): Serwer IMAP i POP3 pisany głównie z myślą o bezpieczeństwie
14 License: MIT (libraries), LGPL v2.1 (the rest)
15 Group: Networking/Daemons
16 Source0: http://dovecot.org/releases/1.0/%{name}-%{version}.tar.gz
17 # Source0-md5: c050fa2a7dae8984d432595e3e8183e1
20 Source3: %{name}.sysconfig
21 Patch0: %{name}-config.patch
22 URL: http://dovecot.org/
23 BuildRequires: autoconf
24 BuildRequires: automake
25 %{?with_sasl:BuildRequires: cyrus-sasl-devel >= 2.0}
26 BuildRequires: gettext-devel
27 BuildRequires: krb5-devel
28 BuildRequires: libtool
29 %{?with_mysql:BuildRequires: mysql-devel}
30 %{?with_ldap:BuildRequires: openldap-devel >= 2.3.3}
31 BuildRequires: openssl-devel >= 0.9.7d
32 BuildRequires: pam-devel
33 BuildRequires: pkgconfig
34 %{?with_pgsql:BuildRequires: postgresql-devel}
35 BuildRequires: sed >= 4.0
36 %{?with_sqlite:BuildRequires: sqlite3-devel}
37 Requires(post,preun): /sbin/chkconfig
38 Requires(postun): /usr/sbin/groupdel
39 Requires(postun): /usr/sbin/userdel
40 Requires(pre): /bin/id
41 Requires(pre): /usr/bin/getgid
42 Requires(pre): /usr/sbin/groupadd
43 Requires(pre): /usr/sbin/useradd
44 Requires: pam >= 0.79.0
45 Provides: group(dovecot)
46 Provides: user(dovecot)
48 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51 Dovecot is an IMAP and POP3 server for Linux/UNIX-like systems,
52 written with security primarily in mind. Although it's written with C,
53 it uses several coding techniques to avoid most of the common
56 Dovecot can work with standard mbox and maildir formats and it's fully
57 compatible with UW-IMAP and Courier IMAP servers as well as mail
58 clients accessing the mailboxes directly. It's also planned to support
59 storing mails in SQL databases.
61 Dovecot is easy to set up and doesn't require special maintenance.
62 Only thing you need is to get the authentication working properly - if
63 your users are in /etc/passwd there's hardly anything you have to do.
65 Dovecot should be pretty fast, mostly because of index files that
66 Dovecot maintains; instead of having to scan through all the data in
67 mailbox, Dovecot can get most of the wanted information from index
71 - should be quite ready for use with normal IMAP clients
72 - complete IMAP4rev1 and POP3 support
73 - supports THREAD, SORT and IDLE extensions, required by many IMAP
75 - complete TLS/SSL support
77 - shared mailboxes aren't yet supported
78 - Maildir++ quota is supported, bad hard filesystem quota can be
81 %description -l pl.UTF-8
82 Dovecot to serwer IMAP i POP3 dla systemów linuksowych/uniksowych,
83 pisany głównie z myślą o bezpieczeństwie. Chociaż jest pisany w C,
84 używa kilku technik kodowania zapobiegających większości popularnych
87 Dovecot może działać ze standardowymi formatami mbox i maildir, jest
88 całkowicie kompatybilny z serwerami UW-IMAP i Courier IMAP, a także z
89 klientami pocztowymi bezpośrednio dostającymi się do skrzynek.
90 Planowana jest także obsługa przechowywania listów w bazach SQL.
92 Dovecot jest łatwy do skonfigurowania i nie wymaga specjalnego
93 nadzoru. Wystarczy tylko doprowadzić do działania uwierzytelnianie -
94 jeśli użytkownicy są w /etc/passwd, to właściwie nie trzeba nic
97 Dovecot powinien być w miarę szybki, głównie z powodu plików
98 indeksowych utrzymywanych przez serwer; zamiast potrzeby skanowania
99 wszystkich danych w skrzynce, Dovecot może małym kosztem uzyskać
100 większość potrzebnych informacji z indeksu.
103 - powinien być gotowy do użycia ze zwykłymi klientami IMAP
104 - pełna obsługa IMAP4rev1 i POP3
105 - obsługa rozszerzeń THREAD, SORT i IDLE, wymaganych przez wiele
108 - pełna obsługa TLS/SSL
109 - quota Maildir++ jest obsługiwana, ale twarda quota na systemach
110 plików może być problematyczna
113 Summary: Development package for dovecot plugins
114 Summary(pl.UTF-8): Pakiet programistyczny do tworzenia wtyczek dla dovecota
115 Group: Development/Libraries
116 # doesn't require base
119 Development package for dovecot plugins.
121 %description devel -l pl.UTF-8
122 Pakiet programistyczny do tworzenia wtyczek dla dovecota.
128 %{__sed} -i 's,/usr/lib/dovecot,%{_libdir}/dovecot,g' dovecot-example.conf
139 %{?debug:--enable-debug} \
140 --enable-header-install \
141 %{?with_ldap:--with-ldap} \
142 %{?with_mysql:--with-mysql} \
143 %{?with_pgsql:--with-pgsql} \
144 %{?with_sasl:--with-cyrus-sasl2} \
145 %{?with_sqlite:--with-sqlite} \
148 --with-ssl-dir=/var/lib/openssl \
149 --sysconfdir=/etc/%{name}
154 rm -rf $RPM_BUILD_ROOT
155 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,sysconfig,security}
156 install -d $RPM_BUILD_ROOT{%{_libdir},%{_bindir}}
157 install -d $RPM_BUILD_ROOT{/var/lib/dovecot,/var/run/dovecot/login}
160 moduledir=%{_libdir}/%{name}/plugins \
161 DESTDIR=$RPM_BUILD_ROOT
163 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{dovecot-example.conf,dovecot.conf}
165 install %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name}
166 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
167 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
169 touch $RPM_BUILD_ROOT/etc/security/blacklist.imap
171 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins{,/imap}/*.la
174 for dir in lib lib-imap lib-mail lib-storage; do
175 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/src/$dir
176 install -p -m644 src/$dir/*.a $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/src/$dir
178 ln -sf %{_includedir}/%{name}/dovecot-config $RPM_BUILD_ROOT%{_libdir}/%{name}-devel
180 rm -r $RPM_BUILD_ROOT%{_docdir}/%{name}/wiki
183 rm -rf $RPM_BUILD_ROOT
186 %groupadd -g 172 dovecot
187 %useradd -u 172 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovecot dovecot
190 /sbin/chkconfig --add dovecot
191 if [ -f /var/lock/subsys/dovecot ]; then
192 /etc/rc.d/init.d/dovecot restart >&2
194 echo "Run \"/etc/rc.d/init.d/dovecot start\" to start dovecot daemon."
198 if [ "$1" = "0" ]; then
199 if [ -f /var/lock/subsys/dovecot ]; then
200 /etc/rc.d/init.d/dovecot stop >&2
202 /sbin/chkconfig --del dovecot
206 if [ "$1" = "0" ]; then
212 %defattr(644,root,root,755)
213 # COPYING contains some notes, not actual LGPL text
214 %doc AUTHORS COPYING ChangeLog NEWS README TODO doc/*.txt doc/*.c*f doc/wiki/*.txt
215 %attr(755,root,root) %{_sbindir}/%{name}
216 %attr(755,root,root) %{_sbindir}/%{name}pw
217 %attr(750,root,root) %dir %{_sysconfdir}/%{name}
218 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
219 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/%{name}
220 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.imap
221 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
222 %attr(754,root,root) /etc/rc.d/init.d/%{name}
223 %dir %{_libdir}/%{name}
224 %attr(755,root,root) %{_libdir}/%{name}/checkpassword-reply
225 %attr(755,root,root) %{_libdir}/%{name}/deliver
226 %attr(755,root,root) %{_libdir}/%{name}/dict
227 %attr(755,root,root) %{_libdir}/%{name}/dovecot-auth
228 %attr(755,root,root) %{_libdir}/%{name}/gdbhelper
229 %attr(755,root,root) %{_libdir}/%{name}/idxview
230 %attr(755,root,root) %{_libdir}/%{name}/imap
231 %attr(755,root,root) %{_libdir}/%{name}/imap-login
232 %attr(755,root,root) %{_libdir}/%{name}/logview
233 %attr(755,root,root) %{_libdir}/%{name}/pop3
234 %attr(755,root,root) %{_libdir}/%{name}/pop3-login
235 %attr(755,root,root) %{_libdir}/%{name}/rawlog
236 %attr(755,root,root) %{_libdir}/%{name}/ssl-build-param
237 %dir %{_libdir}/%{name}/plugins
238 %attr(755,root,root) %{_libdir}/%{name}/plugins/*.so
239 %dir %{_libdir}/%{name}/plugins/imap
240 %attr(755,root,root)%{_libdir}/%{name}/plugins/imap/*.so
241 %dir %{_libdir}/%{name}/plugins/lda
242 %attr(755,root,root) %{_libdir}/%{name}/plugins/lda/*.so
243 %dir %{_libdir}/%{name}/plugins/pop3
244 %attr(755,root,root) %{_libdir}/%{name}/plugins/pop3/*.so
245 %dir /var/lib/dovecot
246 %dir /var/run/dovecot
247 %attr(750,root,dovecot) %dir /var/run/dovecot/login
250 %defattr(644,root,root,755)
251 %{_libdir}/%{name}-devel
252 %{_includedir}/%{name}