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/1.2/%{name}-%{version}.tar.gz
19 # Source0-md5: a2c01cb0a9c54302d0870fdc3e6d2106
22 Source3: %{name}.sysconfig
23 Source4: %{name}.tmpfiles
24 Patch0: %{name}-config.patch
25 Patch1: %{name}-build.patch
26 URL: http://dovecot.org/
27 BuildRequires: autoconf
28 BuildRequires: automake
29 BuildRequires: bzip2-devel
30 %{?with_sasl:BuildRequires: cyrus-sasl-devel >= 2.0}
31 BuildRequires: gettext-devel
32 %{?with_gssapi:BuildRequires: heimdal-devel}
33 BuildRequires: libcap-devel
34 BuildRequires: libtool
35 %{?with_mysql:BuildRequires: mysql-devel}
36 %{?with_ldap:BuildRequires: openldap-devel >= 2.3.3}
37 BuildRequires: openssl-devel >= 0.9.7d
38 BuildRequires: pam-devel
39 BuildRequires: pkgconfig
40 %{?with_pgsql:BuildRequires: postgresql-devel}
41 BuildRequires: sed >= 4.0
42 %{?with_sqlite:BuildRequires: sqlite3-devel}
43 BuildRequires: zlib-devel
44 Requires(post,preun): /sbin/chkconfig
45 Requires(postun): /usr/sbin/groupdel
46 Requires(postun): /usr/sbin/userdel
47 Requires(pre): /bin/id
48 Requires(pre): /usr/bin/getgid
49 Requires(pre): /usr/sbin/groupadd
50 Requires(pre): /usr/sbin/useradd
51 Requires: pam >= 0.79.0
52 Provides: group(dovecot)
54 Provides: user(dovecot)
55 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58 Dovecot is an IMAP and POP3 server for Linux/UNIX-like systems,
59 written with security primarily in mind. Although it's written with C,
60 it uses several coding techniques to avoid most of the common
63 Dovecot can work with standard mbox and maildir formats and it's fully
64 compatible with UW-IMAP and Courier IMAP servers as well as mail
65 clients accessing the mailboxes directly. It's also planned to support
66 storing mails in SQL databases.
68 Dovecot is easy to set up and doesn't require special maintenance.
69 Only thing you need is to get the authentication working properly - if
70 your users are in /etc/passwd there's hardly anything you have to do.
72 Dovecot should be pretty fast, mostly because of index files that
73 Dovecot maintains; instead of having to scan through all the data in
74 mailbox, Dovecot can get most of the wanted information from index
78 - should be quite ready for use with normal IMAP clients
79 - complete IMAP4rev1 and POP3 support
80 - supports THREAD, SORT and IDLE extensions, required by many IMAP
82 - complete TLS/SSL support
84 - shared mailboxes aren't yet supported
85 - Maildir++ quota is supported, bad hard filesystem quota can be
88 %description -l pl.UTF-8
89 Dovecot to serwer IMAP i POP3 dla systemów linuksowych/uniksowych,
90 pisany głównie z myślą o bezpieczeństwie. Chociaż jest pisany w C,
91 używa kilku technik kodowania zapobiegających większości popularnych
94 Dovecot może działać ze standardowymi formatami mbox i maildir, jest
95 całkowicie kompatybilny z serwerami UW-IMAP i Courier IMAP, a także z
96 klientami pocztowymi bezpośrednio dostającymi się do skrzynek.
97 Planowana jest także obsługa przechowywania listów w bazach SQL.
99 Dovecot jest łatwy do skonfigurowania i nie wymaga specjalnego
100 nadzoru. Wystarczy tylko doprowadzić do działania uwierzytelnianie -
101 jeśli użytkownicy są w /etc/passwd, to właściwie nie trzeba nic
104 Dovecot powinien być w miarę szybki, głównie z powodu plików
105 indeksowych utrzymywanych przez serwer; zamiast potrzeby skanowania
106 wszystkich danych w skrzynce, Dovecot może małym kosztem uzyskać
107 większość potrzebnych informacji z indeksu.
110 - powinien być gotowy do użycia ze zwykłymi klientami IMAP
111 - pełna obsługa IMAP4rev1 i POP3
112 - obsługa rozszerzeń THREAD, SORT i IDLE, wymaganych przez wiele
115 - pełna obsługa TLS/SSL
116 - quota Maildir++ jest obsługiwana, ale twarda quota na systemach
117 plików może być problematyczna
120 Summary: Development package for dovecot plugins
121 Summary(pl.UTF-8): Pakiet programistyczny do tworzenia wtyczek dla dovecota
122 Group: Development/Libraries
123 # doesn't require base
126 Development package for dovecot plugins.
128 %description devel -l pl.UTF-8
129 Pakiet programistyczny do tworzenia wtyczek dla dovecota.
136 %{__sed} -i 's,/usr/lib/dovecot,%{_libdir}/dovecot,g' dovecot-example.conf
147 %{?debug:--enable-debug} \
148 --enable-header-install \
149 %{?with_ldap:--with-ldap=yes} \
150 %{?with_mysql:--with-mysql} \
151 %{?with_pgsql:--with-pgsql} \
152 %{?with_sqlite:--with-sqlite} \
153 %{?with_gssapi:--with-gssapi} \
158 --with-ssldir=/var/lib/openssl \
159 --sysconfdir=/etc/%{name}
164 rm -rf $RPM_BUILD_ROOT
165 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,sysconfig,security} \
166 $RPM_BUILD_ROOT{/var/lib/dovecot,/var/run/dovecot/login} \
167 $RPM_BUILD_ROOT%{systemdtmpfilesdir}
170 moduledir=%{_libdir}/%{name}/plugins \
171 DESTDIR=$RPM_BUILD_ROOT
173 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{dovecot-example.conf,dovecot.conf}
175 install %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name}
176 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
177 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
178 install %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
180 touch $RPM_BUILD_ROOT/etc/security/blacklist.imap
182 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins{,/auth,/imap}/*.la
185 for folder in deliver imap lib lib-dict lib-imap lib-mail lib-storage; do
186 install -d $RPM_BUILD_ROOT%{_includedir}/%{name}/$folder
187 install -p -m644 src/$folder/*.h $RPM_BUILD_ROOT%{_includedir}/%{name}/$folder/
189 for dir in lib lib-auth lib-charset lib-dict lib-imap lib-index lib-mail lib-storage; do
190 for file in $(find src/$dir -name '*.a'); do
191 install -D -m644 $file $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/$file
194 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/dovecot-config $RPM_BUILD_ROOT%{_libdir}/%{name}-devel
196 rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
199 rm -rf $RPM_BUILD_ROOT
202 %groupadd -g 172 dovecot
203 %useradd -u 172 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovecot dovecot
206 /sbin/chkconfig --add dovecot
207 if [ -f /var/lock/subsys/dovecot ]; then
208 /etc/rc.d/init.d/dovecot restart >&2
210 echo "Run \"/etc/rc.d/init.d/dovecot start\" to start dovecot daemon."
214 if [ "$1" = "0" ]; then
215 if [ -f /var/lock/subsys/dovecot ]; then
216 /etc/rc.d/init.d/dovecot stop >&2
218 /sbin/chkconfig --del dovecot
222 if [ "$1" = "0" ]; then
227 %triggerpostun -- dovecot < 1:1.1
228 echo "Configuration change default_mail_env -> mail_location"
229 %{__sed} -i -e "s/^default_mail_env/mail_location/" /etc/dovecot/dovecot.conf
232 %defattr(644,root,root,755)
233 # COPYING contains some notes, not actual LGPL text
234 %doc AUTHORS COPYING ChangeLog NEWS README TODO doc/*.txt doc/*.c*f doc/wiki/*.txt
235 %attr(755,root,root) %{_sbindir}/%{name}
236 %attr(755,root,root) %{_sbindir}/%{name}pw
237 %attr(751,root,root) %dir %{_sysconfdir}/%{name}
238 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
239 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}-db-example.conf
240 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}-dict-sql-example.conf
241 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}-ldap-example.conf
242 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}-sql-example.conf
243 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/%{name}
244 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.imap
245 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
246 %attr(754,root,root) /etc/rc.d/init.d/%{name}
247 %dir %{_libdir}/%{name}
248 %attr(755,root,root) %{_libdir}/%{name}/authtest
249 %attr(755,root,root) %{_libdir}/%{name}/checkpassword-reply
250 %attr(755,root,root) %{_libdir}/%{name}/deliver
251 %attr(755,root,root) %{_libdir}/%{name}/dict
252 %attr(755,root,root) %{_libdir}/%{name}/dovecot-auth
253 %attr(755,root,root) %{_libdir}/%{name}/gdbhelper
254 %attr(755,root,root) %{_libdir}/%{name}/idxview
255 %attr(755,root,root) %{_libdir}/%{name}/imap
256 %attr(755,root,root) %{_libdir}/%{name}/imap-login
257 %attr(755,root,root) %{_libdir}/%{name}/imap-utf7
258 %attr(755,root,root) %{_libdir}/%{name}/convert-tool
259 %attr(755,root,root) %{_libdir}/%{name}/expire-tool
260 %attr(755,root,root) %{_libdir}/%{name}/listview
261 %attr(755,root,root) %{_libdir}/%{name}/logview
262 %attr(755,root,root) %{_libdir}/%{name}/maildirlock
263 %attr(755,root,root) %{_libdir}/%{name}/pop3
264 %attr(755,root,root) %{_libdir}/%{name}/pop3-login
265 %attr(755,root,root) %{_libdir}/%{name}/rawlog
266 %attr(755,root,root) %{_libdir}/%{name}/ssl-build-param
267 %attr(755,root,root) %{_libdir}/%{name}/threadview
268 %dir %{_libdir}/%{name}/plugins
269 %attr(755,root,root) %{_libdir}/%{name}/plugins/*.so
270 #%dir %{_libdir}/%{name}/plugins/auth
271 #%attr(755,root,root)%{_libdir}/%{name}/plugins/auth/*.so
272 %dir %{_libdir}/%{name}/plugins/imap
273 %attr(755,root,root)%{_libdir}/%{name}/plugins/imap/*.so
274 %dir %{_libdir}/%{name}/plugins/lda
275 %attr(755,root,root) %{_libdir}/%{name}/plugins/lda/*.so
276 %dir %{_libdir}/%{name}/plugins/pop3
277 %attr(755,root,root) %{_libdir}/%{name}/plugins/pop3/*.so
278 %{systemdtmpfilesdir}/%{name}.conf
279 %dir /var/lib/dovecot
280 %dir /var/run/dovecot
281 %attr(750,root,dovecot) %dir /var/run/dovecot/login
284 %defattr(644,root,root,755)
285 %{_libdir}/%{name}-devel
286 %{_includedir}/%{name}