3 # _without_ldap - without LDAP support
4 # _without_mysql - without MySQL support
5 # _without_postgresql - without PostgreSQL support
6 Summary: Courier-IMAP server
7 Summary(pl): Serwer Courier-IMAP
12 Group: Networking/Daemons
13 Group(de): Netzwerkwesen/Server
14 Group(pl): Sieciowe/Serwery
15 Source0: http://download.sourceforge.net/courier/%{name}-%{version}.tar.gz
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 %{!?_without_postgresql:BuildRequires: postgresql-devel}
27 %{!?_without_mysql:BuildRequires: mysql-devel}
28 %{!?_without_mysql:BuildRequires: zlib-devel}
29 %{!?_without_ldap:BuildRequires: openldap-devel}
30 BuildRequires: gdbm-devel
31 BuildRequires: libstdc++-devel
32 BuildRequires: openssl-devel
33 BuildRequires: kernel-headers
35 Prereq: %{name}-common = %{version}
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 %define _libexecdir /usr/lib/courier-imap
40 %define _sysconfdir /etc/courier-imap
43 Courier-IMAP is an IMAP server for Maildir mailboxes.
46 Courier-IMAP jest serwerem IMAP dla skrzynek pocztowych Maildir.
49 Summary: Common files for imap and pop daemons
50 Summary(pl): Pliki wspólne dla serwerów imap i pop
51 Group: Networking/Daemons
52 Group(de): Netzwerkwesen/Server
53 Group(pl): Sieciowe/Serwery
55 Prereq: /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 Group: Networking/Daemons
69 Group(de): Netzwerkwesen/Server
70 Group(pl): Sieciowe/Serwery
73 Commands used to create the /etc/userdb.dat
76 Summary: Deliver to a maildir with a quota
77 Group: Networking/Daemons
78 Group(de): Netzwerkwesen/Server
79 Group(pl): Sieciowe/Serwery
81 %description deliverquota
82 deliverquota is a temporary hack to implement E-mail delivery to a
83 maildir with a software-imposed quota.
86 Summary: Tool for making mail folders in Maildir format.
87 Group: Networking/Daemons
88 Group(de): Netzwerkwesen/Server
89 Group(pl): Sieciowe/Serwery
90 Conflicts: qmail-maildirmake
92 %description maildirmake
93 Maildirmake is a tool for making mail folders in Maildir format.
96 Summary: Courier-IMAP POP3 Server
97 Summary(pl): Serwer Courier-IMAP POP3
98 Group: Networking/Daemons
99 Group(de): Netzwerkwesen/Server
100 Group(pl): Sieciowe/Serwery
101 Prereq: %{name}-common = %{version}
103 Obsoletes: pop3daemon
106 Courier-IMAP POP3 is an POP3 server for Maildir mailboxes.
108 %description pop3 -l pl
109 Courier-IMAP POP3 jest serwerem POP3 dla skrzynek pocztowych Maildir.
112 Summary: LDAP authentication daemon for Courier IMAP
113 Summary(pl): Demon autentykacji LDAP do Courier IMAP
114 Group: Networking/Daemons
115 Group(de): Netzwerkwesen/Server
116 Group(pl): Sieciowe/Serwery
117 Prereq: %{name}-common = %{version}
119 %description authldap
120 This package provides LDAP authentication for Courier IMAP.
122 %description authldap -l pl
123 Ten pakiet pozwala na korzystanie z autentykacji LDAP w Courier IMAP.
126 Summary: MySQL authentication daemon for Courier IMAP
127 Summary(pl): Demon autentykacji MySQL do Courier IMAP
128 Group: Networking/Daemons
129 Group(de): Netzwerkwesen/Server
130 Group(pl): Sieciowe/Serwery
131 Prereq: %{name}-common = %{version}
134 %description authmysql
135 This package provides MySQL authentication for Courier IMAP.
137 %description authmysql -l pl
138 Ten pakiet pozwala na korzystanie z autentykacji MySQL w Courier IMAP.
141 Summary: PostgreSQL authentication daemon for Courier IMAP
142 Summary(pl): Demon autentykacji PostgreSQL do Courier IMAP
143 Group: Networking/Daemons
144 Group(de): Netzwerkwesen/Server
145 Group(pl): Sieciowe/Serwery
146 Prereq: %{name}-common = %{version}
148 %description authpgsql
149 This package provides PostgreSQL authentication for Courier IMAP.
151 %description authpgsql -l pl
152 Ten pakiet pozwala na korzystanie z autentykacji PostgreSQL w Courier IMAP.
161 --with-authchangepwdir=/var/tmp \
162 --with-authdaemonvar=/var/lib/authdaemon \
163 %{!?_without_mysql:--with-mysql-libs=%{_libdir} --with-mysql-includes=%{_includedir}/mysql} \
164 %{?_without_mysql:--without-authmysql} \
165 %{!?_without_postgresql:--with-pgsql-libs=%{_libdir} --with-pgsql-includes=%{_includedir}/postgresql} \
166 %{?_without_postgresql:--without-authpgsql} \
167 %{?_without_ldap:--without-authldap}
172 rm -rf $RPM_BUILD_ROOT
173 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig} \
174 $RPM_BUILD_ROOT{%{_sysconfdir},/var/lib/authdaemon}
176 %{__make} install DESTDIR=$RPM_BUILD_ROOT
178 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap
179 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap-pop3
180 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/authdaemon
182 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/imap
183 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/pop3
185 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap
186 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap-pop3
187 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/authdaemon
189 rm -rf $RPM_BUILD_ROOT%{_mandir}/man8/{authcram,authpam,authpwd,authshadow,authuserdb,authvchkpw,pw2userdb,vchkpw2userdb,authdaemon,authdaemond,authldap,authmysql}.8 \
190 $RPM_BUILD_ROOT%{_sbindir}/{*db,mk*cert}
192 mv -f authlib/README.authmysql.html README.authmysql.html
193 mv -f authlib/README.ldap README.ldap
194 mv -f authlib/README.myownquery README.myownquery
195 mv -f imap/README README.imap
196 mv -f maildir/README.maildirquota.txt README.maildirquota
198 install authlib/authdaemonrc $RPM_BUILD_ROOT%{_sysconfdir}
199 install authlib/authldaprc $RPM_BUILD_ROOT%{_sysconfdir}
200 install authlib/authmysqlrc $RPM_BUILD_ROOT%{_sysconfdir}
201 install authlib/authpgsqlrc $RPM_BUILD_ROOT%{_sysconfdir}
203 mv -f $RPM_BUILD_ROOT%{_datadir}/*db \
204 $RPM_BUILD_ROOT%{_sbindir}
205 mv -f $RPM_BUILD_ROOT%{_datadir}/mk*cert \
206 $RPM_BUILD_ROOT%{_sbindir}
208 mv -f tcpd/couriertls.1 $RPM_BUILD_ROOT%{_mandir}/man8/couriertls.1
209 mv -f imap/courierpop3d.8 $RPM_BUILD_ROOT%{_mandir}/man8/courierpop3d.8
211 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authcram.8
212 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpam.8
213 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpwd.8
214 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authshadow.8
215 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authuserdb.8
216 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authvchkpw.8
217 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemon.8
218 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemond.8
219 %{!?_without_pgsql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpgsql.8}
220 %{!?_without_mysql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authmysql.8}
221 %{!?_without_ldap:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authldap.8}
222 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8
223 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8
225 gzip -9nf README* imap/BUGS AUTHORS COPYING
227 touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap}
230 rm -rf $RPM_BUILD_ROOT
233 /sbin/chkconfig --add courier-imap
235 if [ -f /var/lock/subsys/courier-imap ]; then
236 /etc/rc.d/init.d/courier-imap restart >&2
238 echo "Run \"/etc/rc.d/init.d/courier-imap start\" to start courier-imap daemon."
242 if [ "$1" = "0" ]; then
243 if [ -f /var/lock/subsys/courier-imap ]; then
244 /etc/rc.d/init.d/courier-imap stop >&2
246 /sbin/chkconfig --del courier-imap
250 /sbin/chkconfig --add authdaemon
252 if [ -f /var/lock/subsys/authdaemon ]; then
253 /etc/rc.d/init.d/authdaemon restart >&2
255 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
259 if [ "$1" = "0" ]; then
260 if [ -f /var/lock/subsys/authdaemon ]; then
261 /etc/rc.d/init.d/authdaemon stop >&2
264 /sbin/chkconfig --del authdaemon
268 /sbin/chkconfig --add courier-imap-pop3
270 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
271 /etc/rc.d/init.d/courier-imap-pop3 restart >&2
273 echo "Run \"/etc/rc.d/init.d/courier-imap-pop3 start\" to start courier-imap pop3 daemon."
277 if [ "$1" = "0" ]; then
278 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
279 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
281 /sbin/chkconfig --del courier-imap-pop3
286 . /etc/sysconfig/authdaemon
287 if [ "$METHOD" = "ldap" ]; then
288 if [ -f /var/lock/subsys/authdaemon ]; then
289 /etc/rc.d/init.d/authdaemon restart >&2
291 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
297 . /etc/sysconfig/authdaemon
298 if [ "$1" = "$0" -a "$METHOD" = "ldap" ]; then
299 if [ -f /var/lock/subsys/authdaemon ]; then
300 /etc/rc.d/init.d/authdaemon stop >&2
306 . /etc/sysconfig/authdaemon
307 if [ "$METHOD" = "mysql" ]; then
308 if [ -f /var/lock/subsys/authdaemon ]; then
309 /etc/rc.d/init.d/authdaemon restart >&2
311 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
317 . /etc/sysconfig/authdaemon
318 if [ "$1" = "$0" -a "$METHOD" = "mysql" ]; then
319 if [ -f /var/lock/subsys/authdaemon ]; then
320 /etc/rc.d/init.d/authdaemon stop >&2
325 %defattr(644,root,root,755)
326 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/imap
327 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.imap
328 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap
329 %attr(754,root,root) /etc/rc.d/init.d/courier-imap
330 %{_sysconfdir}/imapd.cnf
331 %attr(755,root,root) %{_bindir}/imapd
332 %attr(755,root,root) %{_sbindir}/imaplogin
333 %attr(755,root,root) %{_sbindir}/mkimapdcert
334 %{_mandir}/man8/imapd*
337 %defattr(644,root,root,755)
339 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/authdaemon
340 %attr(754,root,root) /etc/rc.d/init.d/authdaemon
341 %attr(700,root,root) /var/lib/authdaemon
342 %attr(750,root,root) %dir %{_sysconfdir}
344 %dir %{_libexecdir}/authlib
345 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authdaemonrc
346 %{_sysconfdir}/quotawarnmsg.example
347 %attr(755,root,root) %{_bindir}/couriertls
348 %attr(755,root,root) %{_libexecdir}/authlib/authdaemon
349 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.plain
350 %attr(755,root,root) %{_libexecdir}/couriertcpd
351 %attr(755,root,root) %{_libexecdir}/logger
352 %attr(755,root,root) %{_libexecdir}/makedatprog
353 %{_mandir}/man8/auth[cdpsuv]*
354 %{_mandir}/man7/authlib*
355 %{_mandir}/man1/couriert*
359 %defattr(644,root,root,755)
360 %attr(755,root,root) %{_sbindir}/makeuserdb
361 %attr(755,root,root) %{_sbindir}/pw2userdb
362 %attr(755,root,root) %{_sbindir}/userdb
363 %attr(755,root,root) %{_sbindir}/userdbpw
364 %attr(755,root,root) %{_sbindir}/vchkpw2userdb
365 %{_mandir}/man8/makeuserdb*
366 %{_mandir}/man8/userdb*
367 %{_mandir}/man8/*pw2userdb*
370 %defattr(644,root,root,755)
371 %attr(755,root,root) %{_libexecdir}/deliverquota
372 %{_mandir}/man8/deliverquota*
375 %defattr(644,root,root,755)
376 %attr(755,root,root) %{_bindir}/maildirmake
377 %{_mandir}/man1/maildirmake*
380 %defattr(644,root,root,755)
381 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/pop3
382 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.pop3
383 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap-pop3
384 %attr(754,root,root) /etc/rc.d/init.d/courier-imap-pop3
385 %attr(755,root,root) %{_bindir}/pop3d
386 %attr(755,root,root) %{_sbindir}/mkpop3dcert
387 %attr(755,root,root) %{_sbindir}/pop3login
388 %{_sysconfdir}/pop3d.cnf
389 %{_mandir}/man8/courierpop*
391 %if %{?_without_ldap:0}%{!?_without_ldap:1}
393 %defattr(644,root,root,755)
394 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authldaprc
395 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.ldap
396 %{_mandir}/man8/authldap*
399 %if %{?_without_mysql:0}%{!?_without_mysql:1}
401 %defattr(644,root,root,755)
402 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authmysqlrc
403 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.mysql
404 %{_mandir}/man8/authmysql*
407 %if %{?_without_pgsql:0}%{!?_without_pgsql:1}
409 %defattr(644,root,root,755)
410 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authpgsqlrc
411 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.pgsql
412 %{_mandir}/man8/authpgsql*