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: 71d9e88053351dbf7df04943189ec1cd
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 BuildRequires: gdbm-devel
27 BuildRequires: libstdc++-devel
28 %{!?_without_mysql:BuildRequires: mysql-devel}
29 %{!?_without_ldap:BuildRequires: openldap-devel}
30 BuildRequires: openssl-devel >= 0.9.7
31 %{!?_without_pgsql:BuildRequires: postgresql-devel}
32 %{!?_without_mysql:BuildRequires: zlib-devel}
33 PreReq: %{name}-common = %{version}
35 Requires(post,preun): /sbin/chkconfig
36 Requires: pam >= 0.77.3
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 Conflicts: cyrus-imapd
43 %define _libexecdir /usr/lib/courier-imap
44 %define _sysconfdir /etc/courier-imap
47 Courier-IMAP is an IMAP server for Maildir mailboxes.
50 Courier-IMAP jest serwerem IMAP dla skrzynek pocztowych Maildir.
53 Summary: Common files for imap and pop daemons
54 Summary(pl): Pliki wspólne dla serwerów imap i pop
55 Group: Networking/Daemons
57 Requires(post,preun): /sbin/chkconfig
58 Requires: %{name}-deliverquota
59 Requires: %{name}-maildirmake
60 Requires: %{name}-userdb
63 Common files for imap and pop daemons.
65 %description common -l pl
66 Pliki wspólne dla serwerów imap i pop.
69 Summary: Commands used to create the /etc/userdb.dat
70 Summary(pl): Polecenia do tworzenia /etc/userdb.dat
71 Group: Networking/Daemons
74 Commands used to create the /etc/userdb.dat.
76 %description userdb -l pl
77 Polecenia u¿ywane do stworzenia /etc/userdb.dat.
80 Summary: Deliver to a Maildir with a quota
81 Summary(pl): Obs³uga quoty przy dostarczaniu poczty do skrzynek Maildir
82 Group: Networking/Daemons
84 %description deliverquota
85 deliverquota is a temporary hack to implement E-mail delivery to a
86 Maildir with a software-imposed quota.
88 %description deliverquota -l pl
89 deliverquota jest tymczasowym rozwi±zaniem implementuj±cym
90 dostarczanie e-maili do skrzynek Maildir z programowo narzucon± quot±.
93 Summary: Tool for making mail folders in Maildir format
94 Summary(pl): Narzêdzie do tworzenia folderów w formacie Maildir
95 Group: Networking/Daemons
96 Conflicts: qmail-maildirmake
98 %description maildirmake
99 Maildirmake is a tool for making mail folders in Maildir format.
101 %description maildirmake -l pl
102 Maildirmake jest narzêdziem do tworzenia folderów pocztowych w
106 Summary: Courier-IMAP POP3 Server
107 Summary(pl): Serwer Courier-IMAP POP3
108 Group: Networking/Daemons
109 PreReq: %{name}-common = %{version}
110 Requires: pam >= 0.77.3
112 Obsoletes: pop3daemon
113 Conflicts: cyrus-imapd
115 Conflicts: solid-pop3d
119 Courier-IMAP POP3 is an POP3 server for Maildir mailboxes.
121 %description pop3 -l pl
122 Courier-IMAP POP3 jest serwerem POP3 dla skrzynek pocztowych Maildir.
125 Summary: LDAP authentication daemon for Courier IMAP
126 Summary(pl): Demon autentykacji LDAP do Courier IMAP
127 Group: Networking/Daemons
128 PreReq: %{name}-common = %{version}
130 %description authldap
131 This package provides LDAP authentication for Courier IMAP.
133 %description authldap -l pl
134 Ten pakiet pozwala na korzystanie z autentykacji LDAP w Courier IMAP.
137 Summary: MySQL authentication daemon for Courier IMAP
138 Summary(pl): Demon autentykacji MySQL do Courier IMAP
139 Group: Networking/Daemons
140 PreReq: %{name}-common = %{version}
143 %description authmysql
144 This package provides MySQL authentication for Courier IMAP.
146 %description authmysql -l pl
147 Ten pakiet pozwala na korzystanie z autentykacji MySQL w Courier IMAP.
150 Summary: PostgreSQL authentication daemon for Courier IMAP
151 Summary(pl): Demon autentykacji PostgreSQL do Courier IMAP
152 Group: Networking/Daemons
153 PreReq: %{name}-common = %{version}
155 %description authpgsql
156 This package provides PostgreSQL authentication for Courier IMAP.
158 %description authpgsql -l pl
159 Ten pakiet pozwala na korzystanie z autentykacji PostgreSQL w Courier
169 --with-authchangepwdir=/var/tmp \
170 --with-authdaemonvar=/var/lib/authdaemon \
171 %{!?_without_mysql:--with-mysql-libs=%{_libdir} --with-mysql-includes=%{_includedir}/mysql} \
172 %{?_without_mysql:--without-authmysql} \
173 %{!?_without_pgsql:--with-pgsql-libs=%{_libdir} --with-pgsql-includes=%{_includedir}/postgresql} \
174 %{?_without_pgsql:--without-authpgsql} \
175 %{?_without_ldap:--without-authldap}
180 rm -rf $RPM_BUILD_ROOT
181 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig} \
182 $RPM_BUILD_ROOT{%{_sysconfdir},/var/lib/authdaemon}
185 DESTDIR=$RPM_BUILD_ROOT
187 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap
188 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-pop3
189 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/authdaemon
191 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/imap
192 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/pop3
194 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap
195 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/courier-pop3
196 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/authdaemon
198 rm -rf $RPM_BUILD_ROOT%{_mandir}/man8/{authcram,authpam,authpwd,authshadow,authuserdb,authvchkpw,pw2userdb,vchkpw2userdb,authdaemon,authdaemond,authldap,authmysql}.8 \
199 $RPM_BUILD_ROOT%{_sbindir}/{*db,mk*cert}
201 mv -f authlib/README.authmysql.html README.authmysql.html
202 mv -f authlib/README.ldap README.ldap
203 mv -f authlib/README.authmysql.myownquery README.authmysql.myownquery
204 mv -f imap/README README.imap
205 mv -f imap/ChangeLog ChangeLog
206 mv -f maildir/README.maildirquota.txt README.maildirquota
208 install authlib/authdaemonrc $RPM_BUILD_ROOT%{_sysconfdir}
209 install authlib/authldaprc $RPM_BUILD_ROOT%{_sysconfdir}
210 install authlib/authmysqlrc $RPM_BUILD_ROOT%{_sysconfdir}
211 install authlib/authpgsqlrc $RPM_BUILD_ROOT%{_sysconfdir}
213 mv -f $RPM_BUILD_ROOT%{_datadir}/*db \
214 $RPM_BUILD_ROOT%{_sbindir}
215 mv -f $RPM_BUILD_ROOT%{_datadir}/mk*cert \
216 $RPM_BUILD_ROOT%{_sbindir}
218 mv -f tcpd/couriertls.1 $RPM_BUILD_ROOT%{_mandir}/man8/couriertls.8
219 mv -f imap/courierpop3d.8 $RPM_BUILD_ROOT%{_mandir}/man8/courierpop3d.8
221 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authcram.8
222 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authpam.8
223 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authpwd.8
224 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authshadow.8
225 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authuserdb.8
226 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authvchkpw.8
227 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemon.8
228 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemond.8
229 %{!?_without_pgsql:echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authpgsql.8}
230 %{!?_without_mysql:echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authmysql.8}
231 %{!?_without_ldap:echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authldap.8}
232 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8
233 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8
235 touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap}
238 rm -rf $RPM_BUILD_ROOT
241 /sbin/chkconfig --add courier-imap
243 if [ -f /var/lock/subsys/courier-imap ]; then
244 /etc/rc.d/init.d/courier-imap restart >&2
246 echo "Run \"/etc/rc.d/init.d/courier-imap start\" to start courier-imap daemon."
250 if [ "$1" = "0" ]; then
251 if [ -f /var/lock/subsys/courier-imap ]; then
252 /etc/rc.d/init.d/courier-imap stop >&2
254 /sbin/chkconfig --del courier-imap
258 /sbin/chkconfig --add authdaemon
260 if [ -f /var/lock/subsys/authdaemon ]; then
261 /etc/rc.d/init.d/authdaemon restart >&2
263 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
267 if [ "$1" = "0" ]; then
268 if [ -f /var/lock/subsys/authdaemon ]; then
269 /etc/rc.d/init.d/authdaemon stop >&2
272 /sbin/chkconfig --del authdaemon
276 /sbin/chkconfig --add courier-pop3
277 /sbin/chkconfig --del courier-imap-pop3 2>&1 >/dev/null
278 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
279 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
280 /etc/rc.d/init.d/courier-pop3 start >&2
281 elif [ -f /var/lock/subsys/courier-pop3 ]; then
282 /etc/rc.d/init.d/courier-pop3 restart >&2
284 echo "Run \"/etc/rc.d/init.d/courier-pop3 start\" to start courier-pop3 daemon."
286 rm -f /etc/rc.d/init.d/courier-imap-pop3
289 if [ "$1" = "0" ]; then
290 if [ -f /var/lock/subsys/courier-pop3 ]; then
291 /etc/rc.d/init.d/courier-pop3 stop >&2
293 /sbin/chkconfig --del courier-pop3
294 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
295 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
297 /sbin/chkconfig --del courier-imap-pop3 2>&1 >/dev/null
298 rm -f /etc/rc.d/init.d/courier-imap-pop3
303 . /etc/sysconfig/authdaemon
304 if [ "$METHOD" = "ldap" ]; then
305 if [ -f /var/lock/subsys/authdaemon ]; then
306 /etc/rc.d/init.d/authdaemon restart >&2
308 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
314 . /etc/sysconfig/authdaemon
315 if [ "$1" = "$0" -a "$METHOD" = "ldap" ]; then
316 if [ -f /var/lock/subsys/authdaemon ]; then
317 /etc/rc.d/init.d/authdaemon stop >&2
323 . /etc/sysconfig/authdaemon
324 if [ "$METHOD" = "mysql" ]; then
325 if [ -f /var/lock/subsys/authdaemon ]; then
326 /etc/rc.d/init.d/authdaemon restart >&2
328 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
334 . /etc/sysconfig/authdaemon
335 if [ "$1" = "$0" -a "$METHOD" = "mysql" ]; then
336 if [ -f /var/lock/subsys/authdaemon ]; then
337 /etc/rc.d/init.d/authdaemon stop >&2
342 %defattr(644,root,root,755)
343 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/imap
344 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.imap
345 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap
346 %attr(754,root,root) /etc/rc.d/init.d/courier-imap
347 %{_sysconfdir}/imapd.cnf
348 %attr(755,root,root) %{_bindir}/imapd
349 %attr(755,root,root) %{_bindir}/maildirkw
350 %attr(755,root,root) %{_sbindir}/imaplogin
351 %attr(755,root,root) %{_sbindir}/mkimapdcert
352 %{_mandir}/man8/imapd*
353 %{_mandir}/man1/maildirkw.1*
356 %defattr(644,root,root,755)
357 %doc README* imap/BUGS ChangeLog AUTHORS
358 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/authdaemon
359 %attr(754,root,root) /etc/rc.d/init.d/authdaemon
360 %attr(700,root,root) /var/lib/authdaemon
361 %attr(750,root,root) %dir %{_sysconfdir}
363 %dir %{_libexecdir}/authlib
364 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authdaemonrc
365 %{_sysconfdir}/quotawarnmsg.example
366 %attr(755,root,root) %{_bindir}/couriertls
367 %attr(755,root,root) %{_libexecdir}/authlib/authdaemon
368 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.plain
369 %attr(755,root,root) %{_libexecdir}/couriertcpd
370 %attr(755,root,root) %{_libexecdir}/courierlogger
371 %attr(755,root,root) %{_libexecdir}/makedatprog
372 %{_mandir}/man8/auth[cdsuv]*
373 %{_mandir}/man8/authp[aw]*
374 %{_mandir}/man7/authlib*
375 %{_mandir}/man1/couriert*
379 %defattr(644,root,root,755)
380 %attr(755,root,root) %{_sbindir}/makeuserdb
381 %attr(755,root,root) %{_sbindir}/pw2userdb
382 %attr(755,root,root) %{_sbindir}/userdb
383 %attr(755,root,root) %{_sbindir}/userdbpw
384 %attr(755,root,root) %{_sbindir}/vchkpw2userdb
385 %{_mandir}/man8/makeuserdb*
386 %{_mandir}/man8/userdb*
387 %{_mandir}/man8/*pw2userdb*
390 %defattr(644,root,root,755)
391 %attr(755,root,root) %{_bindir}/deliverquota
392 %{_mandir}/man8/deliverquota*
395 %defattr(644,root,root,755)
396 %attr(755,root,root) %{_bindir}/maildirmake
397 %{_mandir}/man1/maildirmake*
400 %defattr(644,root,root,755)
401 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/pop3
402 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.pop3
403 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-pop3
404 %attr(754,root,root) /etc/rc.d/init.d/courier-pop3
405 %attr(755,root,root) %{_bindir}/pop3d
406 %attr(755,root,root) %{_sbindir}/mkpop3dcert
407 %attr(755,root,root) %{_sbindir}/pop3login
408 %{_sysconfdir}/pop3d.cnf
409 %{_mandir}/man8/courierpop*
411 %if %{?_without_ldap:0}%{!?_without_ldap:1}
413 %defattr(644,root,root,755)
414 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authldaprc
415 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.ldap
416 %{_mandir}/man8/authldap*
419 %if %{?_without_mysql:0}%{!?_without_mysql:1}
421 %defattr(644,root,root,755)
422 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authmysqlrc
423 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.mysql
424 %{_mandir}/man8/authmysql*
427 %if %{?_without_pgsql:0}%{!?_without_pgsql:1}
429 %defattr(644,root,root,755)
430 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authpgsqlrc
431 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.pgsql
432 %{_mandir}/man8/authpgsql*