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.
139 --with-authchangepwdir=/var/tmp \
140 --with-authdaemonvar=/var/lib/authdaemon \
141 %{!?_without_mysql:--with-mysql-libs=%{_libdir} --with-mysql-includes=%{_includedir}/mysql} \
142 %{?_without_ldap:--without-authldap}
147 rm -rf $RPM_BUILD_ROOT
148 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig} \
149 $RPM_BUILD_ROOT{%{_sysconfdir},/var/lib/authdaemon}
151 %{__make} install DESTDIR=$RPM_BUILD_ROOT
153 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap
154 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap-pop3
155 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/authdaemon
157 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/imap
158 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/pop3
160 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap
161 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap-pop3
162 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/authdaemon
164 rm -rf $RPM_BUILD_ROOT%{_mandir}/man8/{authcram,authpam,authpwd,authshadow,authuserdb,authvchkpw,pw2userdb,vchkpw2userdb,authdaemon,authdaemond,authldap,authmysql}.8 \
165 $RPM_BUILD_ROOT%{_sbindir}/{*db,mk*cert}
167 mv -f imap/README README.imap
168 mv -f maildir/README.maildirquota.txt README.maildirquota
170 install authlib/authdaemonrc $RPM_BUILD_ROOT%{_sysconfdir}
171 install authlib/authldaprc $RPM_BUILD_ROOT%{_sysconfdir}
172 install authlib/authmysqlrc $RPM_BUILD_ROOT%{_sysconfdir}
174 mv -f $RPM_BUILD_ROOT%{_datadir}/*db \
175 $RPM_BUILD_ROOT%{_sbindir}
176 mv -f $RPM_BUILD_ROOT%{_datadir}/mk*cert \
177 $RPM_BUILD_ROOT%{_sbindir}
179 imap/html2man.pl tcpd/couriertls.html > $RPM_BUILD_ROOT%{_mandir}/man8/couriertls.8
181 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authcram.8
182 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpam.8
183 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpwd.8
184 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authshadow.8
185 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authuserdb.8
186 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authvchkpw.8
187 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemon.8
188 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemond.8
189 %{!?_without_mysql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authmysql.8}
190 %{!?_without_ldap:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authldap.8}
191 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8
192 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8
194 gzip -9nf README* imap/BUGS AUTHORS COPYING
196 touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap}
199 rm -rf $RPM_BUILD_ROOT
202 /sbin/chkconfig --add courier-imap
204 if [ -f /var/lock/subsys/courier-imap ]; then
205 /etc/rc.d/init.d/courier-imap restart >&2
207 echo "Run \"/etc/rc.d/init.d/courier-imap start\" to start courier-imap daemon."
211 if [ "$1" = "0" ]; then
212 if [ -f /var/lock/subsys/courier-imap ]; then
213 /etc/rc.d/init.d/courier-imap stop >&2
215 /sbin/chkconfig --del courier-imap
219 /sbin/chkconfig --add authdaemon
221 if [ -f /var/lock/subsys/authdaemon ]; then
222 /etc/rc.d/init.d/authdaemon restart >&2
224 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
228 if [ "$1" = "0" ]; then
229 if [ -f /var/lock/subsys/authdaemon ]; then
230 /etc/rc.d/init.d/authdaemon stop >&2
233 /sbin/chkconfig --del authdaemon
237 /sbin/chkconfig --add courier-imap-pop3
239 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
240 /etc/rc.d/init.d/courier-imap-pop3 restart >&2
242 echo "Run \"/etc/rc.d/init.d/courier-imap-pop3 start\" to start courier-imap pop3 daemon."
246 if [ "$1" = "0" ]; then
247 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
248 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
250 /sbin/chkconfig --del courier-imap-pop3
255 . /etc/sysconfig/authdaemon
256 if [ "$METHOD" = "ldap" ]; then
257 if [ -f /var/lock/subsys/authdaemon ]; then
258 /etc/rc.d/init.d/authdaemon stop >&2
260 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
266 . /etc/sysconfig/authdaemon
267 if [ "$1" = "$0" -a "$METHOD" = "ldap" ]; then
268 if [ -f /var/lock/subsys/authdaemon ]; then
269 /etc/rc.d/init.d/authdaemon stop >&2
275 . /etc/sysconfig/authdaemon
276 if [ "$METHOD" = "mysql" ]; then
277 if [ -f /var/lock/subsys/authdaemon ]; then
278 /etc/rc.d/init.d/authdaemon stop >&2
280 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
286 . /etc/sysconfig/authdaemon
287 if [ "$1" = "$0" -a "$METHOD" = "mysql" ]; then
288 if [ -f /var/lock/subsys/authdaemon ]; then
289 /etc/rc.d/init.d/authdaemon stop >&2
294 %defattr(644,root,root,755)
295 %attr(640,root,root) %config %verify(not size mtime md5) /etc/pam.d/imap
296 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.imap
297 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap
298 %attr(754,root,root) /etc/rc.d/init.d/courier-imap
299 %{_sysconfdir}/imapd.cnf
300 %attr(755,root,root) %{_bindir}/imapd
301 %attr(755,root,root) %{_sbindir}/imaplogin
302 %attr(755,root,root) %{_sbindir}/mkimapdcert
303 %{_mandir}/man8/imapd*
306 %defattr(644,root,root,755)
308 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/authdaemon
309 %attr(754,root,root) /etc/rc.d/init.d/authdaemon
310 %attr(700,root,root) /var/lib/authdaemon
311 %attr(750,root,root) %dir %{_sysconfdir}
313 %dir %{_libexecdir}/authlib
314 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authdaemonrc
315 %{_sysconfdir}/quotawarnmsg.example
316 %attr(755,root,root) %{_bindir}/couriertls
317 %attr(755,root,root) %{_libexecdir}/authlib/authdaemon
318 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.plain
319 %attr(755,root,root) %{_libexecdir}/couriertcpd
320 %attr(755,root,root) %{_libexecdir}/logger
321 %attr(755,root,root) %{_libexecdir}/makedatprog
322 %{_mandir}/man8/auth[cdpsuv]*
323 %{_mandir}/man8/authlib*
324 %{_mandir}/man8/couriert*
328 %defattr(644,root,root,755)
329 %attr(755,root,root) %{_sbindir}/makeuserdb
330 %attr(755,root,root) %{_sbindir}/pw2userdb
331 %attr(755,root,root) %{_sbindir}/userdb
332 %attr(755,root,root) %{_sbindir}/userdbpw
333 %attr(755,root,root) %{_sbindir}/vchkpw2userdb
334 %{_mandir}/man8/makeuserdb*
335 %{_mandir}/man8/userdb*
336 %{_mandir}/man8/*pw2userdb*
339 %defattr(644,root,root,755)
340 %attr(755,root,root) %{_libexecdir}/deliverquota
341 %{_mandir}/man8/deliverquota*
344 %defattr(644,root,root,755)
345 %attr(755,root,root) %{_bindir}/maildirmake
346 %{_mandir}/man1/maildirmake*
349 %defattr(644,root,root,755)
350 %attr(640,root,root) %config %verify(not size mtime md5) /etc/pam.d/pop3
351 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.pop3
352 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap-pop3
353 %attr(754,root,root) /etc/rc.d/init.d/courier-imap-pop3
354 %attr(755,root,root) %{_bindir}/pop3d
355 %attr(755,root,root) %{_sbindir}/mkpop3dcert
356 %attr(755,root,root) %{_sbindir}/pop3login
357 %{_sysconfdir}/pop3d.cnf
359 %if %{?_without_ldap:0}%{!?_without_ldap:1}
361 %defattr(644,root,root,755)
362 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authldaprc
363 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.ldap
364 %{_mandir}/man8/authldap*
367 %if %{?_without_mysql:0}%{!?_without_mysql:1}
369 %defattr(644,root,root,755)
370 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authmysqlrc
371 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.mysql
372 %{_mandir}/man8/authmysql*