3 # _without_ldap - without LDAP support
4 # _without_mysql - without MySQL support
5 # _without_pgsql - without PostgreSQL support
7 Summary: Courier-IMAP server
8 Summary(pl): Serwer Courier-IMAP
13 Group: Networking/Daemons
14 Source0: http://dl.sourceforge.net/courier/%{name}-%{version}.tar.bz2
15 # Source0-md5: 71d9e88053351dbf7df04943189ec1cd
17 Source2: %{name}-pop3.init
18 Source3: %{name}-authdaemon.init
20 Source5: %{name}-pop3.pamd
21 Source6: %{name}.sysconfig
22 Source7: %{name}-pop3.sysconfig
23 Source8: %{name}-authdaemon.sysconfig
24 # Patch0: ftp://ftp.pld.org.pl/people/siefca/patches/courier/%{name}-myownquery.patch
25 URL: http://www.inter7.com/courierimap/
26 BuildRequires: gdbm-devel
27 BuildRequires: libstdc++-devel
28 %{!?_without_mysql:BuildRequires: mysql-devel}
29 %{!?_without_ldap:BuildRequires: openldap-devel}
30 BuildRequires: openssl-devel >= 0.9.7
31 %{!?_without_pgsql:BuildRequires: postgresql-devel}
32 %{!?_without_mysql:BuildRequires: zlib-devel}
33 PreReq: %{name}-common = %{version}
35 Requires(post,preun): /sbin/chkconfig
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}-maildirmake
58 Requires: %{name}-deliverquota
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}
110 Obsoletes: pop3daemon
111 Conflicts: cyrus-imapd
114 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 %{!?_without_mysql:--with-mysql-libs=%{_libdir} --with-mysql-includes=%{_includedir}/mysql} \
170 %{?_without_mysql:--without-authmysql} \
171 %{!?_without_pgsql:--with-pgsql-libs=%{_libdir} --with-pgsql-includes=%{_includedir}/postgresql} \
172 %{?_without_pgsql:--without-authpgsql} \
173 %{?_without_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 %{!?_without_pgsql:echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authpgsql.8}
228 %{!?_without_mysql:echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authmysql.8}
229 %{!?_without_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*
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*
409 %if %{?_without_ldap:0}%{!?_without_ldap:1}
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*
417 %if %{?_without_mysql:0}%{!?_without_mysql:1}
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*
425 %if %{?_without_pgsql:0}%{!?_without_pgsql:1}
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*