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
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 %{!?_without_pgsql:BuildRequires: postgresql-devel}
26 %{!?_without_mysql:BuildRequires: mysql-devel}
27 %{!?_without_mysql:BuildRequires: zlib-devel}
28 %{!?_without_ldap:BuildRequires: openldap-devel}
29 BuildRequires: gdbm-devel
30 BuildRequires: libstdc++-devel
31 BuildRequires: openssl-devel >= 0.9.7
32 PreReq: %{name}-common = %{version}
34 Requires(post,preun): /sbin/chkconfig
37 Conflicts: cyrus-imapd
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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}-maildirmake
57 Requires: %{name}-deliverquota
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}
109 Obsoletes: pop3daemon
110 Conflicts: cyrus-imapd
113 Conflicts: solid-pop3d
116 Courier-IMAP POP3 is an POP3 server for Maildir mailboxes.
118 %description pop3 -l pl
119 Courier-IMAP POP3 jest serwerem POP3 dla skrzynek pocztowych Maildir.
122 Summary: LDAP authentication daemon for Courier IMAP
123 Summary(pl): Demon autentykacji LDAP do Courier IMAP
124 Group: Networking/Daemons
125 PreReq: %{name}-common = %{version}
127 %description authldap
128 This package provides LDAP authentication for Courier IMAP.
130 %description authldap -l pl
131 Ten pakiet pozwala na korzystanie z autentykacji LDAP w Courier IMAP.
134 Summary: MySQL authentication daemon for Courier IMAP
135 Summary(pl): Demon autentykacji MySQL do Courier IMAP
136 Group: Networking/Daemons
137 PreReq: %{name}-common = %{version}
140 %description authmysql
141 This package provides MySQL authentication for Courier IMAP.
143 %description authmysql -l pl
144 Ten pakiet pozwala na korzystanie z autentykacji MySQL w Courier IMAP.
147 Summary: PostgreSQL authentication daemon for Courier IMAP
148 Summary(pl): Demon autentykacji PostgreSQL do Courier IMAP
149 Group: Networking/Daemons
150 PreReq: %{name}-common = %{version}
152 %description authpgsql
153 This package provides PostgreSQL authentication for Courier IMAP.
155 %description authpgsql -l pl
156 Ten pakiet pozwala na korzystanie z autentykacji PostgreSQL w Courier
166 --with-authchangepwdir=/var/tmp \
167 --with-authdaemonvar=/var/lib/authdaemon \
168 %{!?_without_mysql:--with-mysql-libs=%{_libdir} --with-mysql-includes=%{_includedir}/mysql} \
169 %{?_without_mysql:--without-authmysql} \
170 %{!?_without_pgsql:--with-pgsql-libs=%{_libdir} --with-pgsql-includes=%{_includedir}/postgresql} \
171 %{?_without_pgsql:--without-authpgsql} \
172 %{?_without_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}
181 %{__make} install DESTDIR=$RPM_BUILD_ROOT
183 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap
184 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-pop3
185 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/authdaemon
187 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/imap
188 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/pop3
190 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap
191 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/courier-pop3
192 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/authdaemon
194 rm -rf $RPM_BUILD_ROOT%{_mandir}/man8/{authcram,authpam,authpwd,authshadow,authuserdb,authvchkpw,pw2userdb,vchkpw2userdb,authdaemon,authdaemond,authldap,authmysql}.8 \
195 $RPM_BUILD_ROOT%{_sbindir}/{*db,mk*cert}
197 mv -f authlib/README.authmysql.html README.authmysql.html
198 mv -f authlib/README.ldap README.ldap
199 mv -f authlib/README.authmysql.myownquery README.authmysql.myownquery
200 mv -f imap/README README.imap
201 mv -f imap/ChangeLog ChangeLog
202 mv -f maildir/README.maildirquota.txt README.maildirquota
204 install authlib/authdaemonrc $RPM_BUILD_ROOT%{_sysconfdir}
205 install authlib/authldaprc $RPM_BUILD_ROOT%{_sysconfdir}
206 install authlib/authmysqlrc $RPM_BUILD_ROOT%{_sysconfdir}
207 install authlib/authpgsqlrc $RPM_BUILD_ROOT%{_sysconfdir}
209 mv -f $RPM_BUILD_ROOT%{_datadir}/*db \
210 $RPM_BUILD_ROOT%{_sbindir}
211 mv -f $RPM_BUILD_ROOT%{_datadir}/mk*cert \
212 $RPM_BUILD_ROOT%{_sbindir}
214 mv -f tcpd/couriertls.1 $RPM_BUILD_ROOT%{_mandir}/man8/couriertls.8
215 mv -f imap/courierpop3d.8 $RPM_BUILD_ROOT%{_mandir}/man8/courierpop3d.8
217 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authcram.8
218 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authpam.8
219 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authpwd.8
220 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authshadow.8
221 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authuserdb.8
222 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authvchkpw.8
223 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemon.8
224 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemond.8
225 %{!?_without_pgsql:echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authpgsql.8}
226 %{!?_without_mysql:echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authmysql.8}
227 %{!?_without_ldap:echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authldap.8}
228 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8
229 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8
231 touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap}
234 rm -rf $RPM_BUILD_ROOT
237 /sbin/chkconfig --add courier-imap
239 if [ -f /var/lock/subsys/courier-imap ]; then
240 /etc/rc.d/init.d/courier-imap restart >&2
242 echo "Run \"/etc/rc.d/init.d/courier-imap start\" to start courier-imap daemon."
246 if [ "$1" = "0" ]; then
247 if [ -f /var/lock/subsys/courier-imap ]; then
248 /etc/rc.d/init.d/courier-imap stop >&2
250 /sbin/chkconfig --del courier-imap
254 /sbin/chkconfig --add authdaemon
256 if [ -f /var/lock/subsys/authdaemon ]; then
257 /etc/rc.d/init.d/authdaemon restart >&2
259 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
263 if [ "$1" = "0" ]; then
264 if [ -f /var/lock/subsys/authdaemon ]; then
265 /etc/rc.d/init.d/authdaemon stop >&2
268 /sbin/chkconfig --del authdaemon
272 /sbin/chkconfig --add courier-pop3
273 /sbin/chkconfig --del courier-imap-pop3 2>&1 >/dev/null
274 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
275 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
276 /etc/rc.d/init.d/courier-pop3 start >&2
277 elif [ -f /var/lock/subsys/courier-pop3 ]; then
278 /etc/rc.d/init.d/courier-pop3 restart >&2
280 echo "Run \"/etc/rc.d/init.d/courier-pop3 start\" to start courier-pop3 daemon."
282 rm -f /etc/rc.d/init.d/courier-imap-pop3
285 if [ "$1" = "0" ]; then
286 if [ -f /var/lock/subsys/courier-pop3 ]; then
287 /etc/rc.d/init.d/courier-pop3 stop >&2
289 /sbin/chkconfig --del courier-pop3
290 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
291 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
293 /sbin/chkconfig --del courier-imap-pop3 2>&1 >/dev/null
294 rm -f /etc/rc.d/init.d/courier-imap-pop3
299 . /etc/sysconfig/authdaemon
300 if [ "$METHOD" = "ldap" ]; then
301 if [ -f /var/lock/subsys/authdaemon ]; then
302 /etc/rc.d/init.d/authdaemon restart >&2
304 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
310 . /etc/sysconfig/authdaemon
311 if [ "$1" = "$0" -a "$METHOD" = "ldap" ]; then
312 if [ -f /var/lock/subsys/authdaemon ]; then
313 /etc/rc.d/init.d/authdaemon stop >&2
319 . /etc/sysconfig/authdaemon
320 if [ "$METHOD" = "mysql" ]; then
321 if [ -f /var/lock/subsys/authdaemon ]; then
322 /etc/rc.d/init.d/authdaemon restart >&2
324 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
330 . /etc/sysconfig/authdaemon
331 if [ "$1" = "$0" -a "$METHOD" = "mysql" ]; then
332 if [ -f /var/lock/subsys/authdaemon ]; then
333 /etc/rc.d/init.d/authdaemon stop >&2
338 %defattr(644,root,root,755)
339 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/imap
340 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.imap
341 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap
342 %attr(754,root,root) /etc/rc.d/init.d/courier-imap
343 %{_sysconfdir}/imapd.cnf
344 %attr(755,root,root) %{_bindir}/imapd
345 %attr(755,root,root) %{_sbindir}/imaplogin
346 %attr(755,root,root) %{_sbindir}/mkimapdcert
347 %{_mandir}/man8/imapd*
350 %defattr(644,root,root,755)
351 %doc README* imap/BUGS ChangeLog AUTHORS
352 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/authdaemon
353 %attr(754,root,root) /etc/rc.d/init.d/authdaemon
354 %attr(700,root,root) /var/lib/authdaemon
355 %attr(750,root,root) %dir %{_sysconfdir}
357 %dir %{_libexecdir}/authlib
358 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authdaemonrc
359 %{_sysconfdir}/quotawarnmsg.example
360 %attr(755,root,root) %{_bindir}/couriertls
361 %attr(755,root,root) %{_libexecdir}/authlib/authdaemon
362 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.plain
363 %attr(755,root,root) %{_libexecdir}/couriertcpd
364 %attr(755,root,root) %{_libexecdir}/courierlogger
365 %attr(755,root,root) %{_libexecdir}/makedatprog
366 %{_mandir}/man8/auth[cdsuv]*
367 %{_mandir}/man8/authp[aw]*
368 %{_mandir}/man7/authlib*
369 %{_mandir}/man1/couriert*
373 %defattr(644,root,root,755)
374 %attr(755,root,root) %{_sbindir}/makeuserdb
375 %attr(755,root,root) %{_sbindir}/pw2userdb
376 %attr(755,root,root) %{_sbindir}/userdb
377 %attr(755,root,root) %{_sbindir}/userdbpw
378 %attr(755,root,root) %{_sbindir}/vchkpw2userdb
379 %{_mandir}/man8/makeuserdb*
380 %{_mandir}/man8/userdb*
381 %{_mandir}/man8/*pw2userdb*
384 %defattr(644,root,root,755)
385 %attr(755,root,root) %{_bindir}/deliverquota
386 %{_mandir}/man8/deliverquota*
389 %defattr(644,root,root,755)
390 %attr(755,root,root) %{_bindir}/maildirmake
391 %{_mandir}/man1/maildirmake*
394 %defattr(644,root,root,755)
395 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/pop3
396 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.pop3
397 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-pop3
398 %attr(754,root,root) /etc/rc.d/init.d/courier-pop3
399 %attr(755,root,root) %{_bindir}/pop3d
400 %attr(755,root,root) %{_sbindir}/mkpop3dcert
401 %attr(755,root,root) %{_sbindir}/pop3login
402 %{_sysconfdir}/pop3d.cnf
403 %{_mandir}/man8/courierpop*
405 %if %{?_without_ldap:0}%{!?_without_ldap:1}
407 %defattr(644,root,root,755)
408 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authldaprc
409 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.ldap
410 %{_mandir}/man8/authldap*
413 %if %{?_without_mysql:0}%{!?_without_mysql:1}
415 %defattr(644,root,root,755)
416 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authmysqlrc
417 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.mysql
418 %{_mandir}/man8/authmysql*
421 %if %{?_without_pgsql:0}%{!?_without_pgsql:1}
423 %defattr(644,root,root,755)
424 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authpgsqlrc
425 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.pgsql
426 %{_mandir}/man8/authpgsql*