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}-myownquery-fix.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}
35 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
51 PreReq: /sbin/chkconfig
52 Requires: %{name}-maildirmake
53 Requires: %{name}-deliverquota
54 Requires: %{name}-userdb
57 Common files for imap and pop daemons.
59 %description common -l pl
60 Pliki wspólne dla serwerów imap i pop.
63 Summary: Commands used to create the /etc/userdb.dat
64 Summary(pl): Polecenia do tworzenia /etc/userdb.dat
65 Group: Networking/Daemons
68 Commands used to create the /etc/userdb.dat.
70 %description userdb -l pl
71 Polecenia u¿ywane do stworzenia /etc/userdb.dat.
74 Summary: Deliver to a Maildir with a quota
75 Summary(pl): Obs³uga quoty przy dostarczaniu poczty do skrzynek Maildir
76 Group: Networking/Daemons
78 %description deliverquota
79 deliverquota is a temporary hack to implement E-mail delivery to a
80 Maildir with a software-imposed quota.
82 %description deliverquota -l pl
83 deliverquota jest tymczasowym rozwi±zaniem implementuj±cym
84 dostarczanie e-maili do skrzynek Maildir z programowo narzucon± quot±.
87 Summary: Tool for making mail folders in Maildir format
88 Summary(pl): Narzêdzie do tworzenia folderów w formacie Maildir
89 Group: Networking/Daemons
90 Conflicts: qmail-maildirmake
92 %description maildirmake
93 Maildirmake is a tool for making mail folders in Maildir format.
95 %description maildirmake -l pl
96 Maildirmake jest narzêdziem do tworzenia folderów pocztowych w
100 Summary: Courier-IMAP POP3 Server
101 Summary(pl): Serwer Courier-IMAP POP3
102 Group: Networking/Daemons
103 PreReq: %{name}-common = %{version}
105 Obsoletes: pop3daemon
110 Courier-IMAP POP3 is an POP3 server for Maildir mailboxes.
112 %description pop3 -l pl
113 Courier-IMAP POP3 jest serwerem POP3 dla skrzynek pocztowych Maildir.
116 Summary: LDAP authentication daemon for Courier IMAP
117 Summary(pl): Demon autentykacji LDAP do Courier IMAP
118 Group: Networking/Daemons
119 PreReq: %{name}-common = %{version}
121 %description authldap
122 This package provides LDAP authentication for Courier IMAP.
124 %description authldap -l pl
125 Ten pakiet pozwala na korzystanie z autentykacji LDAP w Courier IMAP.
128 Summary: MySQL authentication daemon for Courier IMAP
129 Summary(pl): Demon autentykacji MySQL do Courier IMAP
130 Group: Networking/Daemons
131 PreReq: %{name}-common = %{version}
134 %description authmysql
135 This package provides MySQL authentication for Courier IMAP.
137 %description authmysql -l pl
138 Ten pakiet pozwala na korzystanie z autentykacji MySQL w Courier IMAP.
141 Summary: PostgreSQL authentication daemon for Courier IMAP
142 Summary(pl): Demon autentykacji PostgreSQL do Courier IMAP
143 Group: Networking/Daemons
144 PreReq: %{name}-common = %{version}
146 %description authpgsql
147 This package provides PostgreSQL authentication for Courier IMAP.
149 %description authpgsql -l pl
150 Ten pakiet pozwala na korzystanie z autentykacji PostgreSQL w Courier
160 --with-authchangepwdir=/var/tmp \
161 --with-authdaemonvar=/var/lib/authdaemon \
162 %{!?_without_mysql:--with-mysql-libs=%{_libdir} --with-mysql-includes=%{_includedir}/mysql} \
163 %{?_without_mysql:--without-authmysql} \
164 %{!?_without_postgresql:--with-pgsql-libs=%{_libdir} --with-pgsql-includes=%{_includedir}/postgresql} \
165 %{?_without_postgresql:--without-authpgsql} \
166 %{?_without_ldap:--without-authldap}
171 rm -rf $RPM_BUILD_ROOT
172 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig} \
173 $RPM_BUILD_ROOT{%{_sysconfdir},/var/lib/authdaemon}
175 %{__make} install DESTDIR=$RPM_BUILD_ROOT
177 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap
178 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap-pop3
179 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/authdaemon
181 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/imap
182 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/pop3
184 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap
185 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap-pop3
186 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/authdaemon
188 rm -rf $RPM_BUILD_ROOT%{_mandir}/man8/{authcram,authpam,authpwd,authshadow,authuserdb,authvchkpw,pw2userdb,vchkpw2userdb,authdaemon,authdaemond,authldap,authmysql}.8 \
189 $RPM_BUILD_ROOT%{_sbindir}/{*db,mk*cert}
191 mv -f authlib/README.authmysql.html README.authmysql.html
192 mv -f authlib/README.ldap README.ldap
193 mv -f authlib/README.authmysql.myownquery README.authmysql.myownquery
194 mv -f imap/README README.imap
195 mv -f maildir/README.maildirquota.txt README.maildirquota
197 install authlib/authdaemonrc $RPM_BUILD_ROOT%{_sysconfdir}
198 install authlib/authldaprc $RPM_BUILD_ROOT%{_sysconfdir}
199 install authlib/authmysqlrc $RPM_BUILD_ROOT%{_sysconfdir}
200 install authlib/authpgsqlrc $RPM_BUILD_ROOT%{_sysconfdir}
202 mv -f $RPM_BUILD_ROOT%{_datadir}/*db \
203 $RPM_BUILD_ROOT%{_sbindir}
204 mv -f $RPM_BUILD_ROOT%{_datadir}/mk*cert \
205 $RPM_BUILD_ROOT%{_sbindir}
207 mv -f tcpd/couriertls.1 $RPM_BUILD_ROOT%{_mandir}/man8/couriertls.1
208 mv -f imap/courierpop3d.8 $RPM_BUILD_ROOT%{_mandir}/man8/courierpop3d.8
210 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authcram.8
211 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpam.8
212 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpwd.8
213 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authshadow.8
214 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authuserdb.8
215 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authvchkpw.8
216 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemon.8
217 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemond.8
218 %{!?_without_pgsql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpgsql.8}
219 %{!?_without_mysql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authmysql.8}
220 %{!?_without_ldap:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authldap.8}
221 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8
222 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8
224 touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap}
227 rm -rf $RPM_BUILD_ROOT
230 /sbin/chkconfig --add courier-imap
232 if [ -f /var/lock/subsys/courier-imap ]; then
233 /etc/rc.d/init.d/courier-imap restart >&2
235 echo "Run \"/etc/rc.d/init.d/courier-imap start\" to start courier-imap daemon."
239 if [ "$1" = "0" ]; then
240 if [ -f /var/lock/subsys/courier-imap ]; then
241 /etc/rc.d/init.d/courier-imap stop >&2
243 /sbin/chkconfig --del courier-imap
247 /sbin/chkconfig --add authdaemon
249 if [ -f /var/lock/subsys/authdaemon ]; then
250 /etc/rc.d/init.d/authdaemon restart >&2
252 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
256 if [ "$1" = "0" ]; then
257 if [ -f /var/lock/subsys/authdaemon ]; then
258 /etc/rc.d/init.d/authdaemon stop >&2
261 /sbin/chkconfig --del authdaemon
265 /sbin/chkconfig --add courier-imap-pop3
267 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
268 /etc/rc.d/init.d/courier-imap-pop3 restart >&2
270 echo "Run \"/etc/rc.d/init.d/courier-imap-pop3 start\" to start courier-imap pop3 daemon."
274 if [ "$1" = "0" ]; then
275 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
276 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
278 /sbin/chkconfig --del courier-imap-pop3
283 . /etc/sysconfig/authdaemon
284 if [ "$METHOD" = "ldap" ]; then
285 if [ -f /var/lock/subsys/authdaemon ]; then
286 /etc/rc.d/init.d/authdaemon restart >&2
288 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
294 . /etc/sysconfig/authdaemon
295 if [ "$1" = "$0" -a "$METHOD" = "ldap" ]; then
296 if [ -f /var/lock/subsys/authdaemon ]; then
297 /etc/rc.d/init.d/authdaemon stop >&2
303 . /etc/sysconfig/authdaemon
304 if [ "$METHOD" = "mysql" ]; 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" = "mysql" ]; then
316 if [ -f /var/lock/subsys/authdaemon ]; then
317 /etc/rc.d/init.d/authdaemon stop >&2
322 %defattr(644,root,root,755)
323 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/imap
324 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.imap
325 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap
326 %attr(754,root,root) /etc/rc.d/init.d/courier-imap
327 %{_sysconfdir}/imapd.cnf
328 %attr(755,root,root) %{_bindir}/imapd
329 %attr(755,root,root) %{_sbindir}/imaplogin
330 %attr(755,root,root) %{_sbindir}/mkimapdcert
331 %{_mandir}/man8/imapd*
334 %defattr(644,root,root,755)
335 %doc README* imap/BUGS AUTHORS COPYING
336 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/authdaemon
337 %attr(754,root,root) /etc/rc.d/init.d/authdaemon
338 %attr(700,root,root) /var/lib/authdaemon
339 %attr(750,root,root) %dir %{_sysconfdir}
341 %dir %{_libexecdir}/authlib
342 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authdaemonrc
343 %{_sysconfdir}/quotawarnmsg.example
344 %attr(755,root,root) %{_bindir}/couriertls
345 %attr(755,root,root) %{_libexecdir}/authlib/authdaemon
346 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.plain
347 %attr(755,root,root) %{_libexecdir}/couriertcpd
348 %attr(755,root,root) %{_libexecdir}/logger
349 %attr(755,root,root) %{_libexecdir}/makedatprog
350 %{_mandir}/man8/auth[cdsuv]*
351 %{_mandir}/man8/authp[aw]*
352 %{_mandir}/man7/authlib*
353 %{_mandir}/man1/couriert*
357 %defattr(644,root,root,755)
358 %attr(755,root,root) %{_sbindir}/makeuserdb
359 %attr(755,root,root) %{_sbindir}/pw2userdb
360 %attr(755,root,root) %{_sbindir}/userdb
361 %attr(755,root,root) %{_sbindir}/userdbpw
362 %attr(755,root,root) %{_sbindir}/vchkpw2userdb
363 %{_mandir}/man8/makeuserdb*
364 %{_mandir}/man8/userdb*
365 %{_mandir}/man8/*pw2userdb*
368 %defattr(644,root,root,755)
369 %attr(755,root,root) %{_libexecdir}/deliverquota
370 %{_mandir}/man8/deliverquota*
373 %defattr(644,root,root,755)
374 %attr(755,root,root) %{_bindir}/maildirmake
375 %{_mandir}/man1/maildirmake*
378 %defattr(644,root,root,755)
379 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/pop3
380 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.pop3
381 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap-pop3
382 %attr(754,root,root) /etc/rc.d/init.d/courier-imap-pop3
383 %attr(755,root,root) %{_bindir}/pop3d
384 %attr(755,root,root) %{_sbindir}/mkpop3dcert
385 %attr(755,root,root) %{_sbindir}/pop3login
386 %{_sysconfdir}/pop3d.cnf
387 %{_mandir}/man8/courierpop*
389 %if %{?_without_ldap:0}%{!?_without_ldap:1}
391 %defattr(644,root,root,755)
392 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authldaprc
393 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.ldap
394 %{_mandir}/man8/authldap*
397 %if %{?_without_mysql:0}%{!?_without_mysql:1}
399 %defattr(644,root,root,755)
400 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authmysqlrc
401 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.mysql
402 %{_mandir}/man8/authmysql*
405 %if %{?_without_pgsql:0}%{!?_without_pgsql:1}
407 %defattr(644,root,root,755)
408 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authpgsqlrc
409 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.pgsql
410 %{_mandir}/man8/authpgsql*