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
15 # Source0-md5: f74abb58b45810cc485426bc8bad14e6
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_pgsql: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 >= 0.9.7
33 PreReq: %{name}-common = %{version}
35 Requires(post,preun): /sbin/chkconfig
38 Conflicts: cyrus-imapd
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 %define _libexecdir /usr/lib/courier-imap
43 %define _sysconfdir /etc/courier-imap
46 Courier-IMAP is an IMAP server for Maildir mailboxes.
49 Courier-IMAP jest serwerem IMAP dla skrzynek pocztowych Maildir.
52 Summary: Common files for imap and pop daemons
53 Summary(pl): Pliki wspólne dla serwerów imap i pop
54 Group: Networking/Daemons
56 Requires(post,preun): /sbin/chkconfig
57 Requires: %{name}-maildirmake
58 Requires: %{name}-deliverquota
59 Requires: %{name}-userdb
62 Common files for imap and pop daemons.
64 %description common -l pl
65 Pliki wspólne dla serwerów imap i pop.
68 Summary: Commands used to create the /etc/userdb.dat
69 Summary(pl): Polecenia do tworzenia /etc/userdb.dat
70 Group: Networking/Daemons
73 Commands used to create the /etc/userdb.dat.
75 %description userdb -l pl
76 Polecenia u¿ywane do stworzenia /etc/userdb.dat.
79 Summary: Deliver to a Maildir with a quota
80 Summary(pl): Obs³uga quoty przy dostarczaniu poczty do skrzynek Maildir
81 Group: Networking/Daemons
83 %description deliverquota
84 deliverquota is a temporary hack to implement E-mail delivery to a
85 Maildir with a software-imposed quota.
87 %description deliverquota -l pl
88 deliverquota jest tymczasowym rozwi±zaniem implementuj±cym
89 dostarczanie e-maili do skrzynek Maildir z programowo narzucon± quot±.
92 Summary: Tool for making mail folders in Maildir format
93 Summary(pl): Narzêdzie do tworzenia folderów w formacie Maildir
94 Group: Networking/Daemons
95 Conflicts: qmail-maildirmake
97 %description maildirmake
98 Maildirmake is a tool for making mail folders in Maildir format.
100 %description maildirmake -l pl
101 Maildirmake jest narzêdziem do tworzenia folderów pocztowych w
105 Summary: Courier-IMAP POP3 Server
106 Summary(pl): Serwer Courier-IMAP POP3
107 Group: Networking/Daemons
108 PreReq: %{name}-common = %{version}
110 Obsoletes: pop3daemon
111 Conflicts: cyrus-imapd
114 Conflicts: solid-pop3d
117 Courier-IMAP POP3 is an POP3 server for Maildir mailboxes.
119 %description pop3 -l pl
120 Courier-IMAP POP3 jest serwerem POP3 dla skrzynek pocztowych Maildir.
123 Summary: LDAP authentication daemon for Courier IMAP
124 Summary(pl): Demon autentykacji LDAP do Courier IMAP
125 Group: Networking/Daemons
126 PreReq: %{name}-common = %{version}
128 %description authldap
129 This package provides LDAP authentication for Courier IMAP.
131 %description authldap -l pl
132 Ten pakiet pozwala na korzystanie z autentykacji LDAP w Courier IMAP.
135 Summary: MySQL authentication daemon for Courier IMAP
136 Summary(pl): Demon autentykacji MySQL do Courier IMAP
137 Group: Networking/Daemons
138 PreReq: %{name}-common = %{version}
141 %description authmysql
142 This package provides MySQL authentication for Courier IMAP.
144 %description authmysql -l pl
145 Ten pakiet pozwala na korzystanie z autentykacji MySQL w Courier IMAP.
148 Summary: PostgreSQL authentication daemon for Courier IMAP
149 Summary(pl): Demon autentykacji PostgreSQL do Courier IMAP
150 Group: Networking/Daemons
151 PreReq: %{name}-common = %{version}
153 %description authpgsql
154 This package provides PostgreSQL authentication for Courier IMAP.
156 %description authpgsql -l pl
157 Ten pakiet pozwala na korzystanie z autentykacji PostgreSQL w Courier
167 --with-authchangepwdir=/var/tmp \
168 --with-authdaemonvar=/var/lib/authdaemon \
169 %{!?_without_mysql:--with-mysql-libs=%{_libdir} --with-mysql-includes=%{_includedir}/mysql} \
170 %{?_without_mysql:--without-authmysql} \
171 %{!?_without_pgsql:--with-pgsql-libs=%{_libdir} --with-pgsql-includes=%{_includedir}/postgresql} \
172 %{?_without_pgsql:--without-authpgsql} \
173 %{?_without_ldap:--without-authldap}
178 rm -rf $RPM_BUILD_ROOT
179 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig} \
180 $RPM_BUILD_ROOT{%{_sysconfdir},/var/lib/authdaemon}
182 %{__make} install DESTDIR=$RPM_BUILD_ROOT
184 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap
185 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-pop3
186 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/authdaemon
188 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/imap
189 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/pop3
191 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap
192 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/courier-pop3
193 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/authdaemon
195 rm -rf $RPM_BUILD_ROOT%{_mandir}/man8/{authcram,authpam,authpwd,authshadow,authuserdb,authvchkpw,pw2userdb,vchkpw2userdb,authdaemon,authdaemond,authldap,authmysql}.8 \
196 $RPM_BUILD_ROOT%{_sbindir}/{*db,mk*cert}
198 mv -f authlib/README.authmysql.html README.authmysql.html
199 mv -f authlib/README.ldap README.ldap
200 mv -f authlib/README.authmysql.myownquery README.authmysql.myownquery
201 mv -f imap/README README.imap
202 mv -f imap/ChangeLog ChangeLog
203 mv -f maildir/README.maildirquota.txt README.maildirquota
205 install authlib/authdaemonrc $RPM_BUILD_ROOT%{_sysconfdir}
206 install authlib/authldaprc $RPM_BUILD_ROOT%{_sysconfdir}
207 install authlib/authmysqlrc $RPM_BUILD_ROOT%{_sysconfdir}
208 install authlib/authpgsqlrc $RPM_BUILD_ROOT%{_sysconfdir}
210 mv -f $RPM_BUILD_ROOT%{_datadir}/*db \
211 $RPM_BUILD_ROOT%{_sbindir}
212 mv -f $RPM_BUILD_ROOT%{_datadir}/mk*cert \
213 $RPM_BUILD_ROOT%{_sbindir}
215 mv -f tcpd/couriertls.1 $RPM_BUILD_ROOT%{_mandir}/man8/couriertls.8
216 mv -f imap/courierpop3d.8 $RPM_BUILD_ROOT%{_mandir}/man8/courierpop3d.8
218 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authcram.8
219 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authpam.8
220 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authpwd.8
221 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authshadow.8
222 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authuserdb.8
223 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authvchkpw.8
224 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemon.8
225 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemond.8
226 %{!?_without_pgsql:echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authpgsql.8}
227 %{!?_without_mysql:echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authmysql.8}
228 %{!?_without_ldap:echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authldap.8}
229 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8
230 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8
232 touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap}
235 rm -rf $RPM_BUILD_ROOT
238 /sbin/chkconfig --add courier-imap
240 if [ -f /var/lock/subsys/courier-imap ]; then
241 /etc/rc.d/init.d/courier-imap restart >&2
243 echo "Run \"/etc/rc.d/init.d/courier-imap start\" to start courier-imap daemon."
247 if [ "$1" = "0" ]; then
248 if [ -f /var/lock/subsys/courier-imap ]; then
249 /etc/rc.d/init.d/courier-imap stop >&2
251 /sbin/chkconfig --del courier-imap
255 /sbin/chkconfig --add authdaemon
257 if [ -f /var/lock/subsys/authdaemon ]; then
258 /etc/rc.d/init.d/authdaemon restart >&2
260 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
264 if [ "$1" = "0" ]; then
265 if [ -f /var/lock/subsys/authdaemon ]; then
266 /etc/rc.d/init.d/authdaemon stop >&2
269 /sbin/chkconfig --del authdaemon
273 /sbin/chkconfig --add courier-pop3
274 /sbin/chkconfig --del courier-imap-pop3 2>&1 >/dev/null
275 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
276 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
277 /etc/rc.d/init.d/courier-pop3 start >&2
278 elif [ -f /var/lock/subsys/courier-pop3 ]; then
279 /etc/rc.d/init.d/courier-pop3 restart >&2
281 echo "Run \"/etc/rc.d/init.d/courier-pop3 start\" to start courier-pop3 daemon."
283 rm -f /etc/rc.d/init.d/courier-imap-pop3
286 if [ "$1" = "0" ]; then
287 if [ -f /var/lock/subsys/courier-pop3 ]; then
288 /etc/rc.d/init.d/courier-pop3 stop >&2
290 /sbin/chkconfig --del courier-pop3
291 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
292 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
294 /sbin/chkconfig --del courier-imap-pop3 2>&1 >/dev/null
295 rm -f /etc/rc.d/init.d/courier-imap-pop3
300 . /etc/sysconfig/authdaemon
301 if [ "$METHOD" = "ldap" ]; then
302 if [ -f /var/lock/subsys/authdaemon ]; then
303 /etc/rc.d/init.d/authdaemon restart >&2
305 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
311 . /etc/sysconfig/authdaemon
312 if [ "$1" = "$0" -a "$METHOD" = "ldap" ]; then
313 if [ -f /var/lock/subsys/authdaemon ]; then
314 /etc/rc.d/init.d/authdaemon stop >&2
320 . /etc/sysconfig/authdaemon
321 if [ "$METHOD" = "mysql" ]; then
322 if [ -f /var/lock/subsys/authdaemon ]; then
323 /etc/rc.d/init.d/authdaemon restart >&2
325 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
331 . /etc/sysconfig/authdaemon
332 if [ "$1" = "$0" -a "$METHOD" = "mysql" ]; then
333 if [ -f /var/lock/subsys/authdaemon ]; then
334 /etc/rc.d/init.d/authdaemon stop >&2
339 %defattr(644,root,root,755)
340 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/imap
341 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.imap
342 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap
343 %attr(754,root,root) /etc/rc.d/init.d/courier-imap
344 %{_sysconfdir}/imapd.cnf
345 %attr(755,root,root) %{_bindir}/imapd
346 %attr(755,root,root) %{_sbindir}/imaplogin
347 %attr(755,root,root) %{_sbindir}/mkimapdcert
348 %{_mandir}/man8/imapd*
351 %defattr(644,root,root,755)
352 %doc README* imap/BUGS ChangeLog AUTHORS
353 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/authdaemon
354 %attr(754,root,root) /etc/rc.d/init.d/authdaemon
355 %attr(700,root,root) /var/lib/authdaemon
356 %attr(750,root,root) %dir %{_sysconfdir}
358 %dir %{_libexecdir}/authlib
359 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authdaemonrc
360 %{_sysconfdir}/quotawarnmsg.example
361 %attr(755,root,root) %{_bindir}/couriertls
362 %attr(755,root,root) %{_libexecdir}/authlib/authdaemon
363 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.plain
364 %attr(755,root,root) %{_libexecdir}/couriertcpd
365 %attr(755,root,root) %{_libexecdir}/courierlogger
366 %attr(755,root,root) %{_libexecdir}/makedatprog
367 %{_mandir}/man8/auth[cdsuv]*
368 %{_mandir}/man8/authp[aw]*
369 %{_mandir}/man7/authlib*
370 %{_mandir}/man1/couriert*
374 %defattr(644,root,root,755)
375 %attr(755,root,root) %{_sbindir}/makeuserdb
376 %attr(755,root,root) %{_sbindir}/pw2userdb
377 %attr(755,root,root) %{_sbindir}/userdb
378 %attr(755,root,root) %{_sbindir}/userdbpw
379 %attr(755,root,root) %{_sbindir}/vchkpw2userdb
380 %{_mandir}/man8/makeuserdb*
381 %{_mandir}/man8/userdb*
382 %{_mandir}/man8/*pw2userdb*
385 %defattr(644,root,root,755)
386 %attr(755,root,root) %{_bindir}/deliverquota
387 %{_mandir}/man8/deliverquota*
390 %defattr(644,root,root,755)
391 %attr(755,root,root) %{_bindir}/maildirmake
392 %{_mandir}/man1/maildirmake*
395 %defattr(644,root,root,755)
396 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/pop3
397 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.pop3
398 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-pop3
399 %attr(754,root,root) /etc/rc.d/init.d/courier-pop3
400 %attr(755,root,root) %{_bindir}/pop3d
401 %attr(755,root,root) %{_sbindir}/mkpop3dcert
402 %attr(755,root,root) %{_sbindir}/pop3login
403 %{_sysconfdir}/pop3d.cnf
404 %{_mandir}/man8/courierpop*
406 %if %{?_without_ldap:0}%{!?_without_ldap:1}
408 %defattr(644,root,root,755)
409 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authldaprc
410 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.ldap
411 %{_mandir}/man8/authldap*
414 %if %{?_without_mysql:0}%{!?_without_mysql:1}
416 %defattr(644,root,root,755)
417 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authmysqlrc
418 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.mysql
419 %{_mandir}/man8/authmysql*
422 %if %{?_without_pgsql:0}%{!?_without_pgsql:1}
424 %defattr(644,root,root,755)
425 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authpgsqlrc
426 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.pgsql
427 %{_mandir}/man8/authpgsql*