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: c0c72dd57071593ff3a6a452fcee6a03
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: pam >= 0.79.0
50 Provides: group(dovecot)
52 Provides: user(dovecot)
53 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56 Dovecot is an IMAP and POP3 server for Linux/UNIX-like systems,
57 written with security primarily in mind. Although it's written with C,
58 it uses several coding techniques to avoid most of the common
61 Dovecot can work with standard mbox and maildir formats and it's fully
62 compatible with UW-IMAP and Courier IMAP servers as well as mail
63 clients accessing the mailboxes directly. It's also planned to support
64 storing mails in SQL databases.
66 Dovecot is easy to set up and doesn't require special maintenance.
67 Only thing you need is to get the authentication working properly - if
68 your users are in /etc/passwd there's hardly anything you have to do.
70 Dovecot should be pretty fast, mostly because of index files that
71 Dovecot maintains; instead of having to scan through all the data in
72 mailbox, Dovecot can get most of the wanted information from index
76 - should be quite ready for use with normal IMAP clients
77 - complete IMAP4rev1 and POP3 support
78 - supports THREAD, SORT and IDLE extensions, required by many IMAP
80 - complete TLS/SSL support
82 - shared mailboxes aren't yet supported
83 - Maildir++ quota is supported, bad hard filesystem quota can be
86 %description -l pl.UTF-8
87 Dovecot to serwer IMAP i POP3 dla systemów linuksowych/uniksowych,
88 pisany głównie z myślą o bezpieczeństwie. Chociaż jest pisany w C,
89 używa kilku technik kodowania zapobiegających większości popularnych
92 Dovecot może działać ze standardowymi formatami mbox i maildir, jest
93 całkowicie kompatybilny z serwerami UW-IMAP i Courier IMAP, a także z
94 klientami pocztowymi bezpośrednio dostającymi się do skrzynek.
95 Planowana jest także obsługa przechowywania listów w bazach SQL.
97 Dovecot jest łatwy do skonfigurowania i nie wymaga specjalnego
98 nadzoru. Wystarczy tylko doprowadzić do działania uwierzytelnianie -
99 jeśli użytkownicy są w /etc/passwd, to właściwie nie trzeba nic
102 Dovecot powinien być w miarę szybki, głównie z powodu plików
103 indeksowych utrzymywanych przez serwer; zamiast potrzeby skanowania
104 wszystkich danych w skrzynce, Dovecot może małym kosztem uzyskać
105 większość potrzebnych informacji z indeksu.
108 - powinien być gotowy do użycia ze zwykłymi klientami IMAP
109 - pełna obsługa IMAP4rev1 i POP3
110 - obsługa rozszerzeń THREAD, SORT i IDLE, wymaganych przez wiele
113 - pełna obsługa TLS/SSL
114 - quota Maildir++ jest obsługiwana, ale twarda quota na systemach
115 plików może być problematyczna
118 Summary: Development package for dovecot plugins
119 Summary(pl.UTF-8): Pakiet programistyczny do tworzenia wtyczek dla dovecota
120 Group: Development/Libraries
121 # doesn't require base
124 Development package for dovecot plugins.
126 %description devel -l pl.UTF-8
127 Pakiet programistyczny do tworzenia wtyczek dla dovecota.
133 %{__sed} -i 's,/usr/lib/dovecot,%{_libdir}/dovecot,g' doc/example-config/*.conf doc/example-config/conf.d/*.conf
144 %{?debug:--enable-debug} \
145 %{?with_ldap:--with-ldap=yes} \
146 %{?with_mysql:--with-mysql} \
147 %{?with_pgsql:--with-pgsql} \
148 %{?with_sqlite:--with-sqlite} \
149 %{?with_gssapi:--with-gssapi=plugin} \
156 --with-moduledir=%{_libdir}/%{name}/plugins \
157 --with-ssldir=/var/lib/openssl \
163 rm -rf $RPM_BUILD_ROOT
164 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,sysconfig,security}
165 install -d $RPM_BUILD_ROOT{/var/lib/dovecot,/var/run/dovecot/login}
168 DESTDIR=$RPM_BUILD_ROOT
170 mv -f $RPM_BUILD_ROOT%{_datadir}/doc/%{name}/example-config/* $RPM_BUILD_ROOT%{_sysconfdir}/dovecot
172 install %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name}
173 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
174 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
176 touch $RPM_BUILD_ROOT/etc/security/blacklist.imap
178 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins{,/*}/*.la
180 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/dovecot-config $RPM_BUILD_ROOT%{_libdir}/%{name}-devel
182 rm -r $RPM_BUILD_ROOT%{_docdir}/%{name}
185 rm -rf $RPM_BUILD_ROOT
188 %groupadd -g 172 dovecot
189 %useradd -u 172 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovecot dovecot
190 %groupadd -g 254 dovenull
191 %useradd -u 254 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovenull dovenull
194 /sbin/chkconfig --add dovecot
195 if [ -f /var/lock/subsys/dovecot ]; then
196 /etc/rc.d/init.d/dovecot restart >&2
198 echo "Run \"/etc/rc.d/init.d/dovecot start\" to start dovecot daemon."
202 if [ "$1" = "0" ]; then
203 if [ -f /var/lock/subsys/dovecot ]; then
204 /etc/rc.d/init.d/dovecot stop >&2
206 /sbin/chkconfig --del dovecot
210 if [ "$1" = "0" ]; then
214 %groupremove dovenull
217 %triggerpostun -- dovecot < 1:1.1
218 echo "Configuration change default_mail_env -> mail_location"
219 %{__sed} -i -e "s/^default_mail_env/mail_location/" /etc/dovecot/dovecot.conf
221 %triggerpostun -- dovecot < 1:2.0.0
223 for a in /etc/dovecot/dovecot-db-example.conf \
224 /etc/dovecot/dovecot-dict-sql-example.conf \
225 /etc/dovecot/dovecot-ldap-example.conf \
226 /etc/dovecot/dovecot-sql-example.conf \
227 /etc/dovecot/dovecot.conf; do
229 [ "$i" -eq 0 ] && echo "Read http://wiki2.dovecot.org/Upgrading/2.0"
231 echo "Trying to migrate $a config file to dovecot 2."
232 cp -a "$a" "$a-1.2.org"
233 # convert config and prefix stderr lines with #
234 ( %{_bindir}/doveconf -n -c "$a-1.2.org" 3>&2 2>&1 1>&3 | sed 's/^/#/' ) 2>&1 > "$a" || :
237 if [ "$i" -eq 1 ]; then
238 echo "Please verify contents of %{_sysconfdir}/%{name}/* files."
242 %defattr(644,root,root,755)
243 # COPYING contains some notes, not actual LGPL text
244 %doc AUTHORS COPYING ChangeLog NEWS README TODO doc/*.txt doc/*.c*f doc/wiki/*.txt
245 %attr(755,root,root) %{_bindir}/doveadm
246 %attr(755,root,root) %{_bindir}/doveconf
247 %attr(755,root,root) %{_bindir}/dsync
248 %attr(755,root,root) %{_sbindir}/%{name}
249 %attr(751,root,root) %dir %{_sysconfdir}/%{name}
250 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
251 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.ext
252 %attr(751,root,root) %dir %{_sysconfdir}/%{name}/conf.d
253 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/conf.d/*.conf
254 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/conf.d/*.ext
255 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/%{name}
256 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.imap
257 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
258 %attr(754,root,root) /etc/rc.d/init.d/%{name}
259 %dir %{_libdir}/%{name}
260 %attr(755,root,root) %{_libdir}/%{name}/anvil
261 %attr(755,root,root) %{_libdir}/%{name}/auth
262 %attr(755,root,root) %{_libdir}/%{name}/checkpassword-reply
263 %attr(755,root,root) %{_libdir}/%{name}/config
264 %attr(755,root,root) %{_libdir}/%{name}/deliver
265 %attr(755,root,root) %{_libdir}/%{name}/dict
266 %attr(755,root,root) %{_libdir}/%{name}/director
267 %attr(755,root,root) %{_libdir}/%{name}/dns-client
268 %attr(755,root,root) %{_libdir}/%{name}/doveadm-server
269 %attr(755,root,root) %{_libdir}/%{name}/dovecot-lda
270 %attr(755,root,root) %{_libdir}/%{name}/gdbhelper
271 %attr(755,root,root) %{_libdir}/%{name}/imap
272 %attr(755,root,root) %{_libdir}/%{name}/imap-login
273 %attr(755,root,root) %{_libdir}/%{name}/listview
274 %attr(755,root,root) %{_libdir}/%{name}/lmtp
275 %attr(755,root,root) %{_libdir}/%{name}/log
276 %attr(755,root,root) %{_libdir}/%{name}/maildirlock
277 %attr(755,root,root) %{_libdir}/%{name}/pop3
278 %attr(755,root,root) %{_libdir}/%{name}/pop3-login
279 %attr(755,root,root) %{_libdir}/%{name}/rawlog
280 %attr(755,root,root) %{_libdir}/%{name}/script
281 %attr(755,root,root) %{_libdir}/%{name}/script-login
282 %attr(755,root,root) %{_libdir}/%{name}/ssl-params
283 %attr(755,root,root)%{_libdir}/%{name}/lib*.so*
284 %dir %{_libdir}/%{name}/plugins
285 %attr(755,root,root) %{_libdir}/%{name}/plugins/*.so
286 %dir %{_libdir}/%{name}/plugins/auth
287 %attr(755,root,root)%{_libdir}/%{name}/plugins/auth/*.so
288 %dir %{_libdir}/%{name}/plugins/dict
289 %attr(755,root,root)%{_libdir}/%{name}/plugins/dict/*.so
290 %dir %{_libdir}/%{name}/plugins/doveadm
291 %attr(755,root,root)%{_libdir}/%{name}/plugins/doveadm/*.so
292 %dir /var/lib/dovecot
293 %dir /var/run/dovecot
294 %attr(750,root,dovenull) %dir /var/run/dovecot/login
296 %{_mandir}/man1/deliver.1*
297 %{_mandir}/man1/dove*.1*
298 %{_mandir}/man1/dsync.1*
299 %{_mandir}/man7/doveadm-search-query.7*
302 %defattr(644,root,root,755)
303 %{_libdir}/%{name}-devel
304 %{_includedir}/%{name}
305 %{_aclocaldir}/dovecot.m4