]>
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 |
6865becd | 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 |
62aa4933 | 13 | Version: 2.0.3 |
301d0b92 | 14 | Release: 0.1 |
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 |
62aa4933 | 19 | # Source0-md5: c0c72dd57071593ff3a6a452fcee6a03 |
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 | |
50c4e802 | 49 | Requires: pam >= 0.79.0 |
c1df1ed1 | 50 | Provides: group(dovecot) |
8d47df47 | 51 | Provides: imapdaemon |
660b9616 | 52 | Provides: user(dovecot) |
b8f6d56a JB |
53 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
54 | ||
55 | %description | |
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 | |
59 | pitfalls. | |
60 | ||
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. | |
65 | ||
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. | |
69 | ||
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 | |
8d47df47 TO |
72 | mailbox, Dovecot can get most of the wanted information from index |
73 | with little effort. | |
b8f6d56a JB |
74 | |
75 | Status: | |
ddfebb5d | 76 | - should be quite ready for use with normal IMAP clients |
3fcc147b KK |
77 | - complete IMAP4rev1 and POP3 support |
78 | - supports THREAD, SORT and IDLE extensions, required by many IMAP | |
79 | webmails | |
80 | - complete TLS/SSL support | |
ddfebb5d | 81 | - IPv6 ready |
82 | - shared mailboxes aren't yet supported | |
3fcc147b KK |
83 | - Maildir++ quota is supported, bad hard filesystem quota can be |
84 | problematic | |
b8f6d56a | 85 | |
db6f7644 JR |
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 | |
90 | pułapek. | |
0928494a | 91 | |
db6f7644 JR |
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. | |
0928494a | 96 | |
db6f7644 JR |
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 | |
100 | zmieniać. | |
0928494a | 101 | |
db6f7644 | 102 | Dovecot powinien być w miarę szybki, głównie z powodu plików |
0928494a | 103 | indeksowych utrzymywanych przez serwer; zamiast potrzeby skanowania |
db6f7644 JR |
104 | wszystkich danych w skrzynce, Dovecot może małym kosztem uzyskać |
105 | większość potrzebnych informacji z indeksu. | |
0928494a JB |
106 | |
107 | Stan: | |
db6f7644 JR |
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 | |
3fcc147b | 111 | webmaili IMAP |
db6f7644 JR |
112 | - obsługa IPv6 |
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 | |
0928494a | 116 | |
ee9bfb11 | 117 | %package devel |
d3be9b82 JB |
118 | Summary: Development package for dovecot plugins |
119 | Summary(pl.UTF-8): Pakiet programistyczny do tworzenia wtyczek dla dovecota | |
1f7b33f9 | 120 | Group: Development/Libraries |
e208bc1e | 121 | # doesn't require base |
ee9bfb11 JS |
122 | |
123 | %description devel | |
d3be9b82 JB |
124 | Development package for dovecot plugins. |
125 | ||
126 | %description devel -l pl.UTF-8 | |
127 | Pakiet programistyczny do tworzenia wtyczek dla dovecota. | |
ee9bfb11 | 128 | |
b8f6d56a JB |
129 | %prep |
130 | %setup -q | |
8d47df47 | 131 | %patch0 -p1 |
77217d94 | 132 | |
301d0b92 | 133 | %{__sed} -i 's,/usr/lib/dovecot,%{_libdir}/dovecot,g' doc/example-config/*.conf doc/example-config/conf.d/*.conf |
b8f6d56a JB |
134 | |
135 | %build | |
06cf0ac5 | 136 | touch config.rpath |
b8f6d56a | 137 | %{__libtoolize} |
bcf4891d | 138 | %{__aclocal} -I . |
b8f6d56a JB |
139 | %{__autoconf} |
140 | %{__autoheader} | |
141 | %{__automake} | |
6865becd | 142 | %configure \ |
ba932ed4 | 143 | --disable-static \ |
6865becd | 144 | %{?debug:--enable-debug} \ |
3082a74f | 145 | %{?with_ldap:--with-ldap=yes} \ |
f4230487 JB |
146 | %{?with_mysql:--with-mysql} \ |
147 | %{?with_pgsql:--with-pgsql} \ | |
a0260ad9 | 148 | %{?with_sqlite:--with-sqlite} \ |
ff3fede5 AM |
149 | %{?with_gssapi:--with-gssapi=plugin} \ |
150 | --with-sql=plugin \ | |
151 | --with-pam \ | |
d9e4e4b3 AM |
152 | --with-zlib \ |
153 | --with-bzlib \ | |
154 | --with-libcap \ | |
6865becd | 155 | --with-ssl=openssl \ |
d3f43412 | 156 | --with-moduledir=%{_libdir}/%{name}/plugins \ |
d9e4e4b3 | 157 | --with-ssldir=/var/lib/openssl \ |
ff3fede5 | 158 | --sysconfdir=/etc |
b8f6d56a JB |
159 | |
160 | %{__make} | |
161 | ||
162 | %install | |
163 | rm -rf $RPM_BUILD_ROOT | |
8d47df47 | 164 | install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,sysconfig,security} |
e7291b43 | 165 | install -d $RPM_BUILD_ROOT{/var/lib/dovecot,/var/run/dovecot/login} |
b8f6d56a JB |
166 | |
167 | %{__make} install \ | |
168 | DESTDIR=$RPM_BUILD_ROOT | |
169 | ||
d3f43412 | 170 | mv -f $RPM_BUILD_ROOT%{_datadir}/doc/%{name}/example-config/* $RPM_BUILD_ROOT%{_sysconfdir}/dovecot |
b8f6d56a | 171 | |
8d47df47 TO |
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} | |
175 | ||
176 | touch $RPM_BUILD_ROOT/etc/security/blacklist.imap | |
177 | ||
bb75c55c AM |
178 | rm $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins{,/*}/*.la |
179 | ||
7034c8c5 | 180 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/dovecot-config $RPM_BUILD_ROOT%{_libdir}/%{name}-devel |
1f7b33f9 | 181 | |
bb75c55c | 182 | rm -r $RPM_BUILD_ROOT%{_docdir}/%{name} |
1f7b33f9 | 183 | |
b8f6d56a JB |
184 | %clean |
185 | rm -rf $RPM_BUILD_ROOT | |
186 | ||
c1df1ed1 KK |
187 | %pre |
188 | %groupadd -g 172 dovecot | |
189 | %useradd -u 172 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovecot dovecot | |
74a997c5 AM |
190 | %groupadd -g 254 dovenull |
191 | %useradd -u 254 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovenull dovenull | |
c1df1ed1 | 192 | |
8d47df47 TO |
193 | %post |
194 | /sbin/chkconfig --add dovecot | |
195 | if [ -f /var/lock/subsys/dovecot ]; then | |
196 | /etc/rc.d/init.d/dovecot restart >&2 | |
197 | else | |
198 | echo "Run \"/etc/rc.d/init.d/dovecot start\" to start dovecot daemon." | |
199 | fi | |
200 | ||
201 | %preun | |
202 | if [ "$1" = "0" ]; then | |
203 | if [ -f /var/lock/subsys/dovecot ]; then | |
204 | /etc/rc.d/init.d/dovecot stop >&2 | |
205 | fi | |
206 | /sbin/chkconfig --del dovecot | |
207 | fi | |
208 | ||
c1df1ed1 KK |
209 | %postun |
210 | if [ "$1" = "0" ]; then | |
211 | %userremove dovecot | |
212 | %groupremove dovecot | |
74a997c5 AM |
213 | %userremove dovenull |
214 | %groupremove dovenull | |
c1df1ed1 KK |
215 | fi |
216 | ||
fdaf3880 PG |
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 | |
687a6849 AM |
220 | |
221 | %triggerpostun -- dovecot < 1:2.0.0 | |
b897a7bd | 222 | i=0 |
687a6849 AM |
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 | |
228 | if [ -f "$a" ]; then | |
b897a7bd AM |
229 | [ "$i" -eq 0 ] && echo "Read http://wiki2.dovecot.org/Upgrading/2.0" |
230 | i=1 | |
687a6849 AM |
231 | echo "Trying to migrate $a config file to dovecot 2." |
232 | cp -a "$a" "$a-1.2.org" | |
b897a7bd | 233 | %{_bindir}/doveconf -n -c "$a-1.2.org" > "$a" |
687a6849 AM |
234 | fi |
235 | done | |
fdaf3880 | 236 | |
b8f6d56a JB |
237 | %files |
238 | %defattr(644,root,root,755) | |
239 | # COPYING contains some notes, not actual LGPL text | |
caf88cd1 | 240 | %doc AUTHORS COPYING ChangeLog NEWS README TODO doc/*.txt doc/*.c*f doc/wiki/*.txt |
bb75c55c AM |
241 | %attr(755,root,root) %{_bindir}/doveadm |
242 | %attr(755,root,root) %{_bindir}/doveconf | |
243 | %attr(755,root,root) %{_bindir}/dsync | |
8d47df47 | 244 | %attr(755,root,root) %{_sbindir}/%{name} |
15872051 | 245 | %attr(751,root,root) %dir %{_sysconfdir}/%{name} |
c19c6ee3 | 246 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf |
bb75c55c AM |
247 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.ext |
248 | %attr(751,root,root) %dir %{_sysconfdir}/%{name}/conf.d | |
249 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/conf.d/*.conf | |
250 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/conf.d/*.ext | |
c5c6a170 | 251 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/%{name} |
252 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.imap | |
253 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} | |
8d47df47 | 254 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
d3be9b82 | 255 | %dir %{_libdir}/%{name} |
bb75c55c AM |
256 | %attr(755,root,root) %{_libdir}/%{name}/anvil |
257 | %attr(755,root,root) %{_libdir}/%{name}/auth | |
ee9bfb11 | 258 | %attr(755,root,root) %{_libdir}/%{name}/checkpassword-reply |
bb75c55c | 259 | %attr(755,root,root) %{_libdir}/%{name}/config |
ee9bfb11 JS |
260 | %attr(755,root,root) %{_libdir}/%{name}/deliver |
261 | %attr(755,root,root) %{_libdir}/%{name}/dict | |
bb75c55c AM |
262 | %attr(755,root,root) %{_libdir}/%{name}/director |
263 | %attr(755,root,root) %{_libdir}/%{name}/dns-client | |
264 | %attr(755,root,root) %{_libdir}/%{name}/doveadm-server | |
265 | %attr(755,root,root) %{_libdir}/%{name}/dovecot-lda | |
ee9bfb11 | 266 | %attr(755,root,root) %{_libdir}/%{name}/gdbhelper |
ee9bfb11 JS |
267 | %attr(755,root,root) %{_libdir}/%{name}/imap |
268 | %attr(755,root,root) %{_libdir}/%{name}/imap-login | |
edd42453 | 269 | %attr(755,root,root) %{_libdir}/%{name}/listview |
bb75c55c AM |
270 | %attr(755,root,root) %{_libdir}/%{name}/lmtp |
271 | %attr(755,root,root) %{_libdir}/%{name}/log | |
77ad1fc7 | 272 | %attr(755,root,root) %{_libdir}/%{name}/maildirlock |
ee9bfb11 JS |
273 | %attr(755,root,root) %{_libdir}/%{name}/pop3 |
274 | %attr(755,root,root) %{_libdir}/%{name}/pop3-login | |
275 | %attr(755,root,root) %{_libdir}/%{name}/rawlog | |
bb75c55c AM |
276 | %attr(755,root,root) %{_libdir}/%{name}/script |
277 | %attr(755,root,root) %{_libdir}/%{name}/script-login | |
278 | %attr(755,root,root) %{_libdir}/%{name}/ssl-params | |
279 | %attr(755,root,root)%{_libdir}/%{name}/lib*.so* | |
d3be9b82 | 280 | %dir %{_libdir}/%{name}/plugins |
ee9bfb11 | 281 | %attr(755,root,root) %{_libdir}/%{name}/plugins/*.so |
ff3fede5 AM |
282 | %dir %{_libdir}/%{name}/plugins/auth |
283 | %attr(755,root,root)%{_libdir}/%{name}/plugins/auth/*.so | |
284 | %dir %{_libdir}/%{name}/plugins/dict | |
285 | %attr(755,root,root)%{_libdir}/%{name}/plugins/dict/*.so | |
bb75c55c AM |
286 | %dir %{_libdir}/%{name}/plugins/doveadm |
287 | %attr(755,root,root)%{_libdir}/%{name}/plugins/doveadm/*.so | |
e7291b43 | 288 | %dir /var/lib/dovecot |
c1df1ed1 | 289 | %dir /var/run/dovecot |
aade0d64 | 290 | %attr(750,root,dovenull) %dir /var/run/dovecot/login |
ee9bfb11 | 291 | |
bb75c55c AM |
292 | %{_mandir}/man1/deliver.1* |
293 | %{_mandir}/man1/dove*.1* | |
294 | %{_mandir}/man1/dsync.1* | |
295 | %{_mandir}/man7/doveadm-search-query.7* | |
296 | ||
ee9bfb11 JS |
297 | %files devel |
298 | %defattr(644,root,root,755) | |
ba932ed4 | 299 | %{_libdir}/%{name}-devel |
ee9bfb11 | 300 | %{_includedir}/%{name} |
bb75c55c | 301 | %{_aclocaldir}/dovecot.m4 |