]>
Commit | Line | Data |
---|---|---|
6865becd JB |
1 | # |
2 | # Conditional build: | |
3ee251c0 | 3 | %bcond_without gssapi # without GSSAPI support |
f4230487 JB |
4 | %bcond_without ldap # without LDAP auth |
5 | %bcond_without mysql # without MySQL auth | |
6 | %bcond_without pgsql # without PostgreSQL auth | |
b60b3e8a | 7 | %bcond_without sqlite # without SQLite3 auth |
f4230487 | 8 | %bcond_without sasl # without SASL auth |
8e04a4c1 | 9 | |
b8f6d56a | 10 | Summary: IMAP and POP3 server written with security primarily in mind |
7ad305a6 | 11 | Summary(pl.UTF-8): Serwer IMAP i POP3 pisany głównie z myślą o bezpieczeństwie |
b8f6d56a | 12 | Name: dovecot |
4abf65a9 | 13 | Version: 2.0.6 |
719134cd | 14 | Release: 4 |
660b9616 | 15 | Epoch: 1 |
ba932ed4 | 16 | License: MIT (libraries), LGPL v2.1 (the rest) |
b8f6d56a | 17 | Group: Networking/Daemons |
301d0b92 | 18 | Source0: http://dovecot.org/releases/2.0/%{name}-%{version}.tar.gz |
4abf65a9 | 19 | # Source0-md5: 6226485f95def28ecb4ff8fc52915762 |
8d47df47 TO |
20 | Source1: %{name}.pamd |
21 | Source2: %{name}.init | |
22 | Source3: %{name}.sysconfig | |
23 | Patch0: %{name}-config.patch | |
027cb77c | 24 | URL: http://dovecot.org/ |
0928494a JB |
25 | BuildRequires: autoconf |
26 | BuildRequires: automake | |
d9e4e4b3 | 27 | BuildRequires: bzip2-devel |
f4230487 | 28 | %{?with_sasl:BuildRequires: cyrus-sasl-devel >= 2.0} |
b7e03084 | 29 | BuildRequires: gettext-devel |
1ab66923 | 30 | %{?with_gssapi:BuildRequires: heimdal-devel} |
d9e4e4b3 | 31 | BuildRequires: libcap-devel |
0928494a | 32 | BuildRequires: libtool |
f4230487 | 33 | %{?with_mysql:BuildRequires: mysql-devel} |
2e75e92c | 34 | %{?with_ldap:BuildRequires: openldap-devel >= 2.3.3} |
6ceb4d17 | 35 | BuildRequires: openssl-devel >= 0.9.7d |
6865becd | 36 | BuildRequires: pam-devel |
b7e03084 | 37 | BuildRequires: pkgconfig |
f4230487 | 38 | %{?with_pgsql:BuildRequires: postgresql-devel} |
930a78ad | 39 | BuildRequires: sed >= 4.0 |
a0260ad9 | 40 | %{?with_sqlite:BuildRequires: sqlite3-devel} |
d9e4e4b3 | 41 | BuildRequires: zlib-devel |
8d47df47 | 42 | Requires(post,preun): /sbin/chkconfig |
c1df1ed1 KK |
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 | |
55a8e7e1 | 49 | Requires: %{name} = %{epoch}:%{version}-%{release} |
50c4e802 | 50 | Requires: pam >= 0.79.0 |
c1df1ed1 | 51 | Provides: group(dovecot) |
8d47df47 | 52 | Provides: imapdaemon |
660b9616 | 53 | Provides: user(dovecot) |
b8f6d56a JB |
54 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
55 | ||
4bf55e2e JR |
56 | %define no_install_post_check_so 1 |
57 | ||
b8f6d56a JB |
58 | %description |
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 | |
62 | pitfalls. | |
63 | ||
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. | |
68 | ||
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. | |
72 | ||
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 | |
8d47df47 TO |
75 | mailbox, Dovecot can get most of the wanted information from index |
76 | with little effort. | |
b8f6d56a JB |
77 | |
78 | Status: | |
ddfebb5d | 79 | - should be quite ready for use with normal IMAP clients |
3fcc147b KK |
80 | - complete IMAP4rev1 and POP3 support |
81 | - supports THREAD, SORT and IDLE extensions, required by many IMAP | |
82 | webmails | |
83 | - complete TLS/SSL support | |
ddfebb5d | 84 | - IPv6 ready |
85 | - shared mailboxes aren't yet supported | |
3fcc147b KK |
86 | - Maildir++ quota is supported, bad hard filesystem quota can be |
87 | problematic | |
b8f6d56a | 88 | |
db6f7644 JR |
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 | |
93 | pułapek. | |
0928494a | 94 | |
db6f7644 JR |
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. | |
0928494a | 99 | |
db6f7644 JR |
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 | |
103 | zmieniać. | |
0928494a | 104 | |
db6f7644 | 105 | Dovecot powinien być w miarę szybki, głównie z powodu plików |
0928494a | 106 | indeksowych utrzymywanych przez serwer; zamiast potrzeby skanowania |
db6f7644 JR |
107 | wszystkich danych w skrzynce, Dovecot może małym kosztem uzyskać |
108 | większość potrzebnych informacji z indeksu. | |
0928494a JB |
109 | |
110 | Stan: | |
db6f7644 JR |
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 | |
3fcc147b | 114 | webmaili IMAP |
db6f7644 JR |
115 | - obsługa IPv6 |
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 | |
0928494a | 119 | |
ee9bfb11 | 120 | %package devel |
f4f4ea9e | 121 | Summary: Development package for Dovecot plugins |
122 | Summary(pl.UTF-8): Pakiet programistyczny do tworzenia wtyczek dla Dovecota | |
1f7b33f9 | 123 | Group: Development/Libraries |
7fbaf96b | 124 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} |
ee9bfb11 JS |
125 | |
126 | %description devel | |
f4f4ea9e | 127 | Development package for Dovecot plugins. |
d3be9b82 JB |
128 | |
129 | %description devel -l pl.UTF-8 | |
f4f4ea9e | 130 | Pakiet programistyczny do tworzenia wtyczek dla Dovecota. |
ee9bfb11 | 131 | |
7fbaf96b | 132 | %package libs |
133 | Summary: Dovecot shared libraries | |
134 | Summary(pl.UTF-8): Współdzielone biblioteki Dovecota | |
135 | Group: Development/Libraries | |
7fbaf96b | 136 | |
cd10b3e9 | 137 | %description libs |
7fbaf96b | 138 | Dovecot shared libraries. |
139 | ||
cd10b3e9 | 140 | %description libs -l pl.UTF-8 |
7fbaf96b | 141 | Współdzielone biblioteki Dovecota. |
142 | ||
b8f6d56a JB |
143 | %prep |
144 | %setup -q | |
8d47df47 | 145 | %patch0 -p1 |
77217d94 | 146 | |
301d0b92 | 147 | %{__sed} -i 's,/usr/lib/dovecot,%{_libdir}/dovecot,g' doc/example-config/*.conf doc/example-config/conf.d/*.conf |
b8f6d56a JB |
148 | |
149 | %build | |
06cf0ac5 | 150 | touch config.rpath |
b8f6d56a | 151 | %{__libtoolize} |
bcf4891d | 152 | %{__aclocal} -I . |
b8f6d56a JB |
153 | %{__autoconf} |
154 | %{__autoheader} | |
155 | %{__automake} | |
6865becd | 156 | %configure \ |
ba932ed4 | 157 | --disable-static \ |
6865becd | 158 | %{?debug:--enable-debug} \ |
3082a74f | 159 | %{?with_ldap:--with-ldap=yes} \ |
f4230487 JB |
160 | %{?with_mysql:--with-mysql} \ |
161 | %{?with_pgsql:--with-pgsql} \ | |
a0260ad9 | 162 | %{?with_sqlite:--with-sqlite} \ |
ff3fede5 AM |
163 | %{?with_gssapi:--with-gssapi=plugin} \ |
164 | --with-sql=plugin \ | |
165 | --with-pam \ | |
d9e4e4b3 AM |
166 | --with-zlib \ |
167 | --with-bzlib \ | |
168 | --with-libcap \ | |
6865becd | 169 | --with-ssl=openssl \ |
d3f43412 | 170 | --with-moduledir=%{_libdir}/%{name}/plugins \ |
d9e4e4b3 | 171 | --with-ssldir=/var/lib/openssl \ |
8e04a4c1 | 172 | --sysconfdir=%{_sysconfdir} |
b8f6d56a JB |
173 | |
174 | %{__make} | |
175 | ||
176 | %install | |
177 | rm -rf $RPM_BUILD_ROOT | |
8d47df47 | 178 | install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,sysconfig,security} |
e7291b43 | 179 | install -d $RPM_BUILD_ROOT{/var/lib/dovecot,/var/run/dovecot/login} |
b8f6d56a JB |
180 | |
181 | %{__make} install \ | |
182 | DESTDIR=$RPM_BUILD_ROOT | |
183 | ||
d3f43412 | 184 | mv -f $RPM_BUILD_ROOT%{_datadir}/doc/%{name}/example-config/* $RPM_BUILD_ROOT%{_sysconfdir}/dovecot |
b8f6d56a | 185 | |
8e04a4c1 ER |
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} | |
8d47df47 TO |
189 | |
190 | touch $RPM_BUILD_ROOT/etc/security/blacklist.imap | |
191 | ||
4aef4380 | 192 | find $RPM_BUILD_ROOT%{_libdir}/%{name} -name '*.la' | xargs rm |
bb75c55c | 193 | |
7034c8c5 | 194 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/dovecot-config $RPM_BUILD_ROOT%{_libdir}/%{name}-devel |
1f7b33f9 | 195 | |
b927351c CM |
196 | rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name} |
197 | rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/README | |
1f7b33f9 | 198 | |
b8f6d56a JB |
199 | %clean |
200 | rm -rf $RPM_BUILD_ROOT | |
201 | ||
c1df1ed1 KK |
202 | %pre |
203 | %groupadd -g 172 dovecot | |
204 | %useradd -u 172 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovecot dovecot | |
74a997c5 AM |
205 | %groupadd -g 254 dovenull |
206 | %useradd -u 254 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovenull dovenull | |
c1df1ed1 | 207 | |
8d47df47 TO |
208 | %post |
209 | /sbin/chkconfig --add dovecot | |
09be404c | 210 | %service dovecot reload |
8d47df47 TO |
211 | |
212 | %preun | |
213 | if [ "$1" = "0" ]; then | |
65d55d28 | 214 | %service dovecot stop |
8d47df47 TO |
215 | /sbin/chkconfig --del dovecot |
216 | fi | |
217 | ||
c1df1ed1 KK |
218 | %postun |
219 | if [ "$1" = "0" ]; then | |
220 | %userremove dovecot | |
221 | %groupremove dovecot | |
74a997c5 AM |
222 | %userremove dovenull |
223 | %groupremove dovenull | |
c1df1ed1 KK |
224 | fi |
225 | ||
bc5d3bcd AM |
226 | %post libs -p /sbin/ldconfig |
227 | %postun libs -p /sbin/ldconfig | |
228 | ||
28c2da72 JR |
229 | %triggerpostun -- dovecot < 1:2.0.0 |
230 | # upgrading dovecot < 1.1 | |
fdaf3880 PG |
231 | echo "Configuration change default_mail_env -> mail_location" |
232 | %{__sed} -i -e "s/^default_mail_env/mail_location/" /etc/dovecot/dovecot.conf | |
28c2da72 | 233 | # upgrading dovecot < 2.0 |
b897a7bd | 234 | i=0 |
687a6849 AM |
235 | for a in /etc/dovecot/dovecot-db-example.conf \ |
236 | /etc/dovecot/dovecot-dict-sql-example.conf \ | |
237 | /etc/dovecot/dovecot-ldap-example.conf \ | |
238 | /etc/dovecot/dovecot-sql-example.conf \ | |
239 | /etc/dovecot/dovecot.conf; do | |
240 | if [ -f "$a" ]; then | |
b897a7bd AM |
241 | [ "$i" -eq 0 ] && echo "Read http://wiki2.dovecot.org/Upgrading/2.0" |
242 | i=1 | |
687a6849 | 243 | echo "Trying to migrate $a config file to dovecot 2." |
8c43f42b | 244 | cp -a "$a" "$a-1.2.org" |
d31b09de AM |
245 | :> "$a.log" |
246 | chmod 600 "$a.log" | |
8c43f42b | 247 | # convert config and prefix stderr lines with # |
d31b09de | 248 | %{_bindir}/doveconf -n -c "$a-1.2.org" > "$a" 2> "$a.log" || : |
687a6849 AM |
249 | fi |
250 | done | |
8c43f42b AM |
251 | if [ "$i" -eq 1 ]; then |
252 | echo "Please verify contents of %{_sysconfdir}/%{name}/* files." | |
253 | fi | |
fdaf3880 | 254 | |
b8f6d56a JB |
255 | %files |
256 | %defattr(644,root,root,755) | |
257 | # COPYING contains some notes, not actual LGPL text | |
caf88cd1 | 258 | %doc AUTHORS COPYING ChangeLog NEWS README TODO doc/*.txt doc/*.c*f doc/wiki/*.txt |
bb75c55c AM |
259 | %attr(755,root,root) %{_bindir}/doveadm |
260 | %attr(755,root,root) %{_bindir}/doveconf | |
261 | %attr(755,root,root) %{_bindir}/dsync | |
8d47df47 | 262 | %attr(755,root,root) %{_sbindir}/%{name} |
15872051 | 263 | %attr(751,root,root) %dir %{_sysconfdir}/%{name} |
c19c6ee3 | 264 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf |
bb75c55c AM |
265 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.ext |
266 | %attr(751,root,root) %dir %{_sysconfdir}/%{name}/conf.d | |
267 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/conf.d/*.conf | |
268 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/conf.d/*.ext | |
c5c6a170 | 269 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/%{name} |
270 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.imap | |
271 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} | |
8d47df47 | 272 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
bb75c55c AM |
273 | %attr(755,root,root) %{_libdir}/%{name}/anvil |
274 | %attr(755,root,root) %{_libdir}/%{name}/auth | |
ee9bfb11 | 275 | %attr(755,root,root) %{_libdir}/%{name}/checkpassword-reply |
bb75c55c | 276 | %attr(755,root,root) %{_libdir}/%{name}/config |
ee9bfb11 JS |
277 | %attr(755,root,root) %{_libdir}/%{name}/deliver |
278 | %attr(755,root,root) %{_libdir}/%{name}/dict | |
bb75c55c AM |
279 | %attr(755,root,root) %{_libdir}/%{name}/director |
280 | %attr(755,root,root) %{_libdir}/%{name}/dns-client | |
281 | %attr(755,root,root) %{_libdir}/%{name}/doveadm-server | |
282 | %attr(755,root,root) %{_libdir}/%{name}/dovecot-lda | |
ee9bfb11 | 283 | %attr(755,root,root) %{_libdir}/%{name}/gdbhelper |
ee9bfb11 JS |
284 | %attr(755,root,root) %{_libdir}/%{name}/imap |
285 | %attr(755,root,root) %{_libdir}/%{name}/imap-login | |
edd42453 | 286 | %attr(755,root,root) %{_libdir}/%{name}/listview |
bb75c55c AM |
287 | %attr(755,root,root) %{_libdir}/%{name}/lmtp |
288 | %attr(755,root,root) %{_libdir}/%{name}/log | |
77ad1fc7 | 289 | %attr(755,root,root) %{_libdir}/%{name}/maildirlock |
ee9bfb11 JS |
290 | %attr(755,root,root) %{_libdir}/%{name}/pop3 |
291 | %attr(755,root,root) %{_libdir}/%{name}/pop3-login | |
292 | %attr(755,root,root) %{_libdir}/%{name}/rawlog | |
bb75c55c AM |
293 | %attr(755,root,root) %{_libdir}/%{name}/script |
294 | %attr(755,root,root) %{_libdir}/%{name}/script-login | |
295 | %attr(755,root,root) %{_libdir}/%{name}/ssl-params | |
d3be9b82 | 296 | %dir %{_libdir}/%{name}/plugins |
ee9bfb11 | 297 | %attr(755,root,root) %{_libdir}/%{name}/plugins/*.so |
ff3fede5 | 298 | %dir %{_libdir}/%{name}/plugins/auth |
8e04a4c1 | 299 | %attr(755,root,root) %{_libdir}/%{name}/plugins/auth/*.so |
ff3fede5 | 300 | %dir %{_libdir}/%{name}/plugins/dict |
8e04a4c1 | 301 | %attr(755,root,root) %{_libdir}/%{name}/plugins/dict/*.so |
bb75c55c | 302 | %dir %{_libdir}/%{name}/plugins/doveadm |
8e04a4c1 | 303 | %attr(755,root,root) %{_libdir}/%{name}/plugins/doveadm/*.so |
e7291b43 | 304 | %dir /var/lib/dovecot |
c1df1ed1 | 305 | %dir /var/run/dovecot |
aade0d64 | 306 | %attr(750,root,dovenull) %dir /var/run/dovecot/login |
ee9bfb11 | 307 | |
bb75c55c AM |
308 | %{_mandir}/man1/deliver.1* |
309 | %{_mandir}/man1/dove*.1* | |
310 | %{_mandir}/man1/dsync.1* | |
311 | %{_mandir}/man7/doveadm-search-query.7* | |
312 | ||
ee9bfb11 JS |
313 | %files devel |
314 | %defattr(644,root,root,755) | |
8e04a4c1 ER |
315 | %attr(755,root,root) %{_libdir}/%{name}/libdovecot.so |
316 | %attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so | |
317 | %attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so | |
318 | %attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so | |
ba932ed4 | 319 | %{_libdir}/%{name}-devel |
ee9bfb11 | 320 | %{_includedir}/%{name} |
bb75c55c | 321 | %{_aclocaldir}/dovecot.m4 |
7fbaf96b | 322 | |
323 | %files libs | |
324 | %defattr(644,root,root,755) | |
325 | %dir %{_libdir}/%{name} | |
8e04a4c1 ER |
326 | %attr(755,root,root) %{_libdir}/%{name}/libdovecot.so.0.0.0 |
327 | %attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so.0.0.0 | |
328 | %attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so.0.0.0 | |
329 | %attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so.0.0.0 | |
330 | # Note: we are in %{_libdir}/dovecot, ldconfig does not look into this | |
96e29b16 | 331 | # directory. This is why the following files are not %ghost |
8e04a4c1 ER |
332 | %attr(755,root,root) %{_libdir}/%{name}/libdovecot.so.0 |
333 | %attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so.0 | |
334 | %attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so.0 | |
335 | %attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so.0 |