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}-%{version}-myownquery.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}
34 Conflicts: cyrus-imapd
36 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
52 PreReq: /sbin/chkconfig
53 Requires: %{name}-maildirmake
54 Requires: %{name}-deliverquota
55 Requires: %{name}-userdb
58 Common files for imap and pop daemons.
60 %description common -l pl
61 Pliki wspólne dla serwerów imap i pop.
64 Summary: Commands used to create the /etc/userdb.dat
65 Summary(pl): Polecenia do tworzenia /etc/userdb.dat
66 Group: Networking/Daemons
69 Commands used to create the /etc/userdb.dat.
71 %description userdb -l pl
72 Polecenia u¿ywane do stworzenia /etc/userdb.dat.
75 Summary: Deliver to a Maildir with a quota
76 Summary(pl): Obs³uga quoty przy dostarczaniu poczty do skrzynek Maildir
77 Group: Networking/Daemons
79 %description deliverquota
80 deliverquota is a temporary hack to implement E-mail delivery to a
81 Maildir with a software-imposed quota.
83 %description deliverquota -l pl
84 deliverquota jest tymczasowym rozwi±zaniem implementuj±cym
85 dostarczanie e-maili do skrzynek Maildir z programowo narzucon± quot±.
88 Summary: Tool for making mail folders in Maildir format
89 Summary(pl): Narzêdzie do tworzenia folderów w formacie Maildir
90 Group: Networking/Daemons
91 Conflicts: qmail-maildirmake
93 %description maildirmake
94 Maildirmake is a tool for making mail folders in Maildir format.
96 %description maildirmake -l pl
97 Maildirmake jest narzêdziem do tworzenia folderów pocztowych w
101 Summary: Courier-IMAP POP3 Server
102 Summary(pl): Serwer Courier-IMAP POP3
103 Group: Networking/Daemons
104 PreReq: %{name}-common = %{version}
106 Obsoletes: pop3daemon
107 Conflicts: cyrus-imapd
110 Conflicts: solid-pop3d
113 Courier-IMAP POP3 is an POP3 server for Maildir mailboxes.
115 %description pop3 -l pl
116 Courier-IMAP POP3 jest serwerem POP3 dla skrzynek pocztowych Maildir.
119 Summary: LDAP authentication daemon for Courier IMAP
120 Summary(pl): Demon autentykacji LDAP do Courier IMAP
121 Group: Networking/Daemons
122 PreReq: %{name}-common = %{version}
124 %description authldap
125 This package provides LDAP authentication for Courier IMAP.
127 %description authldap -l pl
128 Ten pakiet pozwala na korzystanie z autentykacji LDAP w Courier IMAP.
131 Summary: MySQL authentication daemon for Courier IMAP
132 Summary(pl): Demon autentykacji MySQL do Courier IMAP
133 Group: Networking/Daemons
134 PreReq: %{name}-common = %{version}
137 %description authmysql
138 This package provides MySQL authentication for Courier IMAP.
140 %description authmysql -l pl
141 Ten pakiet pozwala na korzystanie z autentykacji MySQL w Courier IMAP.
144 Summary: PostgreSQL authentication daemon for Courier IMAP
145 Summary(pl): Demon autentykacji PostgreSQL do Courier IMAP
146 Group: Networking/Daemons
147 PreReq: %{name}-common = %{version}
149 %description authpgsql
150 This package provides PostgreSQL authentication for Courier IMAP.
152 %description authpgsql -l pl
153 Ten pakiet pozwala na korzystanie z autentykacji PostgreSQL w Courier
163 --with-authchangepwdir=/var/tmp \
164 --with-authdaemonvar=/var/lib/authdaemon \
165 %{!?_without_mysql:--with-mysql-libs=%{_libdir} --with-mysql-includes=%{_includedir}/mysql} \
166 %{?_without_mysql:--without-authmysql} \
167 %{!?_without_postgresql:--with-pgsql-libs=%{_libdir} --with-pgsql-includes=%{_includedir}/postgresql} \
168 %{?_without_postgresql:--without-authpgsql} \
169 %{?_without_ldap:--without-authldap}
174 rm -rf $RPM_BUILD_ROOT
175 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig} \
176 $RPM_BUILD_ROOT{%{_sysconfdir},/var/lib/authdaemon}
178 %{__make} install DESTDIR=$RPM_BUILD_ROOT
180 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap
181 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap-pop3
182 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/authdaemon
184 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/imap
185 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/pop3
187 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap
188 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap-pop3
189 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/authdaemon
191 rm -rf $RPM_BUILD_ROOT%{_mandir}/man8/{authcram,authpam,authpwd,authshadow,authuserdb,authvchkpw,pw2userdb,vchkpw2userdb,authdaemon,authdaemond,authldap,authmysql}.8 \
192 $RPM_BUILD_ROOT%{_sbindir}/{*db,mk*cert}
194 mv -f authlib/README.authmysql.html README.authmysql.html
195 mv -f authlib/README.ldap README.ldap
196 mv -f authlib/README.authmysql.myownquery README.authmysql.myownquery
197 mv -f imap/README README.imap
198 mv -f imap/ChangeLog ChangeLog
199 mv -f maildir/README.maildirquota.txt README.maildirquota
201 install authlib/authdaemonrc $RPM_BUILD_ROOT%{_sysconfdir}
202 install authlib/authldaprc $RPM_BUILD_ROOT%{_sysconfdir}
203 install authlib/authmysqlrc $RPM_BUILD_ROOT%{_sysconfdir}
204 install authlib/authpgsqlrc $RPM_BUILD_ROOT%{_sysconfdir}
206 mv -f $RPM_BUILD_ROOT%{_datadir}/*db \
207 $RPM_BUILD_ROOT%{_sbindir}
208 mv -f $RPM_BUILD_ROOT%{_datadir}/mk*cert \
209 $RPM_BUILD_ROOT%{_sbindir}
211 mv -f tcpd/couriertls.1 $RPM_BUILD_ROOT%{_mandir}/man8/couriertls.8
212 mv -f imap/courierpop3d.8 $RPM_BUILD_ROOT%{_mandir}/man8/courierpop3d.8
214 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authcram.8
215 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpam.8
216 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpwd.8
217 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authshadow.8
218 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authuserdb.8
219 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authvchkpw.8
220 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemon.8
221 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemond.8
222 %{!?_without_pgsql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpgsql.8}
223 %{!?_without_mysql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authmysql.8}
224 %{!?_without_ldap:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authldap.8}
225 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8
226 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8
228 touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap}
231 rm -rf $RPM_BUILD_ROOT
234 /sbin/chkconfig --add courier-imap
236 if [ -f /var/lock/subsys/courier-imap ]; then
237 /etc/rc.d/init.d/courier-imap restart >&2
239 echo "Run \"/etc/rc.d/init.d/courier-imap start\" to start courier-imap daemon."
243 if [ "$1" = "0" ]; then
244 if [ -f /var/lock/subsys/courier-imap ]; then
245 /etc/rc.d/init.d/courier-imap stop >&2
247 /sbin/chkconfig --del courier-imap
251 /sbin/chkconfig --add authdaemon
253 if [ -f /var/lock/subsys/authdaemon ]; then
254 /etc/rc.d/init.d/authdaemon restart >&2
256 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
260 if [ "$1" = "0" ]; then
261 if [ -f /var/lock/subsys/authdaemon ]; then
262 /etc/rc.d/init.d/authdaemon stop >&2
265 /sbin/chkconfig --del authdaemon
269 /sbin/chkconfig --add courier-imap-pop3
271 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
272 /etc/rc.d/init.d/courier-imap-pop3 restart >&2
274 echo "Run \"/etc/rc.d/init.d/courier-imap-pop3 start\" to start courier-imap pop3 daemon."
278 if [ "$1" = "0" ]; then
279 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
280 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
282 /sbin/chkconfig --del courier-imap-pop3
287 . /etc/sysconfig/authdaemon
288 if [ "$METHOD" = "ldap" ]; then
289 if [ -f /var/lock/subsys/authdaemon ]; then
290 /etc/rc.d/init.d/authdaemon restart >&2
292 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
298 . /etc/sysconfig/authdaemon
299 if [ "$1" = "$0" -a "$METHOD" = "ldap" ]; then
300 if [ -f /var/lock/subsys/authdaemon ]; then
301 /etc/rc.d/init.d/authdaemon stop >&2
307 . /etc/sysconfig/authdaemon
308 if [ "$METHOD" = "mysql" ]; then
309 if [ -f /var/lock/subsys/authdaemon ]; then
310 /etc/rc.d/init.d/authdaemon restart >&2
312 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
318 . /etc/sysconfig/authdaemon
319 if [ "$1" = "$0" -a "$METHOD" = "mysql" ]; then
320 if [ -f /var/lock/subsys/authdaemon ]; then
321 /etc/rc.d/init.d/authdaemon stop >&2
326 %defattr(644,root,root,755)
327 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/imap
328 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.imap
329 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap
330 %attr(754,root,root) /etc/rc.d/init.d/courier-imap
331 %{_sysconfdir}/imapd.cnf
332 %attr(755,root,root) %{_bindir}/imapd
333 %attr(755,root,root) %{_sbindir}/imaplogin
334 %attr(755,root,root) %{_sbindir}/mkimapdcert
335 %{_mandir}/man8/imapd*
338 %defattr(644,root,root,755)
339 %doc README* imap/BUGS ChangeLog AUTHORS
340 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/authdaemon
341 %attr(754,root,root) /etc/rc.d/init.d/authdaemon
342 %attr(700,root,root) /var/lib/authdaemon
343 %attr(750,root,root) %dir %{_sysconfdir}
345 %dir %{_libexecdir}/authlib
346 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authdaemonrc
347 %{_sysconfdir}/quotawarnmsg.example
348 %attr(755,root,root) %{_bindir}/couriertls
349 %attr(755,root,root) %{_libexecdir}/authlib/authdaemon
350 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.plain
351 %attr(755,root,root) %{_libexecdir}/couriertcpd
352 %attr(755,root,root) %{_libexecdir}/courierlogger
353 %attr(755,root,root) %{_libexecdir}/makedatprog
354 %{_mandir}/man8/auth[cdsuv]*
355 %{_mandir}/man8/authp[aw]*
356 %{_mandir}/man7/authlib*
357 %{_mandir}/man1/couriert*
361 %defattr(644,root,root,755)
362 %attr(755,root,root) %{_sbindir}/makeuserdb
363 %attr(755,root,root) %{_sbindir}/pw2userdb
364 %attr(755,root,root) %{_sbindir}/userdb
365 %attr(755,root,root) %{_sbindir}/userdbpw
366 %attr(755,root,root) %{_sbindir}/vchkpw2userdb
367 %{_mandir}/man8/makeuserdb*
368 %{_mandir}/man8/userdb*
369 %{_mandir}/man8/*pw2userdb*
372 %defattr(644,root,root,755)
373 %attr(755,root,root) %{_bindir}/deliverquota
374 %{_mandir}/man8/deliverquota*
377 %defattr(644,root,root,755)
378 %attr(755,root,root) %{_bindir}/maildirmake
379 %{_mandir}/man1/maildirmake*
382 %defattr(644,root,root,755)
383 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/pop3
384 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.pop3
385 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap-pop3
386 %attr(754,root,root) /etc/rc.d/init.d/courier-imap-pop3
387 %attr(755,root,root) %{_bindir}/pop3d
388 %attr(755,root,root) %{_sbindir}/mkpop3dcert
389 %attr(755,root,root) %{_sbindir}/pop3login
390 %{_sysconfdir}/pop3d.cnf
391 %{_mandir}/man8/courierpop*
393 %if %{?_without_ldap:0}%{!?_without_ldap:1}
395 %defattr(644,root,root,755)
396 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authldaprc
397 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.ldap
398 %{_mandir}/man8/authldap*
401 %if %{?_without_mysql:0}%{!?_without_mysql:1}
403 %defattr(644,root,root,755)
404 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authmysqlrc
405 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.mysql
406 %{_mandir}/man8/authmysql*
409 %if %{?_without_pgsql:0}%{!?_without_pgsql:1}
411 %defattr(644,root,root,755)
412 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authpgsqlrc
413 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.pgsql
414 %{_mandir}/man8/authpgsql*