3 # _without_ldap - without LDAP support
4 # _without_mysql - without MySQL support
5 # _without_pgsql - 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
14 # Source0-md5: 132c2405e3857b3fa2a6369d77e19fd9
16 Source2: %{name}-pop3.init
17 Source3: %{name}-authdaemon.init
19 Source5: %{name}-pop3.pamd
20 Source6: %{name}.sysconfig
21 Source7: %{name}-pop3.sysconfig
22 Source8: %{name}-authdaemon.sysconfig
23 Patch0: ftp://ftp.pld-linux.org/people/siefca/patches/courier/%{name}-%{version}-myownquery.patch
24 URL: http://www.inter7.com/courierimap/
25 %{!?_without_pgsql: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 PreReq: %{name}-common = %{version}
35 Conflicts: cyrus-imapd
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 %define _libexecdir /usr/lib/courier-imap
40 %define _sysconfdir /etc/courier-imap
43 Courier-IMAP is an IMAP server for Maildir mailboxes.
46 Courier-IMAP jest serwerem IMAP dla skrzynek pocztowych Maildir.
49 Summary: Common files for imap and pop daemons
50 Summary(pl): Pliki wspólne dla serwerów imap i pop
51 Group: Networking/Daemons
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 Summary(pl): Polecenia do tworzenia /etc/userdb.dat
67 Group: Networking/Daemons
70 Commands used to create the /etc/userdb.dat.
72 %description userdb -l pl
73 Polecenia u¿ywane do stworzenia /etc/userdb.dat.
76 Summary: Deliver to a Maildir with a quota
77 Summary(pl): Obs³uga quoty przy dostarczaniu poczty do skrzynek Maildir
78 Group: Networking/Daemons
80 %description deliverquota
81 deliverquota is a temporary hack to implement E-mail delivery to a
82 Maildir with a software-imposed quota.
84 %description deliverquota -l pl
85 deliverquota jest tymczasowym rozwi±zaniem implementuj±cym
86 dostarczanie e-maili do skrzynek Maildir z programowo narzucon± quot±.
89 Summary: Tool for making mail folders in Maildir format
90 Summary(pl): Narzêdzie do tworzenia folderów w formacie Maildir
91 Group: Networking/Daemons
92 Conflicts: qmail-maildirmake
94 %description maildirmake
95 Maildirmake is a tool for making mail folders in Maildir format.
97 %description maildirmake -l pl
98 Maildirmake jest narzêdziem do tworzenia folderów pocztowych w
102 Summary: Courier-IMAP POP3 Server
103 Summary(pl): Serwer Courier-IMAP POP3
104 Group: Networking/Daemons
105 PreReq: %{name}-common = %{version}
107 Obsoletes: pop3daemon
108 Conflicts: cyrus-imapd
111 Conflicts: solid-pop3d
114 Courier-IMAP POP3 is an POP3 server for Maildir mailboxes.
116 %description pop3 -l pl
117 Courier-IMAP POP3 jest serwerem POP3 dla skrzynek pocztowych Maildir.
120 Summary: LDAP authentication daemon for Courier IMAP
121 Summary(pl): Demon autentykacji LDAP do Courier IMAP
122 Group: Networking/Daemons
123 PreReq: %{name}-common = %{version}
125 %description authldap
126 This package provides LDAP authentication for Courier IMAP.
128 %description authldap -l pl
129 Ten pakiet pozwala na korzystanie z autentykacji LDAP w Courier IMAP.
132 Summary: MySQL authentication daemon for Courier IMAP
133 Summary(pl): Demon autentykacji MySQL do Courier IMAP
134 Group: Networking/Daemons
135 PreReq: %{name}-common = %{version}
138 %description authmysql
139 This package provides MySQL authentication for Courier IMAP.
141 %description authmysql -l pl
142 Ten pakiet pozwala na korzystanie z autentykacji MySQL w Courier IMAP.
145 Summary: PostgreSQL authentication daemon for Courier IMAP
146 Summary(pl): Demon autentykacji PostgreSQL do Courier IMAP
147 Group: Networking/Daemons
148 PreReq: %{name}-common = %{version}
150 %description authpgsql
151 This package provides PostgreSQL authentication for Courier IMAP.
153 %description authpgsql -l pl
154 Ten pakiet pozwala na korzystanie z autentykacji PostgreSQL w Courier
164 --with-authchangepwdir=/var/tmp \
165 --with-authdaemonvar=/var/lib/authdaemon \
166 %{!?_without_mysql:--with-mysql-libs=%{_libdir} --with-mysql-includes=%{_includedir}/mysql} \
167 %{?_without_mysql:--without-authmysql} \
168 %{!?_without_pgsql:--with-pgsql-libs=%{_libdir} --with-pgsql-includes=%{_includedir}/postgresql} \
169 %{?_without_pgsql:--without-authpgsql} \
170 %{?_without_ldap:--without-authldap}
175 rm -rf $RPM_BUILD_ROOT
176 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig} \
177 $RPM_BUILD_ROOT{%{_sysconfdir},/var/lib/authdaemon}
179 %{__make} install DESTDIR=$RPM_BUILD_ROOT
181 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap
182 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-pop3
183 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/authdaemon
185 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/imap
186 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/pop3
188 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap
189 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/courier-pop3
190 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/authdaemon
192 rm -rf $RPM_BUILD_ROOT%{_mandir}/man8/{authcram,authpam,authpwd,authshadow,authuserdb,authvchkpw,pw2userdb,vchkpw2userdb,authdaemon,authdaemond,authldap,authmysql}.8 \
193 $RPM_BUILD_ROOT%{_sbindir}/{*db,mk*cert}
195 mv -f authlib/README.authmysql.html README.authmysql.html
196 mv -f authlib/README.ldap README.ldap
197 mv -f authlib/README.authmysql.myownquery README.authmysql.myownquery
198 mv -f imap/README README.imap
199 mv -f imap/ChangeLog ChangeLog
200 mv -f maildir/README.maildirquota.txt README.maildirquota
202 install authlib/authdaemonrc $RPM_BUILD_ROOT%{_sysconfdir}
203 install authlib/authldaprc $RPM_BUILD_ROOT%{_sysconfdir}
204 install authlib/authmysqlrc $RPM_BUILD_ROOT%{_sysconfdir}
205 install authlib/authpgsqlrc $RPM_BUILD_ROOT%{_sysconfdir}
207 mv -f $RPM_BUILD_ROOT%{_datadir}/*db \
208 $RPM_BUILD_ROOT%{_sbindir}
209 mv -f $RPM_BUILD_ROOT%{_datadir}/mk*cert \
210 $RPM_BUILD_ROOT%{_sbindir}
212 mv -f tcpd/couriertls.1 $RPM_BUILD_ROOT%{_mandir}/man8/couriertls.8
213 mv -f imap/courierpop3d.8 $RPM_BUILD_ROOT%{_mandir}/man8/courierpop3d.8
215 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authcram.8
216 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpam.8
217 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpwd.8
218 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authshadow.8
219 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authuserdb.8
220 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authvchkpw.8
221 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemon.8
222 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemond.8
223 %{!?_without_pgsql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpgsql.8}
224 %{!?_without_mysql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authmysql.8}
225 %{!?_without_ldap:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authldap.8}
226 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8
227 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8
229 touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap}
232 rm -rf $RPM_BUILD_ROOT
235 /sbin/chkconfig --add courier-imap
237 if [ -f /var/lock/subsys/courier-imap ]; then
238 /etc/rc.d/init.d/courier-imap restart >&2
240 echo "Run \"/etc/rc.d/init.d/courier-imap start\" to start courier-imap daemon."
244 if [ "$1" = "0" ]; then
245 if [ -f /var/lock/subsys/courier-imap ]; then
246 /etc/rc.d/init.d/courier-imap stop >&2
248 /sbin/chkconfig --del courier-imap
252 /sbin/chkconfig --add authdaemon
254 if [ -f /var/lock/subsys/authdaemon ]; then
255 /etc/rc.d/init.d/authdaemon restart >&2
257 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
261 if [ "$1" = "0" ]; then
262 if [ -f /var/lock/subsys/authdaemon ]; then
263 /etc/rc.d/init.d/authdaemon stop >&2
266 /sbin/chkconfig --del authdaemon
270 /sbin/chkconfig --add courier-pop3
271 /sbin/chkconfig --del courier-imap-pop3 2>&1 >/dev/null
272 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
273 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
274 /etc/rc.d/init.d/courier-pop3 start >&2
275 elif [ -f /var/lock/subsys/courier-pop3 ]; then
276 /etc/rc.d/init.d/courier-pop3 restart >&2
278 echo "Run \"/etc/rc.d/init.d/courier-pop3 start\" to start courier-pop3 daemon."
280 rm -f /etc/rc.d/init.d/courier-imap-pop3
283 if [ "$1" = "0" ]; then
284 if [ -f /var/lock/subsys/courier-pop3 ]; then
285 /etc/rc.d/init.d/courier-pop3 stop >&2
287 /sbin/chkconfig --del courier-pop3
288 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
289 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
291 /sbin/chkconfig --del courier-imap-pop3 2>&1 >/dev/null
292 rm -f /etc/rc.d/init.d/courier-imap-pop3
297 . /etc/sysconfig/authdaemon
298 if [ "$METHOD" = "ldap" ]; then
299 if [ -f /var/lock/subsys/authdaemon ]; then
300 /etc/rc.d/init.d/authdaemon restart >&2
302 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
308 . /etc/sysconfig/authdaemon
309 if [ "$1" = "$0" -a "$METHOD" = "ldap" ]; then
310 if [ -f /var/lock/subsys/authdaemon ]; then
311 /etc/rc.d/init.d/authdaemon stop >&2
317 . /etc/sysconfig/authdaemon
318 if [ "$METHOD" = "mysql" ]; then
319 if [ -f /var/lock/subsys/authdaemon ]; then
320 /etc/rc.d/init.d/authdaemon restart >&2
322 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
328 . /etc/sysconfig/authdaemon
329 if [ "$1" = "$0" -a "$METHOD" = "mysql" ]; then
330 if [ -f /var/lock/subsys/authdaemon ]; then
331 /etc/rc.d/init.d/authdaemon stop >&2
336 %defattr(644,root,root,755)
337 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/imap
338 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.imap
339 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap
340 %attr(754,root,root) /etc/rc.d/init.d/courier-imap
341 %{_sysconfdir}/imapd.cnf
342 %attr(755,root,root) %{_bindir}/imapd
343 %attr(755,root,root) %{_sbindir}/imaplogin
344 %attr(755,root,root) %{_sbindir}/mkimapdcert
345 %{_mandir}/man8/imapd*
348 %defattr(644,root,root,755)
349 %doc README* imap/BUGS ChangeLog AUTHORS
350 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/authdaemon
351 %attr(754,root,root) /etc/rc.d/init.d/authdaemon
352 %attr(700,root,root) /var/lib/authdaemon
353 %attr(750,root,root) %dir %{_sysconfdir}
355 %dir %{_libexecdir}/authlib
356 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authdaemonrc
357 %{_sysconfdir}/quotawarnmsg.example
358 %attr(755,root,root) %{_bindir}/couriertls
359 %attr(755,root,root) %{_libexecdir}/authlib/authdaemon
360 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.plain
361 %attr(755,root,root) %{_libexecdir}/couriertcpd
362 %attr(755,root,root) %{_libexecdir}/courierlogger
363 %attr(755,root,root) %{_libexecdir}/makedatprog
364 %{_mandir}/man8/auth[cdsuv]*
365 %{_mandir}/man8/authp[aw]*
366 %{_mandir}/man7/authlib*
367 %{_mandir}/man1/couriert*
371 %defattr(644,root,root,755)
372 %attr(755,root,root) %{_sbindir}/makeuserdb
373 %attr(755,root,root) %{_sbindir}/pw2userdb
374 %attr(755,root,root) %{_sbindir}/userdb
375 %attr(755,root,root) %{_sbindir}/userdbpw
376 %attr(755,root,root) %{_sbindir}/vchkpw2userdb
377 %{_mandir}/man8/makeuserdb*
378 %{_mandir}/man8/userdb*
379 %{_mandir}/man8/*pw2userdb*
382 %defattr(644,root,root,755)
383 %attr(755,root,root) %{_bindir}/deliverquota
384 %{_mandir}/man8/deliverquota*
387 %defattr(644,root,root,755)
388 %attr(755,root,root) %{_bindir}/maildirmake
389 %{_mandir}/man1/maildirmake*
392 %defattr(644,root,root,755)
393 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/pop3
394 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.pop3
395 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-pop3
396 %attr(754,root,root) /etc/rc.d/init.d/courier-pop3
397 %attr(755,root,root) %{_bindir}/pop3d
398 %attr(755,root,root) %{_sbindir}/mkpop3dcert
399 %attr(755,root,root) %{_sbindir}/pop3login
400 %{_sysconfdir}/pop3d.cnf
401 %{_mandir}/man8/courierpop*
403 %if %{?_without_ldap:0}%{!?_without_ldap:1}
405 %defattr(644,root,root,755)
406 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authldaprc
407 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.ldap
408 %{_mandir}/man8/authldap*
411 %if %{?_without_mysql:0}%{!?_without_mysql:1}
413 %defattr(644,root,root,755)
414 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authmysqlrc
415 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.mysql
416 %{_mandir}/man8/authmysql*
419 %if %{?_without_pgsql:0}%{!?_without_pgsql:1}
421 %defattr(644,root,root,755)
422 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authpgsqlrc
423 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.pgsql
424 %{_mandir}/man8/authpgsql*