3 %bcond_without ldap # without LDAP support
4 %bcond_without mysql # without MySQL support
5 %bcond_without pgsql # without PostgreSQL support
6 Summary: Courier-IMAP server
7 Summary(pl): Serwer Courier-IMAP
12 Group: Networking/Daemons
13 Source0: http://dl.sourceforge.net/courier/%{name}-%{version}.tar.bz2
14 # Source0-md5: 27c90ce2ac2412bc90994cacbd75616b
16 Source2: %{name}-pop3.init
17 Source3: %{name}-authdaemon.init
19 Source5: %{name}-pop3.pamd
20 Source6: %{name}.sysconfig
21 Source7: %{name}-pop3.sysconfig
22 Source8: %{name}-authdaemon.sysconfig
23 URL: http://www.inter7.com/courierimap/
24 BuildRequires: gdbm-devel
25 BuildRequires: libstdc++-devel
26 %{?with_mysql:BuildRequires: mysql-devel}
27 %{?with_ldap:BuildRequires: openldap-devel}
28 BuildRequires: openssl-devel >= 0.9.7c
29 %{?with_pgsql:BuildRequires: postgresql-devel}
30 %{?with_mysql:BuildRequires: zlib-devel}
31 PreReq: %{name}-common = %{version}
33 Requires(post,preun): /sbin/chkconfig
34 Requires: pam >= 0.77.3
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 Conflicts: cyrus-imapd
41 %define _libexecdir /usr/lib/courier-imap
42 %define _sysconfdir /etc/courier-imap
45 Courier-IMAP is an IMAP server for Maildir mailboxes.
48 Courier-IMAP jest serwerem IMAP dla skrzynek pocztowych Maildir.
51 Summary: Common files for imap and pop daemons
52 Summary(pl): Pliki wspólne dla serwerów imap i pop
53 Group: Networking/Daemons
55 Requires(post,preun): /sbin/chkconfig
56 Requires: %{name}-deliverquota
57 Requires: %{name}-maildirmake
58 Requires: %{name}-userdb
61 Common files for imap and pop daemons.
63 %description common -l pl
64 Pliki wspólne dla serwerów imap i pop.
67 Summary: Commands used to create the /etc/userdb.dat
68 Summary(pl): Polecenia do tworzenia /etc/userdb.dat
69 Group: Networking/Daemons
72 Commands used to create the /etc/userdb.dat.
74 %description userdb -l pl
75 Polecenia u¿ywane do stworzenia /etc/userdb.dat.
78 Summary: Deliver to a Maildir with a quota
79 Summary(pl): Obs³uga quoty przy dostarczaniu poczty do skrzynek Maildir
80 Group: Networking/Daemons
82 %description deliverquota
83 deliverquota is a temporary hack to implement E-mail delivery to a
84 Maildir with a software-imposed quota.
86 %description deliverquota -l pl
87 deliverquota jest tymczasowym rozwi±zaniem implementuj±cym
88 dostarczanie e-maili do skrzynek Maildir z programowo narzucon± quot±.
91 Summary: Tool for making mail folders in Maildir format
92 Summary(pl): Narzêdzie do tworzenia folderów w formacie Maildir
93 Group: Networking/Daemons
94 Conflicts: qmail-maildirmake
96 %description maildirmake
97 Maildirmake is a tool for making mail folders in Maildir format.
99 %description maildirmake -l pl
100 Maildirmake jest narzêdziem do tworzenia folderów pocztowych w
104 Summary: Courier-IMAP POP3 Server
105 Summary(pl): Serwer Courier-IMAP POP3
106 Group: Networking/Daemons
107 PreReq: %{name}-common = %{version}
108 Requires: pam >= 0.77.3
110 Obsoletes: pop3daemon
111 Conflicts: cyrus-imapd
113 Conflicts: solid-pop3d
117 Courier-IMAP POP3 is an POP3 server for Maildir mailboxes.
119 %description pop3 -l pl
120 Courier-IMAP POP3 jest serwerem POP3 dla skrzynek pocztowych Maildir.
123 Summary: LDAP authentication daemon for Courier IMAP
124 Summary(pl): Demon autentykacji LDAP do Courier IMAP
125 Group: Networking/Daemons
126 PreReq: %{name}-common = %{version}
128 %description authldap
129 This package provides LDAP authentication for Courier IMAP.
131 %description authldap -l pl
132 Ten pakiet pozwala na korzystanie z autentykacji LDAP w Courier IMAP.
135 Summary: MySQL authentication daemon for Courier IMAP
136 Summary(pl): Demon autentykacji MySQL do Courier IMAP
137 Group: Networking/Daemons
138 PreReq: %{name}-common = %{version}
141 %description authmysql
142 This package provides MySQL authentication for Courier IMAP.
144 %description authmysql -l pl
145 Ten pakiet pozwala na korzystanie z autentykacji MySQL w Courier IMAP.
148 Summary: PostgreSQL authentication daemon for Courier IMAP
149 Summary(pl): Demon autentykacji PostgreSQL do Courier IMAP
150 Group: Networking/Daemons
151 PreReq: %{name}-common = %{version}
153 %description authpgsql
154 This package provides PostgreSQL authentication for Courier IMAP.
156 %description authpgsql -l pl
157 Ten pakiet pozwala na korzystanie z autentykacji PostgreSQL w Courier
166 --with-authchangepwdir=/var/tmp \
167 --with-authdaemonvar=/var/lib/authdaemon \
168 %{?with_mysql:--with-mysql-libs=%{_libdir} --with-mysql-includes=%{_includedir}/mysql} \
169 %{!?with_mysql:--without-authmysql} \
170 %{?with_pgsql:--with-pgsql-libs=%{_libdir} --with-pgsql-includes=%{_includedir}/postgresql} \
171 %{!?with_pgsql:--without-authpgsql} \
172 %{!?with_ldap:--without-authldap}
177 rm -rf $RPM_BUILD_ROOT
178 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig} \
179 $RPM_BUILD_ROOT{%{_sysconfdir},/var/lib/authdaemon}
182 DESTDIR=$RPM_BUILD_ROOT
184 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap
185 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-pop3
186 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/authdaemon
188 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/imap
189 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/pop3
191 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap
192 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/courier-pop3
193 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/authdaemon
195 rm -rf $RPM_BUILD_ROOT%{_mandir}/man8/{authcram,authpam,authpwd,authshadow,authuserdb,authvchkpw,pw2userdb,vchkpw2userdb,authdaemon,authdaemond,authldap,authmysql}.8 \
196 $RPM_BUILD_ROOT%{_sbindir}/{*db,mk*cert}
198 mv -f authlib/README.authmysql.html README.authmysql.html
199 mv -f authlib/README.ldap README.ldap
200 mv -f authlib/README.authmysql.myownquery README.authmysql.myownquery
201 mv -f imap/README README.imap
202 mv -f imap/ChangeLog ChangeLog
203 mv -f maildir/README.maildirquota.txt README.maildirquota
205 install authlib/authdaemonrc $RPM_BUILD_ROOT%{_sysconfdir}
206 install authlib/authldaprc $RPM_BUILD_ROOT%{_sysconfdir}
207 install authlib/authmysqlrc $RPM_BUILD_ROOT%{_sysconfdir}
208 install authlib/authpgsqlrc $RPM_BUILD_ROOT%{_sysconfdir}
210 mv -f $RPM_BUILD_ROOT%{_datadir}/*db \
211 $RPM_BUILD_ROOT%{_sbindir}
212 mv -f $RPM_BUILD_ROOT%{_datadir}/mk*cert \
213 $RPM_BUILD_ROOT%{_sbindir}
215 mv -f tcpd/couriertls.1 $RPM_BUILD_ROOT%{_mandir}/man8/couriertls.8
216 mv -f imap/courierpop3d.8 $RPM_BUILD_ROOT%{_mandir}/man8/courierpop3d.8
218 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authcram.8
219 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authpam.8
220 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authpwd.8
221 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authshadow.8
222 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authuserdb.8
223 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authvchkpw.8
224 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemon.8
225 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemond.8
226 %{?with_pgsql:echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authpgsql.8}
227 %{?with_mysql:echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authmysql.8}
228 %{?with_ldap:echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authldap.8}
229 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8
230 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8
232 touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap}
235 rm -rf $RPM_BUILD_ROOT
238 /sbin/chkconfig --add courier-imap
240 if [ -f /var/lock/subsys/courier-imap ]; then
241 /etc/rc.d/init.d/courier-imap restart >&2
243 echo "Run \"/etc/rc.d/init.d/courier-imap start\" to start courier-imap daemon."
247 if [ "$1" = "0" ]; then
248 if [ -f /var/lock/subsys/courier-imap ]; then
249 /etc/rc.d/init.d/courier-imap stop >&2
251 /sbin/chkconfig --del courier-imap
255 /sbin/chkconfig --add authdaemon
257 if [ -f /var/lock/subsys/authdaemon ]; then
258 /etc/rc.d/init.d/authdaemon restart >&2
260 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
264 if [ "$1" = "0" ]; then
265 if [ -f /var/lock/subsys/authdaemon ]; then
266 /etc/rc.d/init.d/authdaemon stop >&2
269 /sbin/chkconfig --del authdaemon
273 /sbin/chkconfig --add courier-pop3
274 /sbin/chkconfig --del courier-imap-pop3 >/dev/null 2>&1 || :
275 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
276 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
277 /etc/rc.d/init.d/courier-pop3 start >&2
278 elif [ -f /var/lock/subsys/courier-pop3 ]; then
279 /etc/rc.d/init.d/courier-pop3 restart >&2
281 echo "Run \"/etc/rc.d/init.d/courier-pop3 start\" to start courier-pop3 daemon."
283 rm -f /etc/rc.d/init.d/courier-imap-pop3
286 if [ "$1" = "0" ]; then
287 if [ -f /var/lock/subsys/courier-pop3 ]; then
288 /etc/rc.d/init.d/courier-pop3 stop >&2
290 /sbin/chkconfig --del courier-pop3
291 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
292 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
294 /sbin/chkconfig --del courier-imap-pop3 >/dev/null 2>&1 || :
295 rm -f /etc/rc.d/init.d/courier-imap-pop3
300 . /etc/sysconfig/authdaemon
301 if [ "$METHOD" = "ldap" ]; then
302 if [ -f /var/lock/subsys/authdaemon ]; then
303 /etc/rc.d/init.d/authdaemon restart >&2
305 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
311 . /etc/sysconfig/authdaemon
312 if [ "$1" = "$0" -a "$METHOD" = "ldap" ]; then
313 if [ -f /var/lock/subsys/authdaemon ]; then
314 /etc/rc.d/init.d/authdaemon stop >&2
320 . /etc/sysconfig/authdaemon
321 if [ "$METHOD" = "mysql" ]; then
322 if [ -f /var/lock/subsys/authdaemon ]; then
323 /etc/rc.d/init.d/authdaemon restart >&2
325 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
331 . /etc/sysconfig/authdaemon
332 if [ "$1" = "$0" -a "$METHOD" = "mysql" ]; then
333 if [ -f /var/lock/subsys/authdaemon ]; then
334 /etc/rc.d/init.d/authdaemon stop >&2
339 %defattr(644,root,root,755)
340 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/imap
341 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.imap
342 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap
343 %attr(754,root,root) /etc/rc.d/init.d/courier-imap
344 %{_sysconfdir}/imapd.cnf
345 %attr(755,root,root) %{_bindir}/imapd
346 %attr(755,root,root) %{_bindir}/maildirkw
347 %attr(755,root,root) %{_sbindir}/imaplogin
348 %attr(755,root,root) %{_sbindir}/mkimapdcert
349 %{_mandir}/man8/imapd*
350 %{_mandir}/man1/maildirkw.1*
353 %defattr(644,root,root,755)
354 %doc README* imap/BUGS ChangeLog AUTHORS
355 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/authdaemon
356 %attr(754,root,root) /etc/rc.d/init.d/authdaemon
357 %attr(700,root,root) /var/lib/authdaemon
358 %attr(750,root,root) %dir %{_sysconfdir}
360 %dir %{_libexecdir}/authlib
361 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authdaemonrc
362 %{_sysconfdir}/quotawarnmsg.example
363 %attr(755,root,root) %{_bindir}/couriertls
364 %attr(755,root,root) %{_libexecdir}/authlib/authdaemon
365 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.plain
366 %attr(755,root,root) %{_libexecdir}/couriertcpd
367 %attr(755,root,root) %{_libexecdir}/courierlogger
368 %attr(755,root,root) %{_libexecdir}/makedatprog
369 %{_mandir}/man8/auth[cdsuv]*
370 %{_mandir}/man8/authp[aw]*
371 %{_mandir}/man7/authlib*
372 %{_mandir}/man1/couriert*
373 %{_mandir}/man8/couriert*
377 %defattr(644,root,root,755)
378 %attr(755,root,root) %{_sbindir}/makeuserdb
379 %attr(755,root,root) %{_sbindir}/pw2userdb
380 %attr(755,root,root) %{_sbindir}/userdb
381 %attr(755,root,root) %{_sbindir}/userdbpw
382 %attr(755,root,root) %{_sbindir}/vchkpw2userdb
383 %{_mandir}/man8/makeuserdb*
384 %{_mandir}/man8/userdb*
385 %{_mandir}/man8/*pw2userdb*
388 %defattr(644,root,root,755)
389 %attr(755,root,root) %{_bindir}/deliverquota
390 %{_mandir}/man8/deliverquota*
393 %defattr(644,root,root,755)
394 %attr(755,root,root) %{_bindir}/maildirmake
395 %{_mandir}/man1/maildirmake*
398 %defattr(644,root,root,755)
399 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/pop3
400 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.pop3
401 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-pop3
402 %attr(754,root,root) /etc/rc.d/init.d/courier-pop3
403 %attr(755,root,root) %{_bindir}/pop3d
404 %attr(755,root,root) %{_sbindir}/mkpop3dcert
405 %attr(755,root,root) %{_sbindir}/pop3login
406 %{_sysconfdir}/pop3d.cnf
407 %{_mandir}/man8/courierpop*
411 %defattr(644,root,root,755)
412 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authldaprc
413 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.ldap
414 %{_mandir}/man8/authldap*
419 %defattr(644,root,root,755)
420 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authmysqlrc
421 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.mysql
422 %{_mandir}/man8/authmysql*
427 %defattr(644,root,root,755)
428 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authpgsqlrc
429 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.pgsql
430 %{_mandir}/man8/authpgsql*