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 Group(de): Netzwerkwesen/Server
14 Group(pl): Sieciowe/Serwery
15 Source0: http://download.sourceforge.net/courier/%{name}-%{version}.tar.gz
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: %{name}-authmysql.patch
25 URL: http://www.inter7.com/courierimap/
26 %{!?_without_postgresql:BuildRequires: postgresql-devel}
27 %{!?_without_mysql:BuildRequires: mysql-devel}
28 %{!?_without_ldap:BuildRequires: openldap-devel}
29 BuildRequires: gdbm-devel
30 BuildRequires: libstdc++-devel
31 BuildRequires: openssl-devel
33 Prereq: %{name}-common = %{version}
34 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
50 Group(de): Netzwerkwesen/Server
51 Group(pl): Sieciowe/Serwery
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 Group: Networking/Daemons
67 Group(de): Netzwerkwesen/Server
68 Group(pl): Sieciowe/Serwery
71 Commands used to create the /etc/userdb.dat
74 Summary: Deliver to a maildir with a quota
75 Group: Networking/Daemons
76 Group(de): Netzwerkwesen/Server
77 Group(pl): Sieciowe/Serwery
79 %description deliverquota
80 deliverquota is a temporary hack to implement E-mail delivery to a
81 maildir with a software-imposed quota.
84 Summary: Tool for making mail folders in Maildir format.
85 Group: Networking/Daemons
86 Group(de): Netzwerkwesen/Server
87 Group(pl): Sieciowe/Serwery
88 Conflicts: qmail-maildirmake
90 %description maildirmake
91 Maildirmake is a tool for making mail folders in Maildir format.
94 Summary: Courier-IMAP POP3 Server
95 Summary(pl): Serwer Courier-IMAP POP3
96 Group: Networking/Daemons
97 Group(de): Netzwerkwesen/Server
98 Group(pl): Sieciowe/Serwery
99 Prereq: %{name}-common = %{version}
101 Obsoletes: pop3daemon
104 Courier-IMAP POP3 is an POP3 server for Maildir mailboxes.
106 %description pop3 -l pl
107 Courier-IMAP POP3 jest serwerem POP3 dla skrzynek pocztowych Maildir.
110 Summary: LDAP authentication daemon for Courier IMAP
111 Summary(pl): Demon autentykacji LDAP do Courier IMAP
112 Group: Networking/Daemons
113 Group(de): Netzwerkwesen/Server
114 Group(pl): Sieciowe/Serwery
115 Prereq: %{name}-common = %{version}
117 %description authldap
118 This package provides LDAP authentication for Courier IMAP.
120 %description authldap -l pl
121 Ten pakiet pozwala na korzystanie z autentykacji LDAP w Courier IMAP.
124 Summary: MySQL authentication daemon for Courier IMAP
125 Summary(pl): Demon autentykacji MySQL do Courier IMAP
126 Group: Networking/Daemons
127 Group(de): Netzwerkwesen/Server
128 Group(pl): Sieciowe/Serwery
129 Prereq: %{name}-common = %{version}
131 %description authmysql
132 This package provides MySQL authentication for Courier IMAP.
134 %description authmysql -l pl
135 Ten pakiet pozwala na korzystanie z autentykacji MySQL w Courier IMAP.
138 Summary: PostgreSQL authentication daemon for Courier IMAP
139 Summary(pl): Demon autentykacji PostgreSQL do Courier IMAP
140 Group: Networking/Daemons
141 Group(de): Netzwerkwesen/Server
142 Group(pl): Sieciowe/Serwery
143 Prereq: %{name}-common = %{version}
145 %description authpgsql
146 This package provides PostgreSQL authentication for Courier IMAP.
148 %description authpgsql -l pl
149 Ten pakiet pozwala na korzystanie z autentykacji PostgreSQL w Courier IMAP.
158 --with-authchangepwdir=/var/tmp \
159 --with-authdaemonvar=/var/lib/authdaemon \
160 %{!?_without_mysql:--with-mysql-libs=%{_libdir} --with-mysql-includes=%{_includedir}/mysql} \
161 %{?_without_postgresql:--without-authpgsql} \
162 %{?_without_ldap:--without-authldap}
167 rm -rf $RPM_BUILD_ROOT
168 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig} \
169 $RPM_BUILD_ROOT{%{_sysconfdir},/var/lib/authdaemon}
171 %{__make} install DESTDIR=$RPM_BUILD_ROOT
173 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap
174 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap-pop3
175 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/authdaemon
177 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/imap
178 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/pop3
180 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap
181 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap-pop3
182 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/authdaemon
184 rm -rf $RPM_BUILD_ROOT%{_mandir}/man8/{authcram,authpam,authpwd,authshadow,authuserdb,authvchkpw,pw2userdb,vchkpw2userdb,authdaemon,authdaemond,authldap,authmysql}.8 \
185 $RPM_BUILD_ROOT%{_sbindir}/{*db,mk*cert}
187 mv -f imap/README README.imap
188 mv -f maildir/README.maildirquota.txt README.maildirquota
190 install authlib/authdaemonrc $RPM_BUILD_ROOT%{_sysconfdir}
191 install authlib/authldaprc $RPM_BUILD_ROOT%{_sysconfdir}
192 install authlib/authmysqlrc $RPM_BUILD_ROOT%{_sysconfdir}
193 install authlib/authpgsqlrc $RPM_BUILD_ROOT%{_sysconfdir}
195 mv -f $RPM_BUILD_ROOT%{_datadir}/*db \
196 $RPM_BUILD_ROOT%{_sbindir}
197 mv -f $RPM_BUILD_ROOT%{_datadir}/mk*cert \
198 $RPM_BUILD_ROOT%{_sbindir}
200 imap/html2man.pl tcpd/couriertls.html > $RPM_BUILD_ROOT%{_mandir}/man8/couriertls.8
202 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authcram.8
203 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpam.8
204 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpwd.8
205 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authshadow.8
206 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authuserdb.8
207 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authvchkpw.8
208 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemon.8
209 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemond.8
210 %{!?_without_pgsql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpgsql.8}
211 %{!?_without_mysql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authmysql.8}
212 %{!?_without_ldap:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authldap.8}
213 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8
214 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8
216 gzip -9nf README* imap/BUGS AUTHORS COPYING
218 touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap}
221 rm -rf $RPM_BUILD_ROOT
224 /sbin/chkconfig --add courier-imap
226 if [ -f /var/lock/subsys/courier-imap ]; then
227 /etc/rc.d/init.d/courier-imap restart >&2
229 echo "Run \"/etc/rc.d/init.d/courier-imap start\" to start courier-imap daemon."
233 if [ "$1" = "0" ]; then
234 if [ -f /var/lock/subsys/courier-imap ]; then
235 /etc/rc.d/init.d/courier-imap stop >&2
237 /sbin/chkconfig --del courier-imap
241 /sbin/chkconfig --add authdaemon
243 if [ -f /var/lock/subsys/authdaemon ]; then
244 /etc/rc.d/init.d/authdaemon restart >&2
246 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
250 if [ "$1" = "0" ]; then
251 if [ -f /var/lock/subsys/authdaemon ]; then
252 /etc/rc.d/init.d/authdaemon stop >&2
255 /sbin/chkconfig --del authdaemon
259 /sbin/chkconfig --add courier-imap-pop3
261 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
262 /etc/rc.d/init.d/courier-imap-pop3 restart >&2
264 echo "Run \"/etc/rc.d/init.d/courier-imap-pop3 start\" to start courier-imap pop3 daemon."
268 if [ "$1" = "0" ]; then
269 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
270 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
272 /sbin/chkconfig --del courier-imap-pop3
277 . /etc/sysconfig/authdaemon
278 if [ "$METHOD" = "ldap" ]; then
279 if [ -f /var/lock/subsys/authdaemon ]; then
280 /etc/rc.d/init.d/authdaemon stop >&2
282 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
288 . /etc/sysconfig/authdaemon
289 if [ "$1" = "$0" -a "$METHOD" = "ldap" ]; then
290 if [ -f /var/lock/subsys/authdaemon ]; then
291 /etc/rc.d/init.d/authdaemon stop >&2
297 . /etc/sysconfig/authdaemon
298 if [ "$METHOD" = "mysql" ]; then
299 if [ -f /var/lock/subsys/authdaemon ]; then
300 /etc/rc.d/init.d/authdaemon stop >&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" = "mysql" ]; then
310 if [ -f /var/lock/subsys/authdaemon ]; then
311 /etc/rc.d/init.d/authdaemon stop >&2
316 %defattr(644,root,root,755)
317 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/imap
318 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.imap
319 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap
320 %attr(754,root,root) /etc/rc.d/init.d/courier-imap
321 %{_sysconfdir}/imapd.cnf
322 %attr(755,root,root) %{_bindir}/imapd
323 %attr(755,root,root) %{_sbindir}/imaplogin
324 %attr(755,root,root) %{_sbindir}/mkimapdcert
325 %{_mandir}/man8/imapd*
328 %defattr(644,root,root,755)
330 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/authdaemon
331 %attr(754,root,root) /etc/rc.d/init.d/authdaemon
332 %attr(700,root,root) /var/lib/authdaemon
333 %attr(750,root,root) %dir %{_sysconfdir}
335 %dir %{_libexecdir}/authlib
336 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authdaemonrc
337 %{_sysconfdir}/quotawarnmsg.example
338 %attr(755,root,root) %{_bindir}/couriertls
339 %attr(755,root,root) %{_libexecdir}/authlib/authdaemon
340 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.plain
341 %attr(755,root,root) %{_libexecdir}/couriertcpd
342 %attr(755,root,root) %{_libexecdir}/logger
343 %attr(755,root,root) %{_libexecdir}/makedatprog
344 %{_mandir}/man8/auth[cdpsuv]*
345 %{_mandir}/man8/authlib*
346 %{_mandir}/man8/couriert*
350 %defattr(644,root,root,755)
351 %attr(755,root,root) %{_sbindir}/makeuserdb
352 %attr(755,root,root) %{_sbindir}/pw2userdb
353 %attr(755,root,root) %{_sbindir}/userdb
354 %attr(755,root,root) %{_sbindir}/userdbpw
355 %attr(755,root,root) %{_sbindir}/vchkpw2userdb
356 %{_mandir}/man8/makeuserdb*
357 %{_mandir}/man8/userdb*
358 %{_mandir}/man8/*pw2userdb*
361 %defattr(644,root,root,755)
362 %attr(755,root,root) %{_libexecdir}/deliverquota
363 %{_mandir}/man8/deliverquota*
366 %defattr(644,root,root,755)
367 %attr(755,root,root) %{_bindir}/maildirmake
368 %{_mandir}/man1/maildirmake*
371 %defattr(644,root,root,755)
372 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/pop3
373 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.pop3
374 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap-pop3
375 %attr(754,root,root) /etc/rc.d/init.d/courier-imap-pop3
376 %attr(755,root,root) %{_bindir}/pop3d
377 %attr(755,root,root) %{_sbindir}/mkpop3dcert
378 %attr(755,root,root) %{_sbindir}/pop3login
379 %{_sysconfdir}/pop3d.cnf
381 %if %{?_without_ldap:0}%{!?_without_ldap:1}
383 %defattr(644,root,root,755)
384 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authldaprc
385 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.ldap
386 %{_mandir}/man8/authldap*
389 %if %{?_without_mysql:0}%{!?_without_mysql:1}
391 %defattr(644,root,root,755)
392 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authmysqlrc
393 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.mysql
394 %{_mandir}/man8/authmysql*
397 %if %{?_without_pgsql:0}%{!?_without_pgsql:1}
399 %defattr(644,root,root,755)
400 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authpgsqlrc
401 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.pgsql
402 %{_mandir}/man8/authpgsql*