]>
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 |
bb7f9dd8 | 13 | Version: 1.2.9 |
14 | Release: 1 | |
660b9616 | 15 | Epoch: 1 |
ba932ed4 | 16 | License: MIT (libraries), LGPL v2.1 (the rest) |
b8f6d56a | 17 | Group: Networking/Daemons |
d9e4e4b3 | 18 | Source0: http://dovecot.org/releases/1.2/%{name}-%{version}.tar.gz |
bb7f9dd8 | 19 | # Source0-md5: 036ff97fb248dae3bd4b796a0644634f |
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} |
400f2756 | 29 | BuildRequires: findutils |
b7e03084 | 30 | BuildRequires: gettext-devel |
1ab66923 | 31 | %{?with_gssapi:BuildRequires: heimdal-devel} |
d9e4e4b3 | 32 | BuildRequires: libcap-devel |
0928494a | 33 | BuildRequires: libtool |
f4230487 | 34 | %{?with_mysql:BuildRequires: mysql-devel} |
2e75e92c | 35 | %{?with_ldap:BuildRequires: openldap-devel >= 2.3.3} |
6ceb4d17 | 36 | BuildRequires: openssl-devel >= 0.9.7d |
6865becd | 37 | BuildRequires: pam-devel |
b7e03084 | 38 | BuildRequires: pkgconfig |
f4230487 | 39 | %{?with_pgsql:BuildRequires: postgresql-devel} |
930a78ad | 40 | BuildRequires: sed >= 4.0 |
a0260ad9 | 41 | %{?with_sqlite:BuildRequires: sqlite3-devel} |
d9e4e4b3 | 42 | BuildRequires: zlib-devel |
8d47df47 | 43 | Requires(post,preun): /sbin/chkconfig |
c1df1ed1 KK |
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 | |
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 | ||
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 | |
8d47df47 TO |
73 | mailbox, Dovecot can get most of the wanted information from index |
74 | with little effort. | |
b8f6d56a JB |
75 | |
76 | Status: | |
ddfebb5d | 77 | - should be quite ready for use with normal IMAP clients |
3fcc147b KK |
78 | - complete IMAP4rev1 and POP3 support |
79 | - supports THREAD, SORT and IDLE extensions, required by many IMAP | |
80 | webmails | |
81 | - complete TLS/SSL support | |
ddfebb5d | 82 | - IPv6 ready |
83 | - shared mailboxes aren't yet supported | |
3fcc147b KK |
84 | - Maildir++ quota is supported, bad hard filesystem quota can be |
85 | problematic | |
b8f6d56a | 86 | |
db6f7644 JR |
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. | |
0928494a | 92 | |
db6f7644 JR |
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. | |
0928494a | 97 | |
db6f7644 JR |
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ć. | |
0928494a | 102 | |
db6f7644 | 103 | Dovecot powinien być w miarę szybki, głównie z powodu plików |
0928494a | 104 | indeksowych utrzymywanych przez serwer; zamiast potrzeby skanowania |
db6f7644 JR |
105 | wszystkich danych w skrzynce, Dovecot może małym kosztem uzyskać |
106 | większość potrzebnych informacji z indeksu. | |
0928494a JB |
107 | |
108 | Stan: | |
db6f7644 JR |
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 | |
3fcc147b | 112 | webmaili IMAP |
db6f7644 JR |
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 | |
0928494a | 117 | |
ee9bfb11 | 118 | %package devel |
d3be9b82 JB |
119 | Summary: Development package for dovecot plugins |
120 | Summary(pl.UTF-8): Pakiet programistyczny do tworzenia wtyczek dla dovecota | |
1f7b33f9 | 121 | Group: Development/Libraries |
e208bc1e | 122 | # doesn't require base |
ee9bfb11 JS |
123 | |
124 | %description devel | |
d3be9b82 JB |
125 | Development package for dovecot plugins. |
126 | ||
127 | %description devel -l pl.UTF-8 | |
128 | Pakiet programistyczny do tworzenia wtyczek dla dovecota. | |
ee9bfb11 | 129 | |
b8f6d56a JB |
130 | %prep |
131 | %setup -q | |
8d47df47 | 132 | %patch0 -p1 |
77217d94 | 133 | |
3fcc147b | 134 | %{__sed} -i 's,/usr/lib/dovecot,%{_libdir}/dovecot,g' dovecot-example.conf |
b8f6d56a JB |
135 | |
136 | %build | |
06cf0ac5 | 137 | touch config.rpath |
b8f6d56a JB |
138 | %{__libtoolize} |
139 | %{__aclocal} | |
140 | %{__autoconf} | |
141 | %{__autoheader} | |
142 | %{__automake} | |
6865becd | 143 | %configure \ |
ba932ed4 | 144 | --disable-static \ |
6865becd | 145 | %{?debug:--enable-debug} \ |
ba932ed4 | 146 | --enable-header-install \ |
3082a74f | 147 | %{?with_ldap:--with-ldap=yes} \ |
f4230487 JB |
148 | %{?with_mysql:--with-mysql} \ |
149 | %{?with_pgsql:--with-pgsql} \ | |
a0260ad9 | 150 | %{?with_sqlite:--with-sqlite} \ |
a3e1a654 | 151 | %{?with_gssapi:--with-gssapi} \ |
d9e4e4b3 AM |
152 | --with-zlib \ |
153 | --with-bzlib \ | |
154 | --with-libcap \ | |
6865becd | 155 | --with-ssl=openssl \ |
d9e4e4b3 | 156 | --with-ssldir=/var/lib/openssl \ |
c19c6ee3 | 157 | --sysconfdir=/etc/%{name} |
b8f6d56a JB |
158 | |
159 | %{__make} | |
160 | ||
161 | %install | |
162 | rm -rf $RPM_BUILD_ROOT | |
8d47df47 | 163 | install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,sysconfig,security} |
e7291b43 | 164 | install -d $RPM_BUILD_ROOT{/var/lib/dovecot,/var/run/dovecot/login} |
b8f6d56a JB |
165 | |
166 | %{__make} install \ | |
442c32c1 | 167 | moduledir=%{_libdir}/%{name}/plugins \ |
b8f6d56a JB |
168 | DESTDIR=$RPM_BUILD_ROOT |
169 | ||
c19c6ee3 | 170 | mv -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{dovecot-example.conf,dovecot.conf} |
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 | ||
f3c52879 | 178 | rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins{,/auth,/imap}/*.la |
ee9bfb11 | 179 | |
ba932ed4 | 180 | # devel |
edd42453 AG |
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 | |
400f2756 AM |
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 | |
ee9bfb11 | 189 | done |
7034c8c5 | 190 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/dovecot-config $RPM_BUILD_ROOT%{_libdir}/%{name}-devel |
1f7b33f9 | 191 | |
4830c316 | 192 | rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name} |
1f7b33f9 | 193 | |
b8f6d56a JB |
194 | %clean |
195 | rm -rf $RPM_BUILD_ROOT | |
196 | ||
c1df1ed1 KK |
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 | ||
8d47df47 TO |
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 | ||
c1df1ed1 KK |
217 | %postun |
218 | if [ "$1" = "0" ]; then | |
219 | %userremove dovecot | |
220 | %groupremove dovecot | |
221 | fi | |
222 | ||
fdaf3880 PG |
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 | ||
b8f6d56a JB |
227 | %files |
228 | %defattr(644,root,root,755) | |
229 | # COPYING contains some notes, not actual LGPL text | |
caf88cd1 | 230 | %doc AUTHORS COPYING ChangeLog NEWS README TODO doc/*.txt doc/*.c*f doc/wiki/*.txt |
8d47df47 | 231 | %attr(755,root,root) %{_sbindir}/%{name} |
442c32c1 | 232 | %attr(755,root,root) %{_sbindir}/%{name}pw |
c19c6ee3 AM |
233 | %attr(750,root,root) %dir %{_sysconfdir}/%{name} |
234 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf | |
3d6a238e | 235 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}-db-example.conf |
f3c52879 | 236 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}-dict-sql-example.conf |
bc671450 AG |
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 | |
c5c6a170 | 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} | |
8d47df47 | 242 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
d3be9b82 | 243 | %dir %{_libdir}/%{name} |
2c2eddaa | 244 | %attr(755,root,root) %{_libdir}/%{name}/authtest |
ee9bfb11 JS |
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 | |
d9e4e4b3 | 253 | %attr(755,root,root) %{_libdir}/%{name}/imap-utf7 |
edd42453 AG |
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 | |
ee9bfb11 | 257 | %attr(755,root,root) %{_libdir}/%{name}/logview |
77ad1fc7 | 258 | %attr(755,root,root) %{_libdir}/%{name}/maildirlock |
ee9bfb11 JS |
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 | |
d9e4e4b3 | 263 | %attr(755,root,root) %{_libdir}/%{name}/threadview |
d3be9b82 | 264 | %dir %{_libdir}/%{name}/plugins |
ee9bfb11 | 265 | %attr(755,root,root) %{_libdir}/%{name}/plugins/*.so |
3082a74f | 266 | #%dir %{_libdir}/%{name}/plugins/auth |
267 | #%attr(755,root,root)%{_libdir}/%{name}/plugins/auth/*.so | |
ee9bfb11 JS |
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 | |
e7291b43 | 274 | %dir /var/lib/dovecot |
c1df1ed1 KK |
275 | %dir /var/run/dovecot |
276 | %attr(750,root,dovecot) %dir /var/run/dovecot/login | |
ee9bfb11 JS |
277 | |
278 | %files devel | |
279 | %defattr(644,root,root,755) | |
ba932ed4 | 280 | %{_libdir}/%{name}-devel |
ee9bfb11 | 281 | %{_includedir}/%{name} |