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 Patch0: %{name}-authmysql.patch
24 URL: http://www.inter7.com/courierimap/
25 %{!?_without_mysql:BuildRequires: mysql-devel}
26 %{!?_without_ldap:BuildRequires: openldap-devel}
27 BuildRequires: gdbm-devel
28 BuildRequires: libstdc++-devel
29 BuildRequires: openssl-devel
31 Prereq: %{name}-common = %{version}
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 %define _libexecdir /usr/lib/courier-imap
36 %define _sysconfdir /etc/courier-imap
39 Courier-IMAP is an IMAP server for Maildir mailboxes.
42 Courier-IMAP jest serwerem IMAP dla skrzynek pocztowych Maildir.
45 Summary: Common files for imap and pop daemons
46 Summary(pl): Pliki wspólne dla serwerów imap i pop
47 Group: Networking/Daemons
48 Group(de): Netzwerkwesen/Server
49 Group(pl): Sieciowe/Serwery
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 Group: Networking/Daemons
65 Group(de): Netzwerkwesen/Server
66 Group(pl): Sieciowe/Serwery
69 Commands used to create the /etc/userdb.dat
72 Summary: Deliver to a maildir with a quota
73 Group: Networking/Daemons
74 Group(de): Netzwerkwesen/Server
75 Group(pl): Sieciowe/Serwery
77 %description deliverquota
78 deliverquota is a temporary hack to implement E-mail delivery to a
79 maildir with a software-imposed quota.
82 Summary: Tool for making mail folders in Maildir format.
83 Group: Networking/Daemons
84 Group(de): Netzwerkwesen/Server
85 Group(pl): Sieciowe/Serwery
86 Conflicts: qmail-maildirmake
88 %description maildirmake
89 Maildirmake is a tool for making mail folders in Maildir format.
92 Summary: Courier-IMAP POP3 Server
93 Summary(pl): Serwer Courier-IMAP POP3
94 Group: Networking/Daemons
95 Group(de): Netzwerkwesen/Server
96 Group(pl): Sieciowe/Serwery
97 Prereq: %{name}-common = %{version}
102 Courier-IMAP POP3 is an POP3 server for Maildir mailboxes.
104 %description pop3 -l pl
105 Courier-IMAP POP3 jest serwerem POP3 dla skrzynek pocztowych Maildir.
108 Summary: LDAP authentication daemon for Courier IMAP
109 Summary(pl): Demon autentykacji LDAP do Courier IMAP
110 Group: Networking/Daemons
111 Group(de): Netzwerkwesen/Server
112 Group(pl): Sieciowe/Serwery
113 Prereq: %{name}-common = %{version}
115 %description authldap
116 This package provides LDAP authentication for Courier IMAP.
118 %description authldap -l pl
119 Ten pakiet pozwala na korzystanie z autentykacji LDAP w Courier IMAP.
122 Summary: MySQL authentication daemon for Courier IMAP
123 Summary(pl): Demon autentykacji MySQL do Courier IMAP
124 Group: Networking/Daemons
125 Group(de): Netzwerkwesen/Server
126 Group(pl): Sieciowe/Serwery
127 Prereq: %{name}-common = %{version}
129 %description authmysql
130 This package provides MySQL authentication for Courier IMAP.
132 %description authmysql -l pl
133 Ten pakiet pozwala na korzystanie z autentykacji MySQL w Courier IMAP.
142 --with-authchangepwdir=/var/tmp \
143 --with-authdaemonvar=/var/lib/authdaemon \
144 %{!?_without_mysql:--with-mysql-libs=%{_libdir} --with-mysql-includes=%{_includedir}/mysql} \
145 %{?_without_ldap:--without-authldap}
150 rm -rf $RPM_BUILD_ROOT
151 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig} \
152 $RPM_BUILD_ROOT{%{_sysconfdir},/var/lib/authdaemon}
154 %{__make} install DESTDIR=$RPM_BUILD_ROOT
156 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap
157 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap-pop3
158 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/authdaemon
160 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/imap
161 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/pop3
163 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap
164 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap-pop3
165 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/authdaemon
167 rm -rf $RPM_BUILD_ROOT%{_mandir}/man8/{authcram,authpam,authpwd,authshadow,authuserdb,authvchkpw,pw2userdb,vchkpw2userdb,authdaemon,authdaemond,authldap,authmysql}.8 \
168 $RPM_BUILD_ROOT%{_sbindir}/{*db,mk*cert}
170 mv -f imap/README README.imap
171 mv -f maildir/README.maildirquota.txt README.maildirquota
173 install authlib/authdaemonrc $RPM_BUILD_ROOT%{_sysconfdir}
174 install authlib/authldaprc $RPM_BUILD_ROOT%{_sysconfdir}
175 install authlib/authmysqlrc $RPM_BUILD_ROOT%{_sysconfdir}
177 mv -f $RPM_BUILD_ROOT%{_datadir}/*db \
178 $RPM_BUILD_ROOT%{_sbindir}
179 mv -f $RPM_BUILD_ROOT%{_datadir}/mk*cert \
180 $RPM_BUILD_ROOT%{_sbindir}
182 imap/html2man.pl tcpd/couriertls.html > $RPM_BUILD_ROOT%{_mandir}/man8/couriertls.8
184 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authcram.8
185 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpam.8
186 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpwd.8
187 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authshadow.8
188 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authuserdb.8
189 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authvchkpw.8
190 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemon.8
191 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemond.8
192 %{!?_without_mysql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authmysql.8}
193 %{!?_without_ldap:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authldap.8}
194 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8
195 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8
197 gzip -9nf README* imap/BUGS AUTHORS COPYING
199 touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap}
202 rm -rf $RPM_BUILD_ROOT
205 /sbin/chkconfig --add courier-imap
207 if [ -f /var/lock/subsys/courier-imap ]; then
208 /etc/rc.d/init.d/courier-imap restart >&2
210 echo "Run \"/etc/rc.d/init.d/courier-imap start\" to start courier-imap daemon."
214 if [ "$1" = "0" ]; then
215 if [ -f /var/lock/subsys/courier-imap ]; then
216 /etc/rc.d/init.d/courier-imap stop >&2
218 /sbin/chkconfig --del courier-imap
222 /sbin/chkconfig --add authdaemon
224 if [ -f /var/lock/subsys/authdaemon ]; then
225 /etc/rc.d/init.d/authdaemon restart >&2
227 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
231 if [ "$1" = "0" ]; then
232 if [ -f /var/lock/subsys/authdaemon ]; then
233 /etc/rc.d/init.d/authdaemon stop >&2
236 /sbin/chkconfig --del authdaemon
240 /sbin/chkconfig --add courier-imap-pop3
242 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
243 /etc/rc.d/init.d/courier-imap-pop3 restart >&2
245 echo "Run \"/etc/rc.d/init.d/courier-imap-pop3 start\" to start courier-imap pop3 daemon."
249 if [ "$1" = "0" ]; then
250 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
251 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
253 /sbin/chkconfig --del courier-imap-pop3
258 . /etc/sysconfig/authdaemon
259 if [ "$METHOD" = "ldap" ]; then
260 if [ -f /var/lock/subsys/authdaemon ]; then
261 /etc/rc.d/init.d/authdaemon stop >&2
263 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
269 . /etc/sysconfig/authdaemon
270 if [ "$1" = "$0" -a "$METHOD" = "ldap" ]; then
271 if [ -f /var/lock/subsys/authdaemon ]; then
272 /etc/rc.d/init.d/authdaemon stop >&2
278 . /etc/sysconfig/authdaemon
279 if [ "$METHOD" = "mysql" ]; then
280 if [ -f /var/lock/subsys/authdaemon ]; then
281 /etc/rc.d/init.d/authdaemon stop >&2
283 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
289 . /etc/sysconfig/authdaemon
290 if [ "$1" = "$0" -a "$METHOD" = "mysql" ]; then
291 if [ -f /var/lock/subsys/authdaemon ]; then
292 /etc/rc.d/init.d/authdaemon stop >&2
297 %defattr(644,root,root,755)
298 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/imap
299 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.imap
300 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap
301 %attr(754,root,root) /etc/rc.d/init.d/courier-imap
302 %{_sysconfdir}/imapd.cnf
303 %attr(755,root,root) %{_bindir}/imapd
304 %attr(755,root,root) %{_sbindir}/imaplogin
305 %attr(755,root,root) %{_sbindir}/mkimapdcert
306 %{_mandir}/man8/imapd*
309 %defattr(644,root,root,755)
311 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/authdaemon
312 %attr(754,root,root) /etc/rc.d/init.d/authdaemon
313 %attr(700,root,root) /var/lib/authdaemon
314 %attr(750,root,root) %dir %{_sysconfdir}
316 %dir %{_libexecdir}/authlib
317 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authdaemonrc
318 %{_sysconfdir}/quotawarnmsg.example
319 %attr(755,root,root) %{_bindir}/couriertls
320 %attr(755,root,root) %{_libexecdir}/authlib/authdaemon
321 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.plain
322 %attr(755,root,root) %{_libexecdir}/couriertcpd
323 %attr(755,root,root) %{_libexecdir}/logger
324 %attr(755,root,root) %{_libexecdir}/makedatprog
325 %{_mandir}/man8/auth[cdpsuv]*
326 %{_mandir}/man8/authlib*
327 %{_mandir}/man8/couriert*
331 %defattr(644,root,root,755)
332 %attr(755,root,root) %{_sbindir}/makeuserdb
333 %attr(755,root,root) %{_sbindir}/pw2userdb
334 %attr(755,root,root) %{_sbindir}/userdb
335 %attr(755,root,root) %{_sbindir}/userdbpw
336 %attr(755,root,root) %{_sbindir}/vchkpw2userdb
337 %{_mandir}/man8/makeuserdb*
338 %{_mandir}/man8/userdb*
339 %{_mandir}/man8/*pw2userdb*
342 %defattr(644,root,root,755)
343 %attr(755,root,root) %{_libexecdir}/deliverquota
344 %{_mandir}/man8/deliverquota*
347 %defattr(644,root,root,755)
348 %attr(755,root,root) %{_bindir}/maildirmake
349 %{_mandir}/man1/maildirmake*
352 %defattr(644,root,root,755)
353 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/pop3
354 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.pop3
355 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap-pop3
356 %attr(754,root,root) /etc/rc.d/init.d/courier-imap-pop3
357 %attr(755,root,root) %{_bindir}/pop3d
358 %attr(755,root,root) %{_sbindir}/mkpop3dcert
359 %attr(755,root,root) %{_sbindir}/pop3login
360 %{_sysconfdir}/pop3d.cnf
362 %if %{?_without_ldap:0}%{!?_without_ldap:1}
364 %defattr(644,root,root,755)
365 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authldaprc
366 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.ldap
367 %{_mandir}/man8/authldap*
370 %if %{?_without_mysql:0}%{!?_without_mysql:1}
372 %defattr(644,root,root,755)
373 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authmysqlrc
374 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.mysql
375 %{_mandir}/man8/authmysql*