3 # _without_ldap - without LDAP support
4 # _without_mysql - without MySQL support
5 Summary: Courier-IMAP server
6 Summary(pl): Serwer Courier-IMAP
11 Group: Networking/Daemons
12 Group(de): Netzwerkwesen/Server
13 Group(pl): Sieciowe/Serwery
14 Source0: http://download.sourceforge.net/courier/%{name}-%{version}.tar.gz
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 URL: http://www.inter7.com/courierimap/
24 %{!?_without_mysql:BuildRequires: mysql-devel}
25 %{!?_without_ldap:BuildRequires: openldap-devel}
26 BuildRequires: gdbm-devel
27 BuildRequires: libstdc++-devel
29 Prereq: %{name}-common = %{version}
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 %define _libexecdir /usr/lib/courier-imap
34 %define _sysconfdir /etc/courier-imap
37 Courier-IMAP is an IMAP server for Maildir mailboxes.
40 Courier-IMAP jest serwerem IMAP dla skrzynek pocztowych Maildir.
43 Summary: Common files for imap and pop daemons
44 Summary(pl): Pliki wspólne dla serwerów imap i pop
45 Group: Networking/Daemons
46 Group(de): Netzwerkwesen/Server
47 Group(pl): Sieciowe/Serwery
49 Prereq: /sbin/chkconfig
50 Requires: %{name}-maildirmake
51 Requires: %{name}-deliverquota
52 Requires: %{name}-userdb
55 Common files for imap and pop daemons.
57 %description common -l pl
58 Pliki wspólne dla serwerów imap i pop.
61 Summary: Commands used to create the /etc/userdb.dat
62 Group: Networking/Daemons
63 Group(de): Netzwerkwesen/Server
64 Group(pl): Sieciowe/Serwery
67 Commands used to create the /etc/userdb.dat
70 Summary: Deliver to a maildir with a quota
71 Group: Networking/Daemons
72 Group(de): Netzwerkwesen/Server
73 Group(pl): Sieciowe/Serwery
75 %description deliverquota
76 deliverquota is a temporary hack to implement E-mail delivery to a
77 maildir with a software-imposed quota.
80 Summary: Tool for making mail folders in Maildir format.
81 Group: Networking/Daemons
82 Group(de): Netzwerkwesen/Server
83 Group(pl): Sieciowe/Serwery
84 Conflicts: qmail-maildirmake
86 %description maildirmake
87 Maildirmake is a tool for making mail folders in Maildir format.
90 Summary: Courier-IMAP POP3 Server
91 Summary(pl): Serwer Courier-IMAP POP3
92 Group: Networking/Daemons
93 Group(de): Netzwerkwesen/Server
94 Group(pl): Sieciowe/Serwery
95 Prereq: %{name}-common = %{version}
100 Courier-IMAP POP3 is an POP3 server for Maildir mailboxes.
102 %description pop3 -l pl
103 Courier-IMAP POP3 jest serwerem POP3 dla skrzynek pocztowych Maildir.
106 Summary: LDAP authentication daemon for Courier IMAP
107 Summary(pl): Demon autentykacji LDAP do Courier IMAP
108 Group: Networking/Daemons
109 Group(de): Netzwerkwesen/Server
110 Group(pl): Sieciowe/Serwery
111 Prereq: %{name}-common = %{version}
113 %description authldap
114 This package provides LDAP authentication for Courier IMAP.
116 %description authldap -l pl
117 Ten pakiet pozwala na korzystanie z autentykacji LDAP w Courier IMAP.
120 Summary: MySQL authentication daemon for Courier IMAP
121 Summary(pl): Demon autentykacji MySQL do Courier IMAP
122 Group: Networking/Daemons
123 Group(de): Netzwerkwesen/Server
124 Group(pl): Sieciowe/Serwery
125 Prereq: %{name}-common = %{version}
127 %description authmysql
128 This package provides MySQL authentication for Courier IMAP.
130 %description authmysql -l pl
131 Ten pakiet pozwala na korzystanie z autentykacji MySQL w Courier IMAP.
138 --with-authdaemonvar=/var/lib/authdaemon \
139 %{!?_without_mysql:--with-mysql-libs=%{_libdir} --with-mysql-includes=%{_includedir}/mysql} \
140 %{?_without_ldap:--without-authldap}
145 rm -rf $RPM_BUILD_ROOT
146 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig} \
147 $RPM_BUILD_ROOT{%{_sysconfdir},/var/lib/authdaemon}
149 %{__make} install DESTDIR=$RPM_BUILD_ROOT
151 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap
152 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap-pop3
153 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/authdaemon
155 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/imap
156 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/pop3
158 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap
159 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap-pop3
160 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/authdaemon
162 rm -rf $RPM_BUILD_ROOT%{_mandir}/man8/{authcram,authpam,authpwd,authshadow,authuserdb,authvchkpw,pw2userdb,vchkpw2userdb,authdaemon,authdaemond,authldap,authmysql}.8 \
163 $RPM_BUILD_ROOT%{_sbindir}/{*db,mk*cert}
165 mv -f imap/README README.imap
166 mv -f maildir/README.maildirquota.txt README.maildirquota
168 install authlib/authdaemonrc $RPM_BUILD_ROOT%{_sysconfdir}
169 install authlib/authldaprc $RPM_BUILD_ROOT%{_sysconfdir}
170 install authlib/authmysqlrc $RPM_BUILD_ROOT%{_sysconfdir}
172 mv -f $RPM_BUILD_ROOT%{_datadir}/*db \
173 $RPM_BUILD_ROOT%{_sbindir}
174 mv -f $RPM_BUILD_ROOT%{_datadir}/mk*cert \
175 $RPM_BUILD_ROOT%{_sbindir}
177 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authcram.8
178 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpam.8
179 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpwd.8
180 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authshadow.8
181 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authuserdb.8
182 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authvchkpw.8
183 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemon.8
184 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemond.8
185 %{!?_without_mysql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authmysql.8}
186 %{!?_without_ldap:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authldap.8}
187 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8
188 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8
190 gzip -9nf README* imap/BUGS AUTHORS COPYING
192 touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap}
195 rm -rf $RPM_BUILD_ROOT
198 /sbin/chkconfig --add courier-imap
200 if [ -f /var/lock/subsys/courier-imap ]; then
201 /etc/rc.d/init.d/courier-imap restart >&2
203 echo "Run \"/etc/rc.d/init.d/courier-imap start\" to start courier-imap daemon."
207 if [ "$1" = "0" ]; then
208 if [ -f /var/lock/subsys/courier-imap ]; then
209 /etc/rc.d/init.d/courier-imap stop >&2
211 /sbin/chkconfig --del courier-imap
215 /sbin/chkconfig --add authdaemon
217 if [ -f /var/lock/subsys/authdaemon ]; then
218 /etc/rc.d/init.d/authdaemon restart >&2
220 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
224 if [ "$1" = "0" ]; then
225 if [ -f /var/lock/subsys/authdaemon ]; then
226 /etc/rc.d/init.d/authdaemon stop >&2
229 /sbin/chkconfig --del authdaemon
233 /sbin/chkconfig --add courier-imap-pop3
235 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
236 /etc/rc.d/init.d/courier-imap-pop3 restart >&2
238 echo "Run \"/etc/rc.d/init.d/courier-imap-pop3 start\" to start courier-imap pop3 daemon."
242 if [ "$1" = "0" ]; then
243 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
244 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
246 /sbin/chkconfig --del courier-imap-pop3
251 . /etc/sysconfig/authdaemon
252 if [ "$METHOD" = "ldap" ]; then
253 if [ -f /var/lock/subsys/authdaemon ]; then
254 /etc/rc.d/init.d/authdaemon stop >&2
256 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
262 . /etc/sysconfig/authdaemon
263 if [ "$1" = "$0" -a "$METHOD" = "ldap" ]; then
264 if [ -f /var/lock/subsys/authdaemon ]; then
265 /etc/rc.d/init.d/authdaemon stop >&2
271 . /etc/sysconfig/authdaemon
272 if [ "$METHOD" = "mysql" ]; then
273 if [ -f /var/lock/subsys/authdaemon ]; then
274 /etc/rc.d/init.d/authdaemon stop >&2
276 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
282 . /etc/sysconfig/authdaemon
283 if [ "$1" = "$0" -a "$METHOD" = "mysql" ]; then
284 if [ -f /var/lock/subsys/authdaemon ]; then
285 /etc/rc.d/init.d/authdaemon stop >&2
290 %defattr(644,root,root,755)
291 %attr(640,root,root) %config %verify(not size mtime md5) /etc/pam.d/imap
292 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.imap
293 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap
294 %attr(754,root,root) /etc/rc.d/init.d/courier-imap
295 %{_sysconfdir}/imapd.cnf
296 %attr(755,root,root) %{_bindir}/imapd
297 %attr(755,root,root) %{_sbindir}/imaplogin
298 %attr(755,root,root) %{_sbindir}/mkimapdcert
299 %{_mandir}/man8/imapd*
302 %defattr(644,root,root,755)
304 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/authdaemon
305 %attr(754,root,root) /etc/rc.d/init.d/authdaemon
306 %attr(700,root,root) /var/lib/authdaemon
307 %attr(750,root,root) %dir %{_sysconfdir}
309 %dir %{_libexecdir}/authlib
310 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authdaemonrc
311 %{_sysconfdir}/quotawarnmsg.example
312 %attr(755,root,root) %{_bindir}/couriertls
313 %attr(755,root,root) %{_libexecdir}/authlib/authdaemon
314 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.plain
315 %attr(755,root,root) %{_libexecdir}/couriertcpd
316 %attr(755,root,root) %{_libexecdir}/logger
317 %attr(755,root,root) %{_libexecdir}/makedatprog
318 %{_mandir}/man8/auth[cdpsuv]*
319 %{_mandir}/man8/authlib*
320 %{_mandir}/man8/couriertcpd*
324 %defattr(644,root,root,755)
325 %attr(755,root,root) %{_sbindir}/makeuserdb
326 %attr(755,root,root) %{_sbindir}/pw2userdb
327 %attr(755,root,root) %{_sbindir}/userdb
328 %attr(755,root,root) %{_sbindir}/userdbpw
329 %attr(755,root,root) %{_sbindir}/vchkpw2userdb
330 %{_mandir}/man8/makeuserdb*
331 %{_mandir}/man8/userdb*
332 %{_mandir}/man8/*pw2userdb*
335 %defattr(644,root,root,755)
336 %attr(755,root,root) %{_libexecdir}/deliverquota
337 %{_mandir}/man8/deliverquota*
340 %defattr(644,root,root,755)
341 %attr(755,root,root) %{_bindir}/maildirmake
342 %{_mandir}/man1/maildirmake*
345 %defattr(644,root,root,755)
346 %attr(640,root,root) %config %verify(not size mtime md5) /etc/pam.d/pop3
347 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.pop3
348 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap-pop3
349 %attr(754,root,root) /etc/rc.d/init.d/courier-imap-pop3
350 %attr(755,root,root) %{_bindir}/pop3d
351 %attr(755,root,root) %{_sbindir}/mkpop3dcert
352 %attr(755,root,root) %{_sbindir}/pop3login
353 %{_sysconfdir}/pop3d.cnf
355 %if %{?_without_ldap:0}%{!?_without_ldap:1}
357 %defattr(644,root,root,755)
358 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authldaprc
359 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.ldap
360 %{_mandir}/man8/authldap*
363 %if %{?_without_mysql:0}%{!?_without_mysql:1}
365 %defattr(644,root,root,755)
366 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authmysqlrc
367 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.mysql
368 %{_mandir}/man8/authmysql*