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_ldap:BuildRequires: openldap-devel}
29 BuildRequires: gdbm-devel
30 BuildRequires: libstdc++-devel
31 BuildRequires: openssl-devel
33 Prereq: %{name}-common = %{version}
34 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
50 Group(de): Netzwerkwesen/Server
51 Group(pl): Sieciowe/Serwery
53 Prereq: /sbin/chkconfig
54 Requires: %{name}-maildirmake
55 Requires: %{name}-deliverquota
56 Requires: %{name}-userdb
59 Common files for imap and pop daemons.
61 %description common -l pl
62 Pliki wspólne dla serwerów imap i pop.
65 Summary: Commands used to create the /etc/userdb.dat
66 Group: Networking/Daemons
67 Group(de): Netzwerkwesen/Server
68 Group(pl): Sieciowe/Serwery
71 Commands used to create the /etc/userdb.dat
74 Summary: Deliver to a maildir with a quota
75 Group: Networking/Daemons
76 Group(de): Netzwerkwesen/Server
77 Group(pl): Sieciowe/Serwery
79 %description deliverquota
80 deliverquota is a temporary hack to implement E-mail delivery to a
81 maildir with a software-imposed quota.
84 Summary: Tool for making mail folders in Maildir format.
85 Group: Networking/Daemons
86 Group(de): Netzwerkwesen/Server
87 Group(pl): Sieciowe/Serwery
88 Conflicts: qmail-maildirmake
90 %description maildirmake
91 Maildirmake is a tool for making mail folders in Maildir format.
94 Summary: Courier-IMAP POP3 Server
95 Summary(pl): Serwer Courier-IMAP POP3
96 Group: Networking/Daemons
97 Group(de): Netzwerkwesen/Server
98 Group(pl): Sieciowe/Serwery
99 Prereq: %{name}-common = %{version}
101 Obsoletes: pop3daemon
104 Courier-IMAP POP3 is an POP3 server for Maildir mailboxes.
106 %description pop3 -l pl
107 Courier-IMAP POP3 jest serwerem POP3 dla skrzynek pocztowych Maildir.
110 Summary: LDAP authentication daemon for Courier IMAP
111 Summary(pl): Demon autentykacji LDAP do Courier IMAP
112 Group: Networking/Daemons
113 Group(de): Netzwerkwesen/Server
114 Group(pl): Sieciowe/Serwery
115 Prereq: %{name}-common = %{version}
117 %description authldap
118 This package provides LDAP authentication for Courier IMAP.
120 %description authldap -l pl
121 Ten pakiet pozwala na korzystanie z autentykacji LDAP w Courier IMAP.
124 Summary: MySQL authentication daemon for Courier IMAP
125 Summary(pl): Demon autentykacji MySQL do Courier IMAP
126 Group: Networking/Daemons
127 Group(de): Netzwerkwesen/Server
128 Group(pl): Sieciowe/Serwery
129 Prereq: %{name}-common = %{version}
131 %description authmysql
132 This package provides MySQL authentication for Courier IMAP.
134 %description authmysql -l pl
135 Ten pakiet pozwala na korzystanie z autentykacji MySQL w Courier IMAP.
138 Summary: PostgreSQL authentication daemon for Courier IMAP
139 Summary(pl): Demon autentykacji PostgreSQL do Courier IMAP
140 Group: Networking/Daemons
141 Group(de): Netzwerkwesen/Server
142 Group(pl): Sieciowe/Serwery
143 Prereq: %{name}-common = %{version}
145 %description authpgsql
146 This package provides PostgreSQL authentication for Courier IMAP.
148 %description authpgsql -l pl
149 Ten pakiet pozwala na korzystanie z autentykacji PostgreSQL w Courier IMAP.
158 --with-authchangepwdir=/var/tmp \
159 --with-authdaemonvar=/var/lib/authdaemon \
160 %{!?_without_mysql:--with-mysql-libs=%{_libdir} --with-mysql-includes=%{_includedir}/mysql} \
161 %{?_without_mysql:--without-authmysql} \
162 %{!?_without_postgresql:--with-pgsql-libs=%{_libdir} --with-pgsql-includes=%{_includedir}/postgresql} \
163 %{?_without_postgresql:--without-authpgsql} \
164 %{?_without_ldap:--without-authldap}
169 rm -rf $RPM_BUILD_ROOT
170 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig} \
171 $RPM_BUILD_ROOT{%{_sysconfdir},/var/lib/authdaemon}
173 %{__make} install DESTDIR=$RPM_BUILD_ROOT
175 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap
176 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap-pop3
177 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/authdaemon
179 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/imap
180 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/pop3
182 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap
183 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap-pop3
184 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/authdaemon
186 rm -rf $RPM_BUILD_ROOT%{_mandir}/man8/{authcram,authpam,authpwd,authshadow,authuserdb,authvchkpw,pw2userdb,vchkpw2userdb,authdaemon,authdaemond,authldap,authmysql}.8 \
187 $RPM_BUILD_ROOT%{_sbindir}/{*db,mk*cert}
189 mv -f authlib/README.authmysql.html README.authmysql.html
190 mv -f authlib/README.ldap README.ldap
191 mv -f authlib/README.myownquery README.myownquery
192 mv -f imap/README README.imap
193 mv -f maildir/README.maildirquota.txt README.maildirquota
195 install authlib/authdaemonrc $RPM_BUILD_ROOT%{_sysconfdir}
196 install authlib/authldaprc $RPM_BUILD_ROOT%{_sysconfdir}
197 install authlib/authmysqlrc $RPM_BUILD_ROOT%{_sysconfdir}
198 install authlib/authpgsqlrc $RPM_BUILD_ROOT%{_sysconfdir}
200 mv -f $RPM_BUILD_ROOT%{_datadir}/*db \
201 $RPM_BUILD_ROOT%{_sbindir}
202 mv -f $RPM_BUILD_ROOT%{_datadir}/mk*cert \
203 $RPM_BUILD_ROOT%{_sbindir}
205 imap/html2man.pl tcpd/couriertls.html > $RPM_BUILD_ROOT%{_mandir}/man8/couriertls.8
207 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authcram.8
208 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpam.8
209 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpwd.8
210 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authshadow.8
211 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authuserdb.8
212 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authvchkpw.8
213 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemon.8
214 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemond.8
215 %{!?_without_pgsql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpgsql.8}
216 %{!?_without_mysql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authmysql.8}
217 %{!?_without_ldap:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authldap.8}
218 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8
219 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8
221 gzip -9nf README* imap/BUGS AUTHORS COPYING
223 touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap}
226 rm -rf $RPM_BUILD_ROOT
229 /sbin/chkconfig --add courier-imap
231 if [ -f /var/lock/subsys/courier-imap ]; then
232 /etc/rc.d/init.d/courier-imap restart >&2
234 echo "Run \"/etc/rc.d/init.d/courier-imap start\" to start courier-imap daemon."
238 if [ "$1" = "0" ]; then
239 if [ -f /var/lock/subsys/courier-imap ]; then
240 /etc/rc.d/init.d/courier-imap stop >&2
242 /sbin/chkconfig --del courier-imap
246 /sbin/chkconfig --add authdaemon
248 if [ -f /var/lock/subsys/authdaemon ]; then
249 /etc/rc.d/init.d/authdaemon restart >&2
251 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
255 if [ "$1" = "0" ]; then
256 if [ -f /var/lock/subsys/authdaemon ]; then
257 /etc/rc.d/init.d/authdaemon stop >&2
260 /sbin/chkconfig --del authdaemon
264 /sbin/chkconfig --add courier-imap-pop3
266 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
267 /etc/rc.d/init.d/courier-imap-pop3 restart >&2
269 echo "Run \"/etc/rc.d/init.d/courier-imap-pop3 start\" to start courier-imap pop3 daemon."
273 if [ "$1" = "0" ]; then
274 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
275 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
277 /sbin/chkconfig --del courier-imap-pop3
282 . /etc/sysconfig/authdaemon
283 if [ "$METHOD" = "ldap" ]; then
284 if [ -f /var/lock/subsys/authdaemon ]; then
285 /etc/rc.d/init.d/authdaemon restart >&2
287 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
293 . /etc/sysconfig/authdaemon
294 if [ "$1" = "$0" -a "$METHOD" = "ldap" ]; then
295 if [ -f /var/lock/subsys/authdaemon ]; then
296 /etc/rc.d/init.d/authdaemon stop >&2
302 . /etc/sysconfig/authdaemon
303 if [ "$METHOD" = "mysql" ]; then
304 if [ -f /var/lock/subsys/authdaemon ]; then
305 /etc/rc.d/init.d/authdaemon restart >&2
307 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
313 . /etc/sysconfig/authdaemon
314 if [ "$1" = "$0" -a "$METHOD" = "mysql" ]; then
315 if [ -f /var/lock/subsys/authdaemon ]; then
316 /etc/rc.d/init.d/authdaemon stop >&2
321 %defattr(644,root,root,755)
322 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/imap
323 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.imap
324 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap
325 %attr(754,root,root) /etc/rc.d/init.d/courier-imap
326 %{_sysconfdir}/imapd.cnf
327 %attr(755,root,root) %{_bindir}/imapd
328 %attr(755,root,root) %{_sbindir}/imaplogin
329 %attr(755,root,root) %{_sbindir}/mkimapdcert
330 %{_mandir}/man8/imapd*
333 %defattr(644,root,root,755)
335 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/authdaemon
336 %attr(754,root,root) /etc/rc.d/init.d/authdaemon
337 %attr(700,root,root) /var/lib/authdaemon
338 %attr(750,root,root) %dir %{_sysconfdir}
340 %dir %{_libexecdir}/authlib
341 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authdaemonrc
342 %{_sysconfdir}/quotawarnmsg.example
343 %attr(755,root,root) %{_bindir}/couriertls
344 %attr(755,root,root) %{_libexecdir}/authlib/authdaemon
345 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.plain
346 %attr(755,root,root) %{_libexecdir}/couriertcpd
347 %attr(755,root,root) %{_libexecdir}/logger
348 %attr(755,root,root) %{_libexecdir}/makedatprog
349 %{_mandir}/man8/auth[cdpsuv]*
350 %{_mandir}/man8/authlib*
351 %{_mandir}/man8/couriert*
355 %defattr(644,root,root,755)
356 %attr(755,root,root) %{_sbindir}/makeuserdb
357 %attr(755,root,root) %{_sbindir}/pw2userdb
358 %attr(755,root,root) %{_sbindir}/userdb
359 %attr(755,root,root) %{_sbindir}/userdbpw
360 %attr(755,root,root) %{_sbindir}/vchkpw2userdb
361 %{_mandir}/man8/makeuserdb*
362 %{_mandir}/man8/userdb*
363 %{_mandir}/man8/*pw2userdb*
366 %defattr(644,root,root,755)
367 %attr(755,root,root) %{_libexecdir}/deliverquota
368 %{_mandir}/man8/deliverquota*
371 %defattr(644,root,root,755)
372 %attr(755,root,root) %{_bindir}/maildirmake
373 %{_mandir}/man1/maildirmake*
376 %defattr(644,root,root,755)
377 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/pop3
378 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.pop3
379 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap-pop3
380 %attr(754,root,root) /etc/rc.d/init.d/courier-imap-pop3
381 %attr(755,root,root) %{_bindir}/pop3d
382 %attr(755,root,root) %{_sbindir}/mkpop3dcert
383 %attr(755,root,root) %{_sbindir}/pop3login
384 %{_sysconfdir}/pop3d.cnf
386 %if %{?_without_ldap:0}%{!?_without_ldap:1}
388 %defattr(644,root,root,755)
389 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authldaprc
390 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.ldap
391 %{_mandir}/man8/authldap*
394 %if %{?_without_mysql:0}%{!?_without_mysql:1}
396 %defattr(644,root,root,755)
397 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authmysqlrc
398 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.mysql
399 %{_mandir}/man8/authmysql*
402 %if %{?_without_pgsql:0}%{!?_without_pgsql:1}
404 %defattr(644,root,root,755)
405 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authpgsqlrc
406 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.pgsql
407 %{_mandir}/man8/authpgsql*