5 # - add maildir.patch (like in courier-mta)
9 %bcond_without ldap # without LDAP support
10 %bcond_without mysql # without MySQL support
11 %bcond_without pgsql # without PostgreSQL support
12 Summary: Courier-IMAP server
13 Summary(pl): Serwer Courier-IMAP
18 Group: Networking/Daemons
19 Source0: http://dl.sourceforge.net/courier/%{name}-%{version}.tar.bz2
20 # Source0-md5: 8b0c79997905dc46cfe4cc13be74ceaf
22 Source2: %{name}-pop3.init
24 Source4: %{name}-pop3.pamd
25 URL: http://www.inter7.com/courierimap/
26 BuildRequires: autoconf >= 2.54
27 BuildRequires: automake
28 BuildRequires: gdbm-devel
29 BuildRequires: libstdc++-devel
30 %{?with_mysql:BuildRequires: mysql-devel}
31 %{?with_ldap:BuildRequires: openldap-devel}
32 BuildRequires: openssl-devel >= 0.9.7d
33 %{?with_pgsql:BuildRequires: postgresql-devel}
35 BuildRequires: sysconftool
36 %{?with_mysql:BuildRequires: zlib-devel}
37 PreReq: %{name}-common = %{version}-%{release}
39 Requires(post,preun): /sbin/chkconfig
40 Requires: pam >= 0.77.3
43 Conflicts: cyrus-imapd
45 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 %define _libexecdir /usr/lib/courier-imap
48 %define _sysconfdir /etc/courier-imap
51 Courier-IMAP is an IMAP server for Maildir mailboxes.
54 Courier-IMAP jest serwerem IMAP dla skrzynek pocztowych Maildir.
57 Summary: Common files for imap and pop daemons
58 Summary(pl): Pliki wspólne dla serwerów imap i pop
59 Group: Networking/Daemons
61 Requires(post,preun): /sbin/chkconfig
62 Requires: %{name}-deliverquota = %{version}-%{release}
63 Requires: %{name}-maildirmake = %{version}-%{release}
64 Requires: %{name}-userdb = %{version}-%{release}
68 Common files for imap and pop daemons.
70 %description common -l pl
71 Pliki wspólne dla serwerów imap i pop.
74 Summary: Commands used to create the /etc/userdb.dat
75 Summary(pl): Polecenia do tworzenia /etc/userdb.dat
76 Group: Networking/Daemons
79 Commands used to create the /etc/userdb.dat.
81 %description userdb -l pl
82 Polecenia u¿ywane do stworzenia /etc/userdb.dat.
85 Summary: Deliver to a Maildir with a quota
86 Summary(pl): Obs³uga quoty przy dostarczaniu poczty do skrzynek Maildir
87 Group: Networking/Daemons
89 %description deliverquota
90 deliverquota is a temporary hack to implement E-mail delivery to a
91 Maildir with a software-imposed quota.
93 %description deliverquota -l pl
94 deliverquota jest tymczasowym rozwi±zaniem implementuj±cym
95 dostarczanie e-maili do skrzynek Maildir z programowo narzucon± quot±.
98 Summary: Tool for making mail folders in Maildir format
99 Summary(pl): Narzêdzie do tworzenia folderów w formacie Maildir
100 Group: Networking/Daemons
101 Conflicts: qmail-maildirmake
103 %description maildirmake
104 Maildirmake is a tool for making mail folders in Maildir format.
106 %description maildirmake -l pl
107 Maildirmake jest narzêdziem do tworzenia folderów pocztowych w
111 Summary: Courier-IMAP POP3 Server
112 Summary(pl): Serwer Courier-IMAP POP3
113 Group: Networking/Daemons
114 PreReq: %{name}-common = %{version}-%{release}
115 Requires: pam >= 0.77.3
117 Obsoletes: pop3daemon
118 Conflicts: cyrus-imapd
120 Conflicts: solid-pop3d
124 Courier-IMAP POP3 is an POP3 server for Maildir mailboxes.
126 %description pop3 -l pl
127 Courier-IMAP POP3 jest serwerem POP3 dla skrzynek pocztowych Maildir.
130 Summary: LDAP authentication daemon for Courier IMAP
131 Summary(pl): Demon autentykacji LDAP do Courier IMAP
132 Group: Networking/Daemons
133 PreReq: %{name}-common = %{version}-%{release}
135 %description authldap
136 This package provides LDAP authentication for Courier IMAP.
138 %description authldap -l pl
139 Ten pakiet pozwala na korzystanie z autentykacji LDAP w Courier IMAP.
142 Summary: MySQL authentication daemon for Courier IMAP
143 Summary(pl): Demon autentykacji MySQL do Courier IMAP
144 Group: Networking/Daemons
145 PreReq: %{name}-common = %{version}-%{release}
148 %description authmysql
149 This package provides MySQL authentication for Courier IMAP.
151 %description authmysql -l pl
152 Ten pakiet pozwala na korzystanie z autentykacji MySQL w Courier IMAP.
155 Summary: PostgreSQL authentication daemon for Courier IMAP
156 Summary(pl): Demon autentykacji PostgreSQL do Courier IMAP
157 Group: Networking/Daemons
158 PreReq: %{name}-common = %{version}-%{release}
160 %description authpgsql
161 This package provides PostgreSQL authentication for Courier IMAP.
163 %description authpgsql -l pl
164 Ten pakiet pozwala na korzystanie z autentykacji PostgreSQL w Courier
171 cp -f /usr/share/automake/config.sub .
172 cp -f /usr/share/automake/config.sub maildir
180 --with-authchangepwdir=/var/tmp \
181 --with-authdaemonvar=/var/lib/authdaemon \
182 %{?with_mysql:--with-mysql-libs=%{_libdir} --with-mysql-includes=%{_includedir}/mysql} \
183 %{!?with_mysql:--without-authmysql} \
184 %{?with_pgsql:--with-pgsql-libs=%{_libdir} --with-pgsql-includes=%{_includedir}/postgresql} \
185 %{!?with_pgsql:--without-authpgsql} \
186 %{!?with_ldap:--without-authldap}
191 rm -rf $RPM_BUILD_ROOT
192 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig} \
193 $RPM_BUILD_ROOT{%{_sysconfdir}/shared,/var/lib/authdaemon}
196 DESTDIR=$RPM_BUILD_ROOT
198 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap
199 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-pop3
200 install %{SOURCE3} $RPM_BUILD_ROOT/etc/pam.d/imap
201 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/pop3
203 rm -rf $RPM_BUILD_ROOT%{_mandir}/man8/{authcram,authpam,authpwd,authshadow,authuserdb,authvchkpw,pw2userdb,vchkpw2userdb,authdaemon,authdaemond,authldap,authmysql}.8 \
204 $RPM_BUILD_ROOT%{_sbindir}/{*db,mk*cert}
206 mv -f authlib/README.authmysql.html README.authmysql.html
207 mv -f authlib/README.ldap README.ldap
208 mv -f authlib/README.authmysql.myownquery README.authmysql.myownquery
209 mv -f imap/README README.imap
210 mv -f imap/ChangeLog ChangeLog
211 mv -f maildir/README.maildirquota.txt README.maildirquota
213 install authlib/authdaemonrc $RPM_BUILD_ROOT%{_sysconfdir}
214 install authlib/authldaprc $RPM_BUILD_ROOT%{_sysconfdir}
215 install authlib/authmysqlrc $RPM_BUILD_ROOT%{_sysconfdir}
216 install authlib/authpgsqlrc $RPM_BUILD_ROOT%{_sysconfdir}
218 mv -f $RPM_BUILD_ROOT%{_datadir}/*db \
219 $RPM_BUILD_ROOT%{_sbindir}
220 mv -f $RPM_BUILD_ROOT%{_datadir}/mk*cert \
221 $RPM_BUILD_ROOT%{_sbindir}
223 mv -f tcpd/couriertls.1 $RPM_BUILD_ROOT%{_mandir}/man8/couriertls.8
224 mv -f imap/courierpop3d.8 $RPM_BUILD_ROOT%{_mandir}/man8/courierpop3d.8
226 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authcram.8
227 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authpam.8
228 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authpwd.8
229 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authshadow.8
230 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authuserdb.8
231 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authvchkpw.8
232 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemon.8
233 echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemond.8
234 %{?with_pgsql:echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authpgsql.8}
235 %{?with_mysql:echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authmysql.8}
236 %{?with_ldap:echo ".so man7/authlib.7" >$RPM_BUILD_ROOT%{_mandir}/man8/authldap.8}
237 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8
238 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8
240 touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap}
243 ./sysconftool $RPM_BUILD_ROOT%{_sysconfdir}/*.dist
245 # remove unpackaged files
246 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/*.dist
249 rm -rf $RPM_BUILD_ROOT
252 /sbin/chkconfig --add courier-imap
254 if [ -f /var/lock/subsys/courier-imap ]; then
255 /etc/rc.d/init.d/courier-imap restart >&2
257 echo "Run \"/etc/rc.d/init.d/courier-imap start\" to start courier-imap daemon."
261 if [ "$1" = "0" ]; then
262 if [ -f /var/lock/subsys/courier-imap ]; then
263 /etc/rc.d/init.d/courier-imap stop >&2
265 /sbin/chkconfig --del courier-imap
268 %triggerin -- %{name} < 3.0.5
270 %triggerin -n %{name}-common -- %{name}-common < 3.0.5
271 /sbin/chkconfig --del authdaemon
272 rm -f /var/lock/subsys/authdaemon
275 /sbin/chkconfig --add courier-pop3
276 /sbin/chkconfig --del courier-imap-pop3 >/dev/null 2>&1 || :
277 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
278 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
279 /etc/rc.d/init.d/courier-pop3 start >&2
280 elif [ -f /var/lock/subsys/courier-pop3 ]; then
281 /etc/rc.d/init.d/courier-pop3 restart >&2
283 echo "Run \"/etc/rc.d/init.d/courier-pop3 start\" to start courier-pop3 daemon."
285 rm -f /etc/rc.d/init.d/courier-imap-pop3
288 if [ "$1" = "0" ]; then
289 if [ -f /var/lock/subsys/courier-pop3 ]; then
290 /etc/rc.d/init.d/courier-pop3 stop >&2
292 /sbin/chkconfig --del courier-pop3
293 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
294 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
296 /sbin/chkconfig --del courier-imap-pop3 >/dev/null 2>&1 || :
297 rm -f /etc/rc.d/init.d/courier-imap-pop3
300 %triggerin -n %{name}-pop3 -- %{name}-pop3 < 3.0.5
303 if ps -A |grep -q authdaemond.lda; then
304 %{_libexecdir}/authlib/authdaemond stop
305 %{_libexecdir}/authlib/authdaemond start
309 if [ -x %{_libexecdir}/authlib/authdaemond ]; then
310 if ps -A |grep -q authdaemond.lda; then
311 %{_libexecdir}/authlib/authdaemond stop;
312 %{_libexecdir}/authlib/authdaemond start;
317 if ps -A |grep -q authdaemond.mys; then
318 %{_libexecdir}/authlib/authdaemond stop
319 %{_libexecdir}/authlib/authdaemond start
323 if [ -x %{_libexecdir}/authlib/authdaemond ]; then
324 if ps -A |grep -q authdaemond.mys; then
325 %{_libexecdir}/authlib/authdaemond stop;
326 %{_libexecdir}/authlib/authdaemond start;
331 if ps -A |grep -q authdaemond.pgs; then
332 %{_libexecdir}/authlib/authdaemond stop
333 %{_libexecdir}/authlib/authdaemond start
337 if [ -x %{_libexecdir}/authlib/authdaemond ]; then
338 if ps -A |grep -q authdaemond.pgs; then
339 %{_libexecdir}/authlib/authdaemond stop;
340 %{_libexecdir}/authlib/authdaemond start;
345 %defattr(644,root,root,755)
346 %doc maildir/README.sharedfolders.html
347 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/imap
348 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.imap
349 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/imapd
350 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/imapd-ssl
351 %{_sysconfdir}/imapd.cnf
352 %attr(754,root,root) /etc/rc.d/init.d/courier-imap
353 %attr(750,daemon,daemon) %dir %{_sysconfdir}/shared
354 %attr(755,root,root) %{_bindir}/imapd
355 %attr(755,root,root) %{_bindir}/maildiracl
356 %attr(755,root,root) %{_bindir}/maildirkw
357 %attr(755,root,root) %{_sbindir}/authenumerate
358 %attr(755,root,root) %{_sbindir}/imaplogin
359 %attr(755,root,root) %{_sbindir}/mkimapdcert
360 %attr(755,root,root) %{_sbindir}/sharedindexinstall
361 %attr(755,root,root) %{_sbindir}/sharedindexsplit
362 %attr(755,root,root) %{_libexecdir}/imapd.rc
363 %attr(755,root,root) %{_libexecdir}/imapd-ssl.rc
364 %{_mandir}/man8/imapd*
365 %{_mandir}/man1/maildiracl.1*
366 %{_mandir}/man1/maildirkw.1*
369 %defattr(644,root,root,755)
370 %doc AUTHORS ChangeLog imap/BUGS INSTALL README*
371 %attr(700,root,root) /var/lib/authdaemon
372 %attr(750,root,root) %dir %{_sysconfdir}
374 %dir %{_libexecdir}/authlib
375 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authdaemonrc
376 %{_sysconfdir}/quotawarnmsg.example
377 %attr(755,root,root) %{_bindir}/couriertls
378 %attr(755,root,root) %{_libexecdir}/authlib/authdaemon
379 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond
380 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.plain
381 %attr(755,root,root) %{_libexecdir}/couriertcpd
382 %attr(755,root,root) %{_libexecdir}/makedatprog
383 %attr(755,root,root) %{_sbindir}/courierlogger
384 %{_mandir}/man8/auth[cdsuv]*
385 %{_mandir}/man8/authp[aw]*
386 %{_mandir}/man7/authlib*
387 %{_mandir}/man1/couriert*
388 %{_mandir}/man8/couriert*
392 %defattr(644,root,root,755)
393 %attr(755,root,root) %{_sbindir}/makeuserdb
394 %attr(755,root,root) %{_sbindir}/pw2userdb
395 %attr(755,root,root) %{_sbindir}/userdb
396 %attr(755,root,root) %{_sbindir}/userdbpw
397 %attr(755,root,root) %{_sbindir}/vchkpw2userdb
398 %{_mandir}/man8/makeuserdb*
399 %{_mandir}/man8/userdb*
400 %{_mandir}/man8/*pw2userdb*
403 %defattr(644,root,root,755)
404 %attr(755,root,root) %{_bindir}/deliverquota
405 %{_mandir}/man8/deliverquota*
408 %defattr(644,root,root,755)
409 %attr(755,root,root) %{_bindir}/maildirmake
410 %{_mandir}/man1/maildirmake*
413 %defattr(644,root,root,755)
414 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/pop3
415 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.pop3
416 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/pop3d
417 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/pop3d-ssl
418 %attr(754,root,root) /etc/rc.d/init.d/courier-pop3
419 %attr(755,root,root) %{_bindir}/pop3d
420 %attr(755,root,root) %{_sbindir}/mkpop3dcert
421 %attr(755,root,root) %{_sbindir}/pop3login
422 %attr(755,root,root) %{_libexecdir}/pop3d.rc
423 %attr(755,root,root) %{_libexecdir}/pop3d-ssl.rc
424 %{_sysconfdir}/pop3d.cnf
425 %{_mandir}/man8/courierpop*
429 %defattr(644,root,root,755)
430 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authldaprc
431 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.ldap
432 %{_mandir}/man8/authldap*
437 %defattr(644,root,root,755)
438 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authmysqlrc
439 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.mysql
440 %{_mandir}/man8/authmysql*
445 %defattr(644,root,root,755)
446 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authpgsqlrc
447 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.pgsql
448 %{_mandir}/man8/authpgsql*