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 Source0: http://download.sourceforge.net/courier/%{name}-%{version}.tar.gz
15 Source2: %{name}-pop3.init
16 Source3: %{name}-authdaemon.init
18 Source5: %{name}-pop3.pamd
19 Source6: %{name}.sysconfig
20 Source7: %{name}-pop3.sysconfig
21 Source8: %{name}-authdaemon.sysconfig
22 Patch0: ftp://ftp.pld.org.pl/people/siefca/patches/courier/%{name}-myownquery-fix.patch
23 URL: http://www.inter7.com/courierimap/
24 %{!?_without_postgresql:BuildRequires: postgresql-devel}
25 %{!?_without_mysql:BuildRequires: mysql-devel}
26 %{!?_without_mysql:BuildRequires: zlib-devel}
27 %{!?_without_ldap:BuildRequires: openldap-devel}
28 BuildRequires: gdbm-devel
29 BuildRequires: libstdc++-devel
30 BuildRequires: openssl-devel
31 PreReq: %{name}-common = %{version}
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 %define _libexecdir /usr/lib/courier-imap
38 %define _sysconfdir /etc/courier-imap
41 Courier-IMAP is an IMAP server for Maildir mailboxes.
44 Courier-IMAP jest serwerem IMAP dla skrzynek pocztowych Maildir.
47 Summary: Common files for imap and pop daemons
48 Summary(pl): Pliki wspólne dla serwerów imap i pop
49 Group: Networking/Daemons
51 PreReq: /sbin/chkconfig
52 Requires: %{name}-maildirmake
53 Requires: %{name}-deliverquota
54 Requires: %{name}-userdb
57 Common files for imap and pop daemons.
59 %description common -l pl
60 Pliki wspólne dla serwerów imap i pop.
63 Summary: Commands used to create the /etc/userdb.dat
64 Summary(pl): Polecenia do tworzenia /etc/userdb.dat
65 Group: Networking/Daemons
68 Commands used to create the /etc/userdb.dat.
70 %description userdb -l pl
71 Polecenia u¿ywane do stworzenia /etc/userdb.dat.
74 Summary: Deliver to a Maildir with a quota
75 Summary(pl): Obs³uga quoty przy dostarczaniu poczty do skrzynek Maildir
76 Group: Networking/Daemons
78 %description deliverquota
79 deliverquota is a temporary hack to implement E-mail delivery to a
80 Maildir with a software-imposed quota.
82 %description deliverquota -l pl
83 deliverquota jest tymczasowym rozwi±zaniem implementuj±cym
84 dostarczanie e-maili do skrzynek Maildir z programowo narzucon± quot±.
87 Summary: Tool for making mail folders in Maildir format
88 Summary(pl): Narzêdzie do tworzenia folderów w formacie Maildir
89 Group: Networking/Daemons
90 Conflicts: qmail-maildirmake
92 %description maildirmake
93 Maildirmake is a tool for making mail folders in Maildir format.
95 %description maildirmake -l pl
96 Maildirmake jest narzêdziem do tworzenia folderów pocztowych w
100 Summary: Courier-IMAP POP3 Server
101 Summary(pl): Serwer Courier-IMAP POP3
102 Group: Networking/Daemons
103 PreReq: %{name}-common = %{version}
105 Obsoletes: pop3daemon
108 Conflicts: solid-pop3d
111 Courier-IMAP POP3 is an POP3 server for Maildir mailboxes.
113 %description pop3 -l pl
114 Courier-IMAP POP3 jest serwerem POP3 dla skrzynek pocztowych Maildir.
117 Summary: LDAP authentication daemon for Courier IMAP
118 Summary(pl): Demon autentykacji LDAP do Courier IMAP
119 Group: Networking/Daemons
120 PreReq: %{name}-common = %{version}
122 %description authldap
123 This package provides LDAP authentication for Courier IMAP.
125 %description authldap -l pl
126 Ten pakiet pozwala na korzystanie z autentykacji LDAP w Courier IMAP.
129 Summary: MySQL authentication daemon for Courier IMAP
130 Summary(pl): Demon autentykacji MySQL do Courier IMAP
131 Group: Networking/Daemons
132 PreReq: %{name}-common = %{version}
135 %description authmysql
136 This package provides MySQL authentication for Courier IMAP.
138 %description authmysql -l pl
139 Ten pakiet pozwala na korzystanie z autentykacji MySQL w Courier IMAP.
142 Summary: PostgreSQL authentication daemon for Courier IMAP
143 Summary(pl): Demon autentykacji PostgreSQL do Courier IMAP
144 Group: Networking/Daemons
145 PreReq: %{name}-common = %{version}
147 %description authpgsql
148 This package provides PostgreSQL authentication for Courier IMAP.
150 %description authpgsql -l pl
151 Ten pakiet pozwala na korzystanie z autentykacji PostgreSQL w Courier
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.authmysql.myownquery README.authmysql.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 touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap}
228 rm -rf $RPM_BUILD_ROOT
231 /sbin/chkconfig --add courier-imap
233 if [ -f /var/lock/subsys/courier-imap ]; then
234 /etc/rc.d/init.d/courier-imap restart >&2
236 echo "Run \"/etc/rc.d/init.d/courier-imap start\" to start courier-imap daemon."
240 if [ "$1" = "0" ]; then
241 if [ -f /var/lock/subsys/courier-imap ]; then
242 /etc/rc.d/init.d/courier-imap stop >&2
244 /sbin/chkconfig --del courier-imap
248 /sbin/chkconfig --add authdaemon
250 if [ -f /var/lock/subsys/authdaemon ]; then
251 /etc/rc.d/init.d/authdaemon restart >&2
253 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
257 if [ "$1" = "0" ]; then
258 if [ -f /var/lock/subsys/authdaemon ]; then
259 /etc/rc.d/init.d/authdaemon stop >&2
262 /sbin/chkconfig --del authdaemon
266 /sbin/chkconfig --add courier-imap-pop3
268 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
269 /etc/rc.d/init.d/courier-imap-pop3 restart >&2
271 echo "Run \"/etc/rc.d/init.d/courier-imap-pop3 start\" to start courier-imap pop3 daemon."
275 if [ "$1" = "0" ]; then
276 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
277 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
279 /sbin/chkconfig --del courier-imap-pop3
284 . /etc/sysconfig/authdaemon
285 if [ "$METHOD" = "ldap" ]; then
286 if [ -f /var/lock/subsys/authdaemon ]; then
287 /etc/rc.d/init.d/authdaemon restart >&2
289 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
295 . /etc/sysconfig/authdaemon
296 if [ "$1" = "$0" -a "$METHOD" = "ldap" ]; then
297 if [ -f /var/lock/subsys/authdaemon ]; then
298 /etc/rc.d/init.d/authdaemon stop >&2
304 . /etc/sysconfig/authdaemon
305 if [ "$METHOD" = "mysql" ]; then
306 if [ -f /var/lock/subsys/authdaemon ]; then
307 /etc/rc.d/init.d/authdaemon restart >&2
309 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
315 . /etc/sysconfig/authdaemon
316 if [ "$1" = "$0" -a "$METHOD" = "mysql" ]; then
317 if [ -f /var/lock/subsys/authdaemon ]; then
318 /etc/rc.d/init.d/authdaemon stop >&2
323 %defattr(644,root,root,755)
324 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/imap
325 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.imap
326 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap
327 %attr(754,root,root) /etc/rc.d/init.d/courier-imap
328 %{_sysconfdir}/imapd.cnf
329 %attr(755,root,root) %{_bindir}/imapd
330 %attr(755,root,root) %{_sbindir}/imaplogin
331 %attr(755,root,root) %{_sbindir}/mkimapdcert
332 %{_mandir}/man8/imapd*
335 %defattr(644,root,root,755)
336 %doc README* imap/BUGS AUTHORS
337 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/authdaemon
338 %attr(754,root,root) /etc/rc.d/init.d/authdaemon
339 %attr(700,root,root) /var/lib/authdaemon
340 %attr(750,root,root) %dir %{_sysconfdir}
342 %dir %{_libexecdir}/authlib
343 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authdaemonrc
344 %{_sysconfdir}/quotawarnmsg.example
345 %attr(755,root,root) %{_bindir}/couriertls
346 %attr(755,root,root) %{_libexecdir}/authlib/authdaemon
347 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.plain
348 %attr(755,root,root) %{_libexecdir}/couriertcpd
349 %attr(755,root,root) %{_libexecdir}/logger
350 %attr(755,root,root) %{_libexecdir}/makedatprog
351 %{_mandir}/man8/auth[cdsuv]*
352 %{_mandir}/man8/authp[aw]*
353 %{_mandir}/man7/authlib*
354 %{_mandir}/man1/couriert*
358 %defattr(644,root,root,755)
359 %attr(755,root,root) %{_sbindir}/makeuserdb
360 %attr(755,root,root) %{_sbindir}/pw2userdb
361 %attr(755,root,root) %{_sbindir}/userdb
362 %attr(755,root,root) %{_sbindir}/userdbpw
363 %attr(755,root,root) %{_sbindir}/vchkpw2userdb
364 %{_mandir}/man8/makeuserdb*
365 %{_mandir}/man8/userdb*
366 %{_mandir}/man8/*pw2userdb*
369 %defattr(644,root,root,755)
370 %attr(755,root,root) %{_libexecdir}/deliverquota
371 %{_mandir}/man8/deliverquota*
374 %defattr(644,root,root,755)
375 %attr(755,root,root) %{_bindir}/maildirmake
376 %{_mandir}/man1/maildirmake*
379 %defattr(644,root,root,755)
380 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/pop3
381 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.pop3
382 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap-pop3
383 %attr(754,root,root) /etc/rc.d/init.d/courier-imap-pop3
384 %attr(755,root,root) %{_bindir}/pop3d
385 %attr(755,root,root) %{_sbindir}/mkpop3dcert
386 %attr(755,root,root) %{_sbindir}/pop3login
387 %{_sysconfdir}/pop3d.cnf
388 %{_mandir}/man8/courierpop*
390 %if %{?_without_ldap:0}%{!?_without_ldap:1}
392 %defattr(644,root,root,755)
393 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authldaprc
394 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.ldap
395 %{_mandir}/man8/authldap*
398 %if %{?_without_mysql:0}%{!?_without_mysql:1}
400 %defattr(644,root,root,755)
401 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authmysqlrc
402 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.mysql
403 %{_mandir}/man8/authmysql*
406 %if %{?_without_pgsql:0}%{!?_without_pgsql:1}
408 %defattr(644,root,root,755)
409 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authpgsqlrc
410 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.pgsql
411 %{_mandir}/man8/authpgsql*