]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_with gssapi # with 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 | |
9 | # | |
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 | |
12 | Name: dovecot | |
13 | Version: 1.2.7 | |
14 | Release: 1 | |
15 | Epoch: 1 | |
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: 76e82536fc7010770acd9f969f845b79 | |
20 | Source1: %{name}.pamd | |
21 | Source2: %{name}.init | |
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: findutils | |
30 | BuildRequires: gettext-devel | |
31 | %{?with_gssapi:BuildRequires: heimdal-devel} | |
32 | BuildRequires: libcap-devel | |
33 | BuildRequires: libtool | |
34 | %{?with_mysql:BuildRequires: mysql-devel} | |
35 | %{?with_ldap:BuildRequires: openldap-devel >= 2.3.3} | |
36 | BuildRequires: openssl-devel >= 0.9.7d | |
37 | BuildRequires: pam-devel | |
38 | BuildRequires: pkgconfig | |
39 | %{?with_pgsql:BuildRequires: postgresql-devel} | |
40 | BuildRequires: sed >= 4.0 | |
41 | %{?with_sqlite:BuildRequires: sqlite3-devel} | |
42 | BuildRequires: zlib-devel | |
43 | Requires(post,preun): /sbin/chkconfig | |
44 | Requires(postun): /usr/sbin/groupdel | |
45 | Requires(postun): /usr/sbin/userdel | |
46 | Requires(pre): /bin/id | |
47 | Requires(pre): /usr/bin/getgid | |
48 | Requires(pre): /usr/sbin/groupadd | |
49 | Requires(pre): /usr/sbin/useradd | |
50 | Requires: pam >= 0.79.0 | |
51 | Provides: group(dovecot) | |
52 | Provides: imapdaemon | |
53 | Provides: user(dovecot) | |
54 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
55 | ||
56 | %description | |
57 | Dovecot is an IMAP and POP3 server for Linux/UNIX-like systems, | |
58 | written with security primarily in mind. Although it's written with C, | |
59 | it uses several coding techniques to avoid most of the common | |
60 | pitfalls. | |
61 | ||
62 | Dovecot can work with standard mbox and maildir formats and it's fully | |
63 | compatible with UW-IMAP and Courier IMAP servers as well as mail | |
64 | clients accessing the mailboxes directly. It's also planned to support | |
65 | storing mails in SQL databases. | |
66 | ||
67 | Dovecot is easy to set up and doesn't require special maintenance. | |
68 | Only thing you need is to get the authentication working properly - if | |
69 | your users are in /etc/passwd there's hardly anything you have to do. | |
70 | ||
71 | Dovecot should be pretty fast, mostly because of index files that | |
72 | Dovecot maintains; instead of having to scan through all the data in | |
73 | mailbox, Dovecot can get most of the wanted information from index | |
74 | with little effort. | |
75 | ||
76 | Status: | |
77 | - should be quite ready for use with normal IMAP clients | |
78 | - complete IMAP4rev1 and POP3 support | |
79 | - supports THREAD, SORT and IDLE extensions, required by many IMAP | |
80 | webmails | |
81 | - complete TLS/SSL support | |
82 | - IPv6 ready | |
83 | - shared mailboxes aren't yet supported | |
84 | - Maildir++ quota is supported, bad hard filesystem quota can be | |
85 | problematic | |
86 | ||
87 | %description -l pl.UTF-8 | |
88 | Dovecot to serwer IMAP i POP3 dla systemów linuksowych/uniksowych, | |
89 | pisany głównie z myślą o bezpieczeństwie. Chociaż jest pisany w C, | |
90 | używa kilku technik kodowania zapobiegających większości popularnych | |
91 | pułapek. | |
92 | ||
93 | Dovecot może działać ze standardowymi formatami mbox i maildir, jest | |
94 | całkowicie kompatybilny z serwerami UW-IMAP i Courier IMAP, a także z | |
95 | klientami pocztowymi bezpośrednio dostającymi się do skrzynek. | |
96 | Planowana jest także obsługa przechowywania listów w bazach SQL. | |
97 | ||
98 | Dovecot jest łatwy do skonfigurowania i nie wymaga specjalnego | |
99 | nadzoru. Wystarczy tylko doprowadzić do działania uwierzytelnianie - | |
100 | jeśli użytkownicy są w /etc/passwd, to właściwie nie trzeba nic | |
101 | zmieniać. | |
102 | ||
103 | Dovecot powinien być w miarę szybki, głównie z powodu plików | |
104 | indeksowych utrzymywanych przez serwer; zamiast potrzeby skanowania | |
105 | wszystkich danych w skrzynce, Dovecot może małym kosztem uzyskać | |
106 | większość potrzebnych informacji z indeksu. | |
107 | ||
108 | Stan: | |
109 | - powinien być gotowy do użycia ze zwykłymi klientami IMAP | |
110 | - pełna obsługa IMAP4rev1 i POP3 | |
111 | - obsługa rozszerzeń THREAD, SORT i IDLE, wymaganych przez wiele | |
112 | webmaili IMAP | |
113 | - obsługa IPv6 | |
114 | - pełna obsługa TLS/SSL | |
115 | - quota Maildir++ jest obsługiwana, ale twarda quota na systemach | |
116 | plików może być problematyczna | |
117 | ||
118 | %package devel | |
119 | Summary: Development package for dovecot plugins | |
120 | Summary(pl.UTF-8): Pakiet programistyczny do tworzenia wtyczek dla dovecota | |
121 | Group: Development/Libraries | |
122 | # doesn't require base | |
123 | ||
124 | %description devel | |
125 | Development package for dovecot plugins. | |
126 | ||
127 | %description devel -l pl.UTF-8 | |
128 | Pakiet programistyczny do tworzenia wtyczek dla dovecota. | |
129 | ||
130 | %prep | |
131 | %setup -q | |
132 | %patch0 -p1 | |
133 | ||
134 | %{__sed} -i 's,/usr/lib/dovecot,%{_libdir}/dovecot,g' dovecot-example.conf | |
135 | ||
136 | %build | |
137 | touch config.rpath | |
138 | %{__libtoolize} | |
139 | %{__aclocal} | |
140 | %{__autoconf} | |
141 | %{__autoheader} | |
142 | %{__automake} | |
143 | %configure \ | |
144 | --disable-static \ | |
145 | %{?debug:--enable-debug} \ | |
146 | --enable-header-install \ | |
147 | %{?with_ldap:--with-ldap=yes} \ | |
148 | %{?with_mysql:--with-mysql} \ | |
149 | %{?with_pgsql:--with-pgsql} \ | |
150 | %{?with_sqlite:--with-sqlite} \ | |
151 | %{?with_gssapi:--with-gssapi=plugin} \ | |
152 | --with-zlib \ | |
153 | --with-bzlib \ | |
154 | --with-libcap \ | |
155 | --with-ssl=openssl \ | |
156 | --with-ssldir=/var/lib/openssl \ | |
157 | --sysconfdir=/etc/%{name} | |
158 | ||
159 | %{__make} | |
160 | ||
161 | %install | |
162 | rm -rf $RPM_BUILD_ROOT | |
163 | install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,sysconfig,security} | |
164 | install -d $RPM_BUILD_ROOT{/var/lib/dovecot,/var/run/dovecot/login} | |
165 | ||
166 | %{__make} install \ | |
167 | moduledir=%{_libdir}/%{name}/plugins \ | |
168 | DESTDIR=$RPM_BUILD_ROOT | |
169 | ||
170 | mv -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{dovecot-example.conf,dovecot.conf} | |
171 | ||
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 | ||
178 | rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins{,/auth,/imap}/*.la | |
179 | ||
180 | # devel | |
181 | for folder in deliver imap lib lib-imap lib-mail lib-storage; do | |
182 | install -d $RPM_BUILD_ROOT%{_includedir}/%{name}/$folder | |
183 | install -p -m644 src/$folder/*.h $RPM_BUILD_ROOT%{_includedir}/%{name}/$folder/ | |
184 | done | |
185 | for dir in lib lib-auth lib-charset lib-imap lib-index lib-mail lib-storage; do | |
186 | for file in $(find src/$dir -name '*.a'); do | |
187 | install -D -m644 $file $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/$file | |
188 | done | |
189 | done | |
190 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/dovecot-config $RPM_BUILD_ROOT%{_libdir}/%{name}-devel | |
191 | ||
192 | rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name} | |
193 | ||
194 | %clean | |
195 | rm -rf $RPM_BUILD_ROOT | |
196 | ||
197 | %pre | |
198 | %groupadd -g 172 dovecot | |
199 | %useradd -u 172 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovecot dovecot | |
200 | ||
201 | %post | |
202 | /sbin/chkconfig --add dovecot | |
203 | if [ -f /var/lock/subsys/dovecot ]; then | |
204 | /etc/rc.d/init.d/dovecot restart >&2 | |
205 | else | |
206 | echo "Run \"/etc/rc.d/init.d/dovecot start\" to start dovecot daemon." | |
207 | fi | |
208 | ||
209 | %preun | |
210 | if [ "$1" = "0" ]; then | |
211 | if [ -f /var/lock/subsys/dovecot ]; then | |
212 | /etc/rc.d/init.d/dovecot stop >&2 | |
213 | fi | |
214 | /sbin/chkconfig --del dovecot | |
215 | fi | |
216 | ||
217 | %postun | |
218 | if [ "$1" = "0" ]; then | |
219 | %userremove dovecot | |
220 | %groupremove dovecot | |
221 | fi | |
222 | ||
223 | %triggerpostun -- dovecot < 1:1.1 | |
224 | echo "Configuration change default_mail_env -> mail_location" | |
225 | %{__sed} -i -e "s/^default_mail_env/mail_location/" /etc/dovecot/dovecot.conf | |
226 | ||
227 | %files | |
228 | %defattr(644,root,root,755) | |
229 | # COPYING contains some notes, not actual LGPL text | |
230 | %doc AUTHORS COPYING ChangeLog NEWS README TODO doc/*.txt doc/*.c*f doc/wiki/*.txt | |
231 | %attr(755,root,root) %{_sbindir}/%{name} | |
232 | %attr(755,root,root) %{_sbindir}/%{name}pw | |
233 | %attr(750,root,root) %dir %{_sysconfdir}/%{name} | |
234 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf | |
235 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}-db-example.conf | |
236 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}-dict-sql-example.conf | |
237 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}-ldap-example.conf | |
238 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}-sql-example.conf | |
239 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/%{name} | |
240 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.imap | |
241 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} | |
242 | %attr(754,root,root) /etc/rc.d/init.d/%{name} | |
243 | %dir %{_libdir}/%{name} | |
244 | %attr(755,root,root) %{_libdir}/%{name}/authtest | |
245 | %attr(755,root,root) %{_libdir}/%{name}/checkpassword-reply | |
246 | %attr(755,root,root) %{_libdir}/%{name}/deliver | |
247 | %attr(755,root,root) %{_libdir}/%{name}/dict | |
248 | %attr(755,root,root) %{_libdir}/%{name}/dovecot-auth | |
249 | %attr(755,root,root) %{_libdir}/%{name}/gdbhelper | |
250 | %attr(755,root,root) %{_libdir}/%{name}/idxview | |
251 | %attr(755,root,root) %{_libdir}/%{name}/imap | |
252 | %attr(755,root,root) %{_libdir}/%{name}/imap-login | |
253 | %attr(755,root,root) %{_libdir}/%{name}/imap-utf7 | |
254 | %attr(755,root,root) %{_libdir}/%{name}/convert-tool | |
255 | %attr(755,root,root) %{_libdir}/%{name}/expire-tool | |
256 | %attr(755,root,root) %{_libdir}/%{name}/listview | |
257 | %attr(755,root,root) %{_libdir}/%{name}/logview | |
258 | %attr(755,root,root) %{_libdir}/%{name}/maildirlock | |
259 | %attr(755,root,root) %{_libdir}/%{name}/pop3 | |
260 | %attr(755,root,root) %{_libdir}/%{name}/pop3-login | |
261 | %attr(755,root,root) %{_libdir}/%{name}/rawlog | |
262 | %attr(755,root,root) %{_libdir}/%{name}/ssl-build-param | |
263 | %attr(755,root,root) %{_libdir}/%{name}/threadview | |
264 | %dir %{_libdir}/%{name}/plugins | |
265 | %attr(755,root,root) %{_libdir}/%{name}/plugins/*.so | |
266 | #%dir %{_libdir}/%{name}/plugins/auth | |
267 | #%attr(755,root,root)%{_libdir}/%{name}/plugins/auth/*.so | |
268 | %dir %{_libdir}/%{name}/plugins/imap | |
269 | %attr(755,root,root)%{_libdir}/%{name}/plugins/imap/*.so | |
270 | %dir %{_libdir}/%{name}/plugins/lda | |
271 | %attr(755,root,root) %{_libdir}/%{name}/plugins/lda/*.so | |
272 | %dir %{_libdir}/%{name}/plugins/pop3 | |
273 | %attr(755,root,root) %{_libdir}/%{name}/plugins/pop3/*.so | |
274 | %dir /var/lib/dovecot | |
275 | %dir /var/run/dovecot | |
276 | %attr(750,root,dovecot) %dir /var/run/dovecot/login | |
277 | ||
278 | %files devel | |
279 | %defattr(644,root,root,755) | |
280 | %{_libdir}/%{name}-devel | |
281 | %{_includedir}/%{name} |