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 URL: http://www.inter7.com/courierimap/
25 %{!?_without_postgresql: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
32 BuildRequires: kernel-headers
34 Prereq: %{name}-common = %{version}
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 %define _libexecdir /usr/lib/courier-imap
39 %define _sysconfdir /etc/courier-imap
42 Courier-IMAP is an IMAP server for Maildir mailboxes.
45 Courier-IMAP jest serwerem IMAP dla skrzynek pocztowych Maildir.
48 Summary: Common files for imap and pop daemons
49 Summary(pl): Pliki wspólne dla serwerów imap i pop
50 Group: Networking/Daemons
51 Group(de): Netzwerkwesen/Server
52 Group(pl): Sieciowe/Serwery
54 Prereq: /sbin/chkconfig
55 Requires: %{name}-maildirmake
56 Requires: %{name}-deliverquota
57 Requires: %{name}-userdb
60 Common files for imap and pop daemons.
62 %description common -l pl
63 Pliki wspólne dla serwerów imap i pop.
66 Summary: Commands used to create the /etc/userdb.dat
67 Group: Networking/Daemons
68 Group(de): Netzwerkwesen/Server
69 Group(pl): Sieciowe/Serwery
72 Commands used to create the /etc/userdb.dat
75 Summary: Deliver to a maildir with a quota
76 Group: Networking/Daemons
77 Group(de): Netzwerkwesen/Server
78 Group(pl): Sieciowe/Serwery
80 %description deliverquota
81 deliverquota is a temporary hack to implement E-mail delivery to a
82 maildir with a software-imposed quota.
85 Summary: Tool for making mail folders in Maildir format.
86 Group: Networking/Daemons
87 Group(de): Netzwerkwesen/Server
88 Group(pl): Sieciowe/Serwery
89 Conflicts: qmail-maildirmake
91 %description maildirmake
92 Maildirmake is a tool for making mail folders in Maildir format.
95 Summary: Courier-IMAP POP3 Server
96 Summary(pl): Serwer Courier-IMAP POP3
97 Group: Networking/Daemons
98 Group(de): Netzwerkwesen/Server
99 Group(pl): Sieciowe/Serwery
100 Prereq: %{name}-common = %{version}
102 Obsoletes: pop3daemon
105 Courier-IMAP POP3 is an POP3 server for Maildir mailboxes.
107 %description pop3 -l pl
108 Courier-IMAP POP3 jest serwerem POP3 dla skrzynek pocztowych Maildir.
111 Summary: LDAP authentication daemon for Courier IMAP
112 Summary(pl): Demon autentykacji LDAP do Courier IMAP
113 Group: Networking/Daemons
114 Group(de): Netzwerkwesen/Server
115 Group(pl): Sieciowe/Serwery
116 Prereq: %{name}-common = %{version}
118 %description authldap
119 This package provides LDAP authentication for Courier IMAP.
121 %description authldap -l pl
122 Ten pakiet pozwala na korzystanie z autentykacji LDAP w Courier IMAP.
125 Summary: MySQL authentication daemon for Courier IMAP
126 Summary(pl): Demon autentykacji MySQL do Courier IMAP
127 Group: Networking/Daemons
128 Group(de): Netzwerkwesen/Server
129 Group(pl): Sieciowe/Serwery
130 Prereq: %{name}-common = %{version}
133 %description authmysql
134 This package provides MySQL authentication for Courier IMAP.
136 %description authmysql -l pl
137 Ten pakiet pozwala na korzystanie z autentykacji MySQL w Courier IMAP.
140 Summary: PostgreSQL authentication daemon for Courier IMAP
141 Summary(pl): Demon autentykacji PostgreSQL do Courier IMAP
142 Group: Networking/Daemons
143 Group(de): Netzwerkwesen/Server
144 Group(pl): Sieciowe/Serwery
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 IMAP.
159 --with-authchangepwdir=/var/tmp \
160 --with-authdaemonvar=/var/lib/authdaemon \
161 %{!?_without_mysql:--with-mysql-libs=%{_libdir} --with-mysql-includes=%{_includedir}/mysql} \
162 %{?_without_mysql:--without-authmysql} \
163 %{!?_without_postgresql:--with-pgsql-libs=%{_libdir} --with-pgsql-includes=%{_includedir}/postgresql} \
164 %{?_without_postgresql:--without-authpgsql} \
165 %{?_without_ldap:--without-authldap}
170 rm -rf $RPM_BUILD_ROOT
171 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig} \
172 $RPM_BUILD_ROOT{%{_sysconfdir},/var/lib/authdaemon}
174 %{__make} install DESTDIR=$RPM_BUILD_ROOT
176 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap
177 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap-pop3
178 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/authdaemon
180 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/imap
181 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/pop3
183 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap
184 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap-pop3
185 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/authdaemon
187 rm -rf $RPM_BUILD_ROOT%{_mandir}/man8/{authcram,authpam,authpwd,authshadow,authuserdb,authvchkpw,pw2userdb,vchkpw2userdb,authdaemon,authdaemond,authldap,authmysql}.8 \
188 $RPM_BUILD_ROOT%{_sbindir}/{*db,mk*cert}
190 mv -f authlib/README.authmysql.html README.authmysql.html
191 mv -f authlib/README.ldap README.ldap
192 mv -f authlib/README.authmysql.myownquery README.authmysql.myownquery
193 mv -f imap/README README.imap
194 mv -f maildir/README.maildirquota.txt README.maildirquota
196 install authlib/authdaemonrc $RPM_BUILD_ROOT%{_sysconfdir}
197 install authlib/authldaprc $RPM_BUILD_ROOT%{_sysconfdir}
198 install authlib/authmysqlrc $RPM_BUILD_ROOT%{_sysconfdir}
199 install authlib/authpgsqlrc $RPM_BUILD_ROOT%{_sysconfdir}
201 mv -f $RPM_BUILD_ROOT%{_datadir}/*db \
202 $RPM_BUILD_ROOT%{_sbindir}
203 mv -f $RPM_BUILD_ROOT%{_datadir}/mk*cert \
204 $RPM_BUILD_ROOT%{_sbindir}
206 mv -f tcpd/couriertls.1 $RPM_BUILD_ROOT%{_mandir}/man8/couriertls.1
207 mv -f imap/courierpop3d.8 $RPM_BUILD_ROOT%{_mandir}/man8/courierpop3d.8
209 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authcram.8
210 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpam.8
211 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpwd.8
212 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authshadow.8
213 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authuserdb.8
214 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authvchkpw.8
215 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemon.8
216 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemond.8
217 %{!?_without_pgsql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpgsql.8}
218 %{!?_without_mysql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authmysql.8}
219 %{!?_without_ldap:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authldap.8}
220 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8
221 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8
223 gzip -9nf README* imap/BUGS AUTHORS COPYING
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)
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[cdpsuv]*
352 %{_mandir}/man7/authlib*
353 %{_mandir}/man1/couriert*
357 %defattr(644,root,root,755)
358 %attr(755,root,root) %{_sbindir}/makeuserdb
359 %attr(755,root,root) %{_sbindir}/pw2userdb
360 %attr(755,root,root) %{_sbindir}/userdb
361 %attr(755,root,root) %{_sbindir}/userdbpw
362 %attr(755,root,root) %{_sbindir}/vchkpw2userdb
363 %{_mandir}/man8/makeuserdb*
364 %{_mandir}/man8/userdb*
365 %{_mandir}/man8/*pw2userdb*
368 %defattr(644,root,root,755)
369 %attr(755,root,root) %{_libexecdir}/deliverquota
370 %{_mandir}/man8/deliverquota*
373 %defattr(644,root,root,755)
374 %attr(755,root,root) %{_bindir}/maildirmake
375 %{_mandir}/man1/maildirmake*
378 %defattr(644,root,root,755)
379 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/pop3
380 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.pop3
381 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap-pop3
382 %attr(754,root,root) /etc/rc.d/init.d/courier-imap-pop3
383 %attr(755,root,root) %{_bindir}/pop3d
384 %attr(755,root,root) %{_sbindir}/mkpop3dcert
385 %attr(755,root,root) %{_sbindir}/pop3login
386 %{_sysconfdir}/pop3d.cnf
387 %{_mandir}/man8/courierpop*
389 %if %{?_without_ldap:0}%{!?_without_ldap:1}
391 %defattr(644,root,root,755)
392 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authldaprc
393 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.ldap
394 %{_mandir}/man8/authldap*
397 %if %{?_without_mysql:0}%{!?_without_mysql:1}
399 %defattr(644,root,root,755)
400 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authmysqlrc
401 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.mysql
402 %{_mandir}/man8/authmysql*
405 %if %{?_without_pgsql:0}%{!?_without_pgsql:1}
407 %defattr(644,root,root,755)
408 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authpgsqlrc
409 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.pgsql
410 %{_mandir}/man8/authpgsql*