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: 95e1f563a0c27330991820046d4d65d1
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
167 --with-authchangepwdir=/var/tmp \
168 --with-authdaemonvar=/var/lib/authdaemon \
169 %{?with_mysql:--with-mysql-libs=%{_libdir} --with-mysql-includes=%{_includedir}/mysql} \
170 %{!?with_mysql:--without-authmysql} \
171 %{?with_pgsql:--with-pgsql-libs=%{_libdir} --with-pgsql-includes=%{_includedir}/postgresql} \
172 %{!?with_pgsql:--without-authpgsql} \
173 %{!?with_ldap:--without-authldap}
178 rm -rf $RPM_BUILD_ROOT
179 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig} \
180 $RPM_BUILD_ROOT{%{_sysconfdir},/var/lib/authdaemon}
183 DESTDIR=$RPM_BUILD_ROOT
185 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap
186 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-pop3
187 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/authdaemon
189 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/imap
190 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/pop3
192 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap
193 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/courier-pop3
194 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/authdaemon
196 rm -rf $RPM_BUILD_ROOT%{_mandir}/man8/{authcram,authpam,authpwd,authshadow,authuserdb,authvchkpw,pw2userdb,vchkpw2userdb,authdaemon,authdaemond,authldap,authmysql}.8 \
197 $RPM_BUILD_ROOT%{_sbindir}/{*db,mk*cert}
199 mv -f authlib/README.authmysql.html README.authmysql.html
200 mv -f authlib/README.ldap README.ldap
201 mv -f authlib/README.authmysql.myownquery README.authmysql.myownquery
202 mv -f imap/README README.imap
203 mv -f imap/ChangeLog ChangeLog
204 mv -f maildir/README.maildirquota.txt README.maildirquota
206 install authlib/authdaemonrc $RPM_BUILD_ROOT%{_sysconfdir}
207 install authlib/authldaprc $RPM_BUILD_ROOT%{_sysconfdir}
208 install authlib/authmysqlrc $RPM_BUILD_ROOT%{_sysconfdir}
209 install authlib/authpgsqlrc $RPM_BUILD_ROOT%{_sysconfdir}
211 mv -f $RPM_BUILD_ROOT%{_datadir}/*db \
212 $RPM_BUILD_ROOT%{_sbindir}
213 mv -f $RPM_BUILD_ROOT%{_datadir}/mk*cert \
214 $RPM_BUILD_ROOT%{_sbindir}
216 mv -f tcpd/couriertls.1 $RPM_BUILD_ROOT%{_mandir}/man8/couriertls.8
217 mv -f imap/courierpop3d.8 $RPM_BUILD_ROOT%{_mandir}/man8/courierpop3d.8
219 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authcram.8
220 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authpam.8
221 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authpwd.8
222 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authshadow.8
223 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authuserdb.8
224 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authvchkpw.8
225 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemon.8
226 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemond.8
227 %{?with_pgsql:echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authpgsql.8}
228 %{?with_mysql:echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authmysql.8}
229 %{?with_ldap:echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authldap.8}
230 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8
231 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8
233 touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap}
236 rm -rf $RPM_BUILD_ROOT
239 /sbin/chkconfig --add courier-imap
241 if [ -f /var/lock/subsys/courier-imap ]; then
242 /etc/rc.d/init.d/courier-imap restart >&2
244 echo "Run \"/etc/rc.d/init.d/courier-imap start\" to start courier-imap daemon."
248 if [ "$1" = "0" ]; then
249 if [ -f /var/lock/subsys/courier-imap ]; then
250 /etc/rc.d/init.d/courier-imap stop >&2
252 /sbin/chkconfig --del courier-imap
256 /sbin/chkconfig --add authdaemon
258 if [ -f /var/lock/subsys/authdaemon ]; then
259 /etc/rc.d/init.d/authdaemon restart >&2
261 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
265 if [ "$1" = "0" ]; then
266 if [ -f /var/lock/subsys/authdaemon ]; then
267 /etc/rc.d/init.d/authdaemon stop >&2
270 /sbin/chkconfig --del authdaemon
274 /sbin/chkconfig --add courier-pop3
275 /sbin/chkconfig --del courier-imap-pop3 2>&1 >/dev/null
276 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
277 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
278 /etc/rc.d/init.d/courier-pop3 start >&2
279 elif [ -f /var/lock/subsys/courier-pop3 ]; then
280 /etc/rc.d/init.d/courier-pop3 restart >&2
282 echo "Run \"/etc/rc.d/init.d/courier-pop3 start\" to start courier-pop3 daemon."
284 rm -f /etc/rc.d/init.d/courier-imap-pop3
287 if [ "$1" = "0" ]; then
288 if [ -f /var/lock/subsys/courier-pop3 ]; then
289 /etc/rc.d/init.d/courier-pop3 stop >&2
291 /sbin/chkconfig --del courier-pop3
292 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
293 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
295 /sbin/chkconfig --del courier-imap-pop3 2>&1 >/dev/null
296 rm -f /etc/rc.d/init.d/courier-imap-pop3
301 . /etc/sysconfig/authdaemon
302 if [ "$METHOD" = "ldap" ]; then
303 if [ -f /var/lock/subsys/authdaemon ]; then
304 /etc/rc.d/init.d/authdaemon restart >&2
306 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
312 . /etc/sysconfig/authdaemon
313 if [ "$1" = "$0" -a "$METHOD" = "ldap" ]; then
314 if [ -f /var/lock/subsys/authdaemon ]; then
315 /etc/rc.d/init.d/authdaemon stop >&2
321 . /etc/sysconfig/authdaemon
322 if [ "$METHOD" = "mysql" ]; then
323 if [ -f /var/lock/subsys/authdaemon ]; then
324 /etc/rc.d/init.d/authdaemon restart >&2
326 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
332 . /etc/sysconfig/authdaemon
333 if [ "$1" = "$0" -a "$METHOD" = "mysql" ]; then
334 if [ -f /var/lock/subsys/authdaemon ]; then
335 /etc/rc.d/init.d/authdaemon stop >&2
340 %defattr(644,root,root,755)
341 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/imap
342 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.imap
343 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap
344 %attr(754,root,root) /etc/rc.d/init.d/courier-imap
345 %{_sysconfdir}/imapd.cnf
346 %attr(755,root,root) %{_bindir}/imapd
347 %attr(755,root,root) %{_bindir}/maildirkw
348 %attr(755,root,root) %{_sbindir}/imaplogin
349 %attr(755,root,root) %{_sbindir}/mkimapdcert
350 %{_mandir}/man8/imapd*
351 %{_mandir}/man1/maildirkw.1*
354 %defattr(644,root,root,755)
355 %doc README* imap/BUGS ChangeLog AUTHORS
356 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/authdaemon
357 %attr(754,root,root) /etc/rc.d/init.d/authdaemon
358 %attr(700,root,root) /var/lib/authdaemon
359 %attr(750,root,root) %dir %{_sysconfdir}
361 %dir %{_libexecdir}/authlib
362 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authdaemonrc
363 %{_sysconfdir}/quotawarnmsg.example
364 %attr(755,root,root) %{_bindir}/couriertls
365 %attr(755,root,root) %{_libexecdir}/authlib/authdaemon
366 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.plain
367 %attr(755,root,root) %{_libexecdir}/couriertcpd
368 %attr(755,root,root) %{_libexecdir}/courierlogger
369 %attr(755,root,root) %{_libexecdir}/makedatprog
370 %{_mandir}/man8/auth[cdsuv]*
371 %{_mandir}/man8/authp[aw]*
372 %{_mandir}/man7/authlib*
373 %{_mandir}/man1/couriert*
374 %{_mandir}/man8/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*