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 Patch0: %{name}-no_res_query.patch
24 URL: http://www.inter7.com/courierimap/
25 BuildRequires: autoconf
26 BuildRequires: automake
27 BuildRequires: gdbm-devel
28 BuildRequires: libstdc++-devel
29 %{?with_mysql:BuildRequires: mysql-devel}
30 %{?with_ldap:BuildRequires: openldap-devel}
31 BuildRequires: openssl-devel >= 0.9.7c
32 %{?with_pgsql:BuildRequires: postgresql-devel}
33 BuildRequires: sysconftool
34 %{?with_mysql:BuildRequires: zlib-devel}
35 PreReq: %{name}-common = %{version}
37 Requires(post,preun): /sbin/chkconfig
38 Requires: pam >= 0.77.3
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 Conflicts: cyrus-imapd
45 %define _libexecdir /usr/lib/courier-imap
46 %define _sysconfdir /etc/courier-imap
49 Courier-IMAP is an IMAP server for Maildir mailboxes.
52 Courier-IMAP jest serwerem IMAP dla skrzynek pocztowych Maildir.
55 Summary: Common files for imap and pop daemons
56 Summary(pl): Pliki wspólne dla serwerów imap i pop
57 Group: Networking/Daemons
59 Requires(post,preun): /sbin/chkconfig
60 Requires: %{name}-deliverquota
61 Requires: %{name}-maildirmake
62 Requires: %{name}-userdb
65 Common files for imap and pop daemons.
67 %description common -l pl
68 Pliki wspólne dla serwerów imap i pop.
71 Summary: Commands used to create the /etc/userdb.dat
72 Summary(pl): Polecenia do tworzenia /etc/userdb.dat
73 Group: Networking/Daemons
76 Commands used to create the /etc/userdb.dat.
78 %description userdb -l pl
79 Polecenia u¿ywane do stworzenia /etc/userdb.dat.
82 Summary: Deliver to a Maildir with a quota
83 Summary(pl): Obs³uga quoty przy dostarczaniu poczty do skrzynek Maildir
84 Group: Networking/Daemons
86 %description deliverquota
87 deliverquota is a temporary hack to implement E-mail delivery to a
88 Maildir with a software-imposed quota.
90 %description deliverquota -l pl
91 deliverquota jest tymczasowym rozwi±zaniem implementuj±cym
92 dostarczanie e-maili do skrzynek Maildir z programowo narzucon± quot±.
95 Summary: Tool for making mail folders in Maildir format
96 Summary(pl): Narzêdzie do tworzenia folderów w formacie Maildir
97 Group: Networking/Daemons
98 Conflicts: qmail-maildirmake
100 %description maildirmake
101 Maildirmake is a tool for making mail folders in Maildir format.
103 %description maildirmake -l pl
104 Maildirmake jest narzêdziem do tworzenia folderów pocztowych w
108 Summary: Courier-IMAP POP3 Server
109 Summary(pl): Serwer Courier-IMAP POP3
110 Group: Networking/Daemons
111 PreReq: %{name}-common = %{version}-%{release}
112 Requires: pam >= 0.77.3
114 Obsoletes: pop3daemon
115 Conflicts: cyrus-imapd
117 Conflicts: solid-pop3d
121 Courier-IMAP POP3 is an POP3 server for Maildir mailboxes.
123 %description pop3 -l pl
124 Courier-IMAP POP3 jest serwerem POP3 dla skrzynek pocztowych Maildir.
127 Summary: LDAP authentication daemon for Courier IMAP
128 Summary(pl): Demon autentykacji LDAP do Courier IMAP
129 Group: Networking/Daemons
130 PreReq: %{name}-common = %{version}-%{release}
132 %description authldap
133 This package provides LDAP authentication for Courier IMAP.
135 %description authldap -l pl
136 Ten pakiet pozwala na korzystanie z autentykacji LDAP w Courier IMAP.
139 Summary: MySQL authentication daemon for Courier IMAP
140 Summary(pl): Demon autentykacji MySQL do Courier IMAP
141 Group: Networking/Daemons
142 PreReq: %{name}-common = %{version}-%{release}
145 %description authmysql
146 This package provides MySQL authentication for Courier IMAP.
148 %description authmysql -l pl
149 Ten pakiet pozwala na korzystanie z autentykacji MySQL w Courier IMAP.
152 Summary: PostgreSQL authentication daemon for Courier IMAP
153 Summary(pl): Demon autentykacji PostgreSQL do Courier IMAP
154 Group: Networking/Daemons
155 PreReq: %{name}-common = %{version}-%{release}
157 %description authpgsql
158 This package provides PostgreSQL authentication for Courier IMAP.
160 %description authpgsql -l pl
161 Ten pakiet pozwala na korzystanie z autentykacji PostgreSQL w Courier
169 cp -f /usr/share/automake/config.sub .
170 cp -f /usr/share/automake/config.sub maildir
178 --with-authchangepwdir=/var/tmp \
179 --with-authdaemonvar=/var/lib/authdaemon \
180 %{?with_mysql:--with-mysql-libs=%{_libdir} --with-mysql-includes=%{_includedir}/mysql} \
181 %{!?with_mysql:--without-authmysql} \
182 %{?with_pgsql:--with-pgsql-libs=%{_libdir} --with-pgsql-includes=%{_includedir}/postgresql} \
183 %{!?with_pgsql:--without-authpgsql} \
184 %{!?with_ldap:--without-authldap}
189 rm -rf $RPM_BUILD_ROOT
190 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig} \
191 $RPM_BUILD_ROOT{%{_sysconfdir},/var/lib/authdaemon}
194 DESTDIR=$RPM_BUILD_ROOT
196 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap
197 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-pop3
198 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/authdaemon
200 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/imap
201 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/pop3
203 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap
204 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/courier-pop3
205 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/authdaemon
207 rm -rf $RPM_BUILD_ROOT%{_mandir}/man8/{authcram,authpam,authpwd,authshadow,authuserdb,authvchkpw,pw2userdb,vchkpw2userdb,authdaemon,authdaemond,authldap,authmysql}.8 \
208 $RPM_BUILD_ROOT%{_sbindir}/{*db,mk*cert}
210 mv -f authlib/README.authmysql.html README.authmysql.html
211 mv -f authlib/README.ldap README.ldap
212 mv -f authlib/README.authmysql.myownquery README.authmysql.myownquery
213 mv -f imap/README README.imap
214 mv -f imap/ChangeLog ChangeLog
215 mv -f maildir/README.maildirquota.txt README.maildirquota
217 install authlib/authdaemonrc $RPM_BUILD_ROOT%{_sysconfdir}
218 install authlib/authldaprc $RPM_BUILD_ROOT%{_sysconfdir}
219 install authlib/authmysqlrc $RPM_BUILD_ROOT%{_sysconfdir}
220 install authlib/authpgsqlrc $RPM_BUILD_ROOT%{_sysconfdir}
222 mv -f $RPM_BUILD_ROOT%{_datadir}/*db \
223 $RPM_BUILD_ROOT%{_sbindir}
224 mv -f $RPM_BUILD_ROOT%{_datadir}/mk*cert \
225 $RPM_BUILD_ROOT%{_sbindir}
227 mv -f tcpd/couriertls.1 $RPM_BUILD_ROOT%{_mandir}/man8/couriertls.8
228 mv -f imap/courierpop3d.8 $RPM_BUILD_ROOT%{_mandir}/man8/courierpop3d.8
230 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authcram.8
231 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authpam.8
232 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authpwd.8
233 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authshadow.8
234 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authuserdb.8
235 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authvchkpw.8
236 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemon.8
237 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemond.8
238 %{?with_pgsql:echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authpgsql.8}
239 %{?with_mysql:echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authmysql.8}
240 %{?with_ldap:echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authldap.8}
241 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8
242 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8
244 touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap}
247 rm -rf $RPM_BUILD_ROOT
250 /sbin/chkconfig --add courier-imap
252 if [ -f /var/lock/subsys/courier-imap ]; then
253 /etc/rc.d/init.d/courier-imap restart >&2
255 echo "Run \"/etc/rc.d/init.d/courier-imap start\" to start courier-imap daemon."
259 if [ "$1" = "0" ]; then
260 if [ -f /var/lock/subsys/courier-imap ]; then
261 /etc/rc.d/init.d/courier-imap stop >&2
263 /sbin/chkconfig --del courier-imap
267 /sbin/chkconfig --add authdaemon
269 if [ -f /var/lock/subsys/authdaemon ]; then
270 /etc/rc.d/init.d/authdaemon restart >&2
272 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
276 if [ "$1" = "0" ]; then
277 if [ -f /var/lock/subsys/authdaemon ]; then
278 /etc/rc.d/init.d/authdaemon stop >&2
281 /sbin/chkconfig --del authdaemon
285 /sbin/chkconfig --add courier-pop3
286 /sbin/chkconfig --del courier-imap-pop3 >/dev/null 2>&1 || :
287 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
288 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
289 /etc/rc.d/init.d/courier-pop3 start >&2
290 elif [ -f /var/lock/subsys/courier-pop3 ]; then
291 /etc/rc.d/init.d/courier-pop3 restart >&2
293 echo "Run \"/etc/rc.d/init.d/courier-pop3 start\" to start courier-pop3 daemon."
295 rm -f /etc/rc.d/init.d/courier-imap-pop3
298 if [ "$1" = "0" ]; then
299 if [ -f /var/lock/subsys/courier-pop3 ]; then
300 /etc/rc.d/init.d/courier-pop3 stop >&2
302 /sbin/chkconfig --del courier-pop3
303 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
304 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
306 /sbin/chkconfig --del courier-imap-pop3 >/dev/null 2>&1 || :
307 rm -f /etc/rc.d/init.d/courier-imap-pop3
312 . /etc/sysconfig/authdaemon
313 if [ "$METHOD" = "ldap" ]; then
314 if [ -f /var/lock/subsys/authdaemon ]; then
315 /etc/rc.d/init.d/authdaemon restart >&2
317 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
323 if [ -e /etc/sysconfig/authdaemon ]; then
324 . /etc/sysconfig/authdaemon
325 if [ "$1" = "$0" -a "$METHOD" = "ldap" ]; then
326 if [ -f /var/lock/subsys/authdaemon ]; then
327 /etc/rc.d/init.d/authdaemon stop >&2
334 . /etc/sysconfig/authdaemon
335 if [ "$METHOD" = "mysql" ]; then
336 if [ -f /var/lock/subsys/authdaemon ]; then
337 /etc/rc.d/init.d/authdaemon restart >&2
339 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
345 if [ -e /etc/sysconfig/authdaemon ]; then
346 . /etc/sysconfig/authdaemon
347 if [ "$1" = "$0" -a "$METHOD" = "mysql" ]; then
348 if [ -f /var/lock/subsys/authdaemon ]; then
349 /etc/rc.d/init.d/authdaemon stop >&2
356 . /etc/sysconfig/authdaemon
357 if [ "$METHOD" = "pgsql" ]; then
358 if [ -f /var/lock/subsys/authdaemon ]; then
359 /etc/rc.d/init.d/authdaemon restart >&2
361 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
367 if [ -e /etc/sysconfig/authdaemon ]; then
368 . /etc/sysconfig/authdaemon
369 if [ "$1" = "$0" -a "$METHOD" = "pgsql" ]; then
370 if [ -f /var/lock/subsys/authdaemon ]; then
371 /etc/rc.d/init.d/authdaemon stop >&2
377 %defattr(644,root,root,755)
378 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/imap
379 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.imap
380 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap
381 %attr(754,root,root) /etc/rc.d/init.d/courier-imap
382 %{_sysconfdir}/imapd.cnf
383 %attr(755,root,root) %{_bindir}/imapd
384 %attr(755,root,root) %{_bindir}/maildirkw
385 %attr(755,root,root) %{_sbindir}/imaplogin
386 %attr(755,root,root) %{_sbindir}/mkimapdcert
387 %{_mandir}/man8/imapd*
388 %{_mandir}/man1/maildirkw.1*
391 %defattr(644,root,root,755)
392 %doc README* imap/BUGS ChangeLog AUTHORS
393 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/authdaemon
394 %attr(754,root,root) /etc/rc.d/init.d/authdaemon
395 %attr(700,root,root) /var/lib/authdaemon
396 %attr(750,root,root) %dir %{_sysconfdir}
398 %dir %{_libexecdir}/authlib
399 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authdaemonrc
400 %{_sysconfdir}/quotawarnmsg.example
401 %attr(755,root,root) %{_bindir}/couriertls
402 %attr(755,root,root) %{_libexecdir}/authlib/authdaemon
403 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.plain
404 %attr(755,root,root) %{_libexecdir}/couriertcpd
405 %attr(755,root,root) %{_libexecdir}/courierlogger
406 %attr(755,root,root) %{_libexecdir}/makedatprog
407 %{_mandir}/man8/auth[cdsuv]*
408 %{_mandir}/man8/authp[aw]*
409 %{_mandir}/man7/authlib*
410 %{_mandir}/man1/couriert*
411 %{_mandir}/man8/couriert*
415 %defattr(644,root,root,755)
416 %attr(755,root,root) %{_sbindir}/makeuserdb
417 %attr(755,root,root) %{_sbindir}/pw2userdb
418 %attr(755,root,root) %{_sbindir}/userdb
419 %attr(755,root,root) %{_sbindir}/userdbpw
420 %attr(755,root,root) %{_sbindir}/vchkpw2userdb
421 %{_mandir}/man8/makeuserdb*
422 %{_mandir}/man8/userdb*
423 %{_mandir}/man8/*pw2userdb*
426 %defattr(644,root,root,755)
427 %attr(755,root,root) %{_bindir}/deliverquota
428 %{_mandir}/man8/deliverquota*
431 %defattr(644,root,root,755)
432 %attr(755,root,root) %{_bindir}/maildirmake
433 %{_mandir}/man1/maildirmake*
436 %defattr(644,root,root,755)
437 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/pop3
438 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.pop3
439 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-pop3
440 %attr(754,root,root) /etc/rc.d/init.d/courier-pop3
441 %attr(755,root,root) %{_bindir}/pop3d
442 %attr(755,root,root) %{_sbindir}/mkpop3dcert
443 %attr(755,root,root) %{_sbindir}/pop3login
444 %{_sysconfdir}/pop3d.cnf
445 %{_mandir}/man8/courierpop*
449 %defattr(644,root,root,755)
450 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authldaprc
451 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.ldap
452 %{_mandir}/man8/authldap*
457 %defattr(644,root,root,755)
458 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authmysqlrc
459 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.mysql
460 %{_mandir}/man8/authmysql*
465 %defattr(644,root,root,755)
466 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authpgsqlrc
467 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.pgsql
468 %{_mandir}/man8/authpgsql*