3 %bcond_with ldap # without LDAP support
4 %bcond_with mysql # without MySQL support
5 %bcond_with 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: d77ef5d3c90fd0a70b333a44e0ead0a2
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: ftp://ftp.pld.org.pl/people/siefca/patches/courier/%{name}-myownquery.patch
24 URL: http://www.inter7.com/courierimap/
25 BuildRequires: gdbm-devel
26 BuildRequires: libstdc++-devel
27 %{?with_mysql:BuildRequires: mysql-devel}
28 %{?with_ldap:BuildRequires: openldap-devel}
29 BuildRequires: openssl-devel >= 0.9.7c
30 %{?with_pgsql:BuildRequires: postgresql-devel}
31 %{?with_mysql:BuildRequires: zlib-devel}
32 PreReq: %{name}-common = %{version}
34 Requires(post,preun): /sbin/chkconfig
35 Requires: pam >= 0.77.3
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 Conflicts: cyrus-imapd
42 %define _libexecdir /usr/lib/courier-imap
43 %define _sysconfdir /etc/courier-imap
46 Courier-IMAP is an IMAP server for Maildir mailboxes.
49 Courier-IMAP jest serwerem IMAP dla skrzynek pocztowych Maildir.
52 Summary: Common files for imap and pop daemons
53 Summary(pl): Pliki wspólne dla serwerów imap i pop
54 Group: Networking/Daemons
56 Requires(post,preun): /sbin/chkconfig
57 Requires: %{name}-deliverquota
58 Requires: %{name}-maildirmake
59 Requires: %{name}-userdb
62 Common files for imap and pop daemons.
64 %description common -l pl
65 Pliki wspólne dla serwerów imap i pop.
68 Summary: Commands used to create the /etc/userdb.dat
69 Summary(pl): Polecenia do tworzenia /etc/userdb.dat
70 Group: Networking/Daemons
73 Commands used to create the /etc/userdb.dat.
75 %description userdb -l pl
76 Polecenia u¿ywane do stworzenia /etc/userdb.dat.
79 Summary: Deliver to a Maildir with a quota
80 Summary(pl): Obs³uga quoty przy dostarczaniu poczty do skrzynek Maildir
81 Group: Networking/Daemons
83 %description deliverquota
84 deliverquota is a temporary hack to implement E-mail delivery to a
85 Maildir with a software-imposed quota.
87 %description deliverquota -l pl
88 deliverquota jest tymczasowym rozwi±zaniem implementuj±cym
89 dostarczanie e-maili do skrzynek Maildir z programowo narzucon± quot±.
92 Summary: Tool for making mail folders in Maildir format
93 Summary(pl): Narzêdzie do tworzenia folderów w formacie Maildir
94 Group: Networking/Daemons
95 Conflicts: qmail-maildirmake
97 %description maildirmake
98 Maildirmake is a tool for making mail folders in Maildir format.
100 %description maildirmake -l pl
101 Maildirmake jest narzêdziem do tworzenia folderów pocztowych w
105 Summary: Courier-IMAP POP3 Server
106 Summary(pl): Serwer Courier-IMAP POP3
107 Group: Networking/Daemons
108 PreReq: %{name}-common = %{version}
109 Requires: pam >= 0.77.3
111 Obsoletes: pop3daemon
112 Conflicts: cyrus-imapd
114 Conflicts: solid-pop3d
118 Courier-IMAP POP3 is an POP3 server for Maildir mailboxes.
120 %description pop3 -l pl
121 Courier-IMAP POP3 jest serwerem POP3 dla skrzynek pocztowych Maildir.
124 Summary: LDAP authentication daemon for Courier IMAP
125 Summary(pl): Demon autentykacji LDAP do Courier IMAP
126 Group: Networking/Daemons
127 PreReq: %{name}-common = %{version}
129 %description authldap
130 This package provides LDAP authentication for Courier IMAP.
132 %description authldap -l pl
133 Ten pakiet pozwala na korzystanie z autentykacji LDAP w Courier IMAP.
136 Summary: MySQL authentication daemon for Courier IMAP
137 Summary(pl): Demon autentykacji MySQL do Courier IMAP
138 Group: Networking/Daemons
139 PreReq: %{name}-common = %{version}
142 %description authmysql
143 This package provides MySQL authentication for Courier IMAP.
145 %description authmysql -l pl
146 Ten pakiet pozwala na korzystanie z autentykacji MySQL w Courier IMAP.
149 Summary: PostgreSQL authentication daemon for Courier IMAP
150 Summary(pl): Demon autentykacji PostgreSQL do Courier IMAP
151 Group: Networking/Daemons
152 PreReq: %{name}-common = %{version}
154 %description authpgsql
155 This package provides PostgreSQL authentication for Courier IMAP.
157 %description authpgsql -l pl
158 Ten pakiet pozwala na korzystanie z autentykacji PostgreSQL w Courier
168 --with-authchangepwdir=/var/tmp \
169 --with-authdaemonvar=/var/lib/authdaemon \
170 %{?with_mysql:--with-mysql-libs=%{_libdir} --with-mysql-includes=%{_includedir}/mysql} \
171 %{!?with_mysql:--without-authmysql} \
172 %{?with_pgsql:--with-pgsql-libs=%{_libdir} --with-pgsql-includes=%{_includedir}/postgresql} \
173 %{!?with_pgsql:--without-authpgsql} \
174 %{!?with_ldap:--without-authldap}
179 rm -rf $RPM_BUILD_ROOT
180 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig} \
181 $RPM_BUILD_ROOT{%{_sysconfdir},/var/lib/authdaemon}
184 DESTDIR=$RPM_BUILD_ROOT
186 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap
187 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-pop3
188 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/authdaemon
190 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/imap
191 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/pop3
193 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap
194 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/courier-pop3
195 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/authdaemon
197 rm -rf $RPM_BUILD_ROOT%{_mandir}/man8/{authcram,authpam,authpwd,authshadow,authuserdb,authvchkpw,pw2userdb,vchkpw2userdb,authdaemon,authdaemond,authldap,authmysql}.8 \
198 $RPM_BUILD_ROOT%{_sbindir}/{*db,mk*cert}
200 mv -f authlib/README.authmysql.html README.authmysql.html
201 mv -f authlib/README.ldap README.ldap
202 mv -f authlib/README.authmysql.myownquery README.authmysql.myownquery
203 mv -f imap/README README.imap
204 mv -f imap/ChangeLog ChangeLog
205 mv -f maildir/README.maildirquota.txt README.maildirquota
207 install authlib/authdaemonrc $RPM_BUILD_ROOT%{_sysconfdir}
208 install authlib/authldaprc $RPM_BUILD_ROOT%{_sysconfdir}
209 install authlib/authmysqlrc $RPM_BUILD_ROOT%{_sysconfdir}
210 install authlib/authpgsqlrc $RPM_BUILD_ROOT%{_sysconfdir}
212 mv -f $RPM_BUILD_ROOT%{_datadir}/*db \
213 $RPM_BUILD_ROOT%{_sbindir}
214 mv -f $RPM_BUILD_ROOT%{_datadir}/mk*cert \
215 $RPM_BUILD_ROOT%{_sbindir}
217 mv -f tcpd/couriertls.1 $RPM_BUILD_ROOT%{_mandir}/man8/couriertls.8
218 mv -f imap/courierpop3d.8 $RPM_BUILD_ROOT%{_mandir}/man8/courierpop3d.8
220 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authcram.8
221 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authpam.8
222 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authpwd.8
223 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authshadow.8
224 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authuserdb.8
225 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authvchkpw.8
226 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemon.8
227 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemond.8
228 %{?with_pgsql:echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authpgsql.8}
229 %{?with_mysql:echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authmysql.8}
230 %{?with_ldap:echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authldap.8}
231 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8
232 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8
234 touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap}
237 rm -rf $RPM_BUILD_ROOT
240 /sbin/chkconfig --add courier-imap
242 if [ -f /var/lock/subsys/courier-imap ]; then
243 /etc/rc.d/init.d/courier-imap restart >&2
245 echo "Run \"/etc/rc.d/init.d/courier-imap start\" to start courier-imap daemon."
249 if [ "$1" = "0" ]; then
250 if [ -f /var/lock/subsys/courier-imap ]; then
251 /etc/rc.d/init.d/courier-imap stop >&2
253 /sbin/chkconfig --del courier-imap
257 /sbin/chkconfig --add authdaemon
259 if [ -f /var/lock/subsys/authdaemon ]; then
260 /etc/rc.d/init.d/authdaemon restart >&2
262 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
266 if [ "$1" = "0" ]; then
267 if [ -f /var/lock/subsys/authdaemon ]; then
268 /etc/rc.d/init.d/authdaemon stop >&2
271 /sbin/chkconfig --del authdaemon
275 /sbin/chkconfig --add courier-pop3
276 /sbin/chkconfig --del courier-imap-pop3 2>&1 >/dev/null
277 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
278 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
279 /etc/rc.d/init.d/courier-pop3 start >&2
280 elif [ -f /var/lock/subsys/courier-pop3 ]; then
281 /etc/rc.d/init.d/courier-pop3 restart >&2
283 echo "Run \"/etc/rc.d/init.d/courier-pop3 start\" to start courier-pop3 daemon."
285 rm -f /etc/rc.d/init.d/courier-imap-pop3
288 if [ "$1" = "0" ]; then
289 if [ -f /var/lock/subsys/courier-pop3 ]; then
290 /etc/rc.d/init.d/courier-pop3 stop >&2
292 /sbin/chkconfig --del courier-pop3
293 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
294 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
296 /sbin/chkconfig --del courier-imap-pop3 2>&1 >/dev/null
297 rm -f /etc/rc.d/init.d/courier-imap-pop3
302 . /etc/sysconfig/authdaemon
303 if [ "$METHOD" = "ldap" ]; then
304 if [ -f /var/lock/subsys/authdaemon ]; then
305 /etc/rc.d/init.d/authdaemon restart >&2
307 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
313 . /etc/sysconfig/authdaemon
314 if [ "$1" = "$0" -a "$METHOD" = "ldap" ]; then
315 if [ -f /var/lock/subsys/authdaemon ]; then
316 /etc/rc.d/init.d/authdaemon stop >&2
322 . /etc/sysconfig/authdaemon
323 if [ "$METHOD" = "mysql" ]; then
324 if [ -f /var/lock/subsys/authdaemon ]; then
325 /etc/rc.d/init.d/authdaemon restart >&2
327 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
333 . /etc/sysconfig/authdaemon
334 if [ "$1" = "$0" -a "$METHOD" = "mysql" ]; then
335 if [ -f /var/lock/subsys/authdaemon ]; then
336 /etc/rc.d/init.d/authdaemon stop >&2
341 %defattr(644,root,root,755)
342 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/imap
343 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.imap
344 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap
345 %attr(754,root,root) /etc/rc.d/init.d/courier-imap
346 %{_sysconfdir}/imapd.cnf
347 %attr(755,root,root) %{_bindir}/imapd
348 %attr(755,root,root) %{_bindir}/maildirkw
349 %attr(755,root,root) %{_sbindir}/imaplogin
350 %attr(755,root,root) %{_sbindir}/mkimapdcert
351 %{_mandir}/man8/imapd*
352 %{_mandir}/man1/maildirkw.1*
355 %defattr(644,root,root,755)
356 %doc README* imap/BUGS ChangeLog AUTHORS
357 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/authdaemon
358 %attr(754,root,root) /etc/rc.d/init.d/authdaemon
359 %attr(700,root,root) /var/lib/authdaemon
360 %attr(750,root,root) %dir %{_sysconfdir}
362 %dir %{_libexecdir}/authlib
363 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authdaemonrc
364 %{_sysconfdir}/quotawarnmsg.example
365 %attr(755,root,root) %{_bindir}/couriertls
366 %attr(755,root,root) %{_libexecdir}/authlib/authdaemon
367 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.plain
368 %attr(755,root,root) %{_libexecdir}/couriertcpd
369 %attr(755,root,root) %{_libexecdir}/courierlogger
370 %attr(755,root,root) %{_libexecdir}/makedatprog
371 %{_mandir}/man8/auth[cdsuv]*
372 %{_mandir}/man8/authp[aw]*
373 %{_mandir}/man7/authlib*
374 %{_mandir}/man1/couriert*
378 %defattr(644,root,root,755)
379 %attr(755,root,root) %{_sbindir}/makeuserdb
380 %attr(755,root,root) %{_sbindir}/pw2userdb
381 %attr(755,root,root) %{_sbindir}/userdb
382 %attr(755,root,root) %{_sbindir}/userdbpw
383 %attr(755,root,root) %{_sbindir}/vchkpw2userdb
384 %{_mandir}/man8/makeuserdb*
385 %{_mandir}/man8/userdb*
386 %{_mandir}/man8/*pw2userdb*
389 %defattr(644,root,root,755)
390 %attr(755,root,root) %{_bindir}/deliverquota
391 %{_mandir}/man8/deliverquota*
394 %defattr(644,root,root,755)
395 %attr(755,root,root) %{_bindir}/maildirmake
396 %{_mandir}/man1/maildirmake*
399 %defattr(644,root,root,755)
400 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/pop3
401 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.pop3
402 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-pop3
403 %attr(754,root,root) /etc/rc.d/init.d/courier-pop3
404 %attr(755,root,root) %{_bindir}/pop3d
405 %attr(755,root,root) %{_sbindir}/mkpop3dcert
406 %attr(755,root,root) %{_sbindir}/pop3login
407 %{_sysconfdir}/pop3d.cnf
408 %{_mandir}/man8/courierpop*
412 %defattr(644,root,root,755)
413 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authldaprc
414 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.ldap
415 %{_mandir}/man8/authldap*
420 %defattr(644,root,root,755)
421 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authmysqlrc
422 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.mysql
423 %{_mandir}/man8/authmysql*
428 %defattr(644,root,root,755)
429 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authpgsqlrc
430 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.pgsql
431 %{_mandir}/man8/authpgsql*