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
28 BuildRequires: openssl-devel
30 Prereq: %{name}-common = %{version}
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 %define _libexecdir /usr/lib/courier-imap
35 %define _sysconfdir /etc/courier-imap
38 Courier-IMAP is an IMAP server for Maildir mailboxes.
41 Courier-IMAP jest serwerem IMAP dla skrzynek pocztowych Maildir.
44 Summary: Common files for imap and pop daemons
45 Summary(pl): Pliki wspólne dla serwerów imap i pop
46 Group: Networking/Daemons
47 Group(de): Netzwerkwesen/Server
48 Group(pl): Sieciowe/Serwery
50 Prereq: /sbin/chkconfig
51 Requires: %{name}-maildirmake
52 Requires: %{name}-deliverquota
53 Requires: %{name}-userdb
56 Common files for imap and pop daemons.
58 %description common -l pl
59 Pliki wspólne dla serwerów imap i pop.
62 Summary: Commands used to create the /etc/userdb.dat
63 Group: Networking/Daemons
64 Group(de): Netzwerkwesen/Server
65 Group(pl): Sieciowe/Serwery
68 Commands used to create the /etc/userdb.dat
71 Summary: Deliver to a maildir with a quota
72 Group: Networking/Daemons
73 Group(de): Netzwerkwesen/Server
74 Group(pl): Sieciowe/Serwery
76 %description deliverquota
77 deliverquota is a temporary hack to implement E-mail delivery to a
78 maildir with a software-imposed quota.
81 Summary: Tool for making mail folders in Maildir format.
82 Group: Networking/Daemons
83 Group(de): Netzwerkwesen/Server
84 Group(pl): Sieciowe/Serwery
85 Conflicts: qmail-maildirmake
87 %description maildirmake
88 Maildirmake is a tool for making mail folders in Maildir format.
91 Summary: Courier-IMAP POP3 Server
92 Summary(pl): Serwer Courier-IMAP POP3
93 Group: Networking/Daemons
94 Group(de): Netzwerkwesen/Server
95 Group(pl): Sieciowe/Serwery
96 Prereq: %{name}-common = %{version}
101 Courier-IMAP POP3 is an POP3 server for Maildir mailboxes.
103 %description pop3 -l pl
104 Courier-IMAP POP3 jest serwerem POP3 dla skrzynek pocztowych Maildir.
107 Summary: LDAP authentication daemon for Courier IMAP
108 Summary(pl): Demon autentykacji LDAP do Courier IMAP
109 Group: Networking/Daemons
110 Group(de): Netzwerkwesen/Server
111 Group(pl): Sieciowe/Serwery
112 Prereq: %{name}-common = %{version}
114 %description authldap
115 This package provides LDAP authentication for Courier IMAP.
117 %description authldap -l pl
118 Ten pakiet pozwala na korzystanie z autentykacji LDAP w Courier IMAP.
121 Summary: MySQL authentication daemon for Courier IMAP
122 Summary(pl): Demon autentykacji MySQL do Courier IMAP
123 Group: Networking/Daemons
124 Group(de): Netzwerkwesen/Server
125 Group(pl): Sieciowe/Serwery
126 Prereq: %{name}-common = %{version}
128 %description authmysql
129 This package provides MySQL authentication for Courier IMAP.
131 %description authmysql -l pl
132 Ten pakiet pozwala na korzystanie z autentykacji MySQL w Courier IMAP.
140 --with-authchangepwdir=/var/tmp \
141 --with-authdaemonvar=/var/lib/authdaemon \
142 %{!?_without_mysql:--with-mysql-libs=%{_libdir} --with-mysql-includes=%{_includedir}/mysql} \
143 %{?_without_ldap:--without-authldap}
148 rm -rf $RPM_BUILD_ROOT
149 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig} \
150 $RPM_BUILD_ROOT{%{_sysconfdir},/var/lib/authdaemon}
152 %{__make} install DESTDIR=$RPM_BUILD_ROOT
154 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap
155 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap-pop3
156 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/authdaemon
158 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/imap
159 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/pop3
161 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap
162 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap-pop3
163 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/authdaemon
165 rm -rf $RPM_BUILD_ROOT%{_mandir}/man8/{authcram,authpam,authpwd,authshadow,authuserdb,authvchkpw,pw2userdb,vchkpw2userdb,authdaemon,authdaemond,authldap,authmysql}.8 \
166 $RPM_BUILD_ROOT%{_sbindir}/{*db,mk*cert}
168 mv -f imap/README README.imap
169 mv -f maildir/README.maildirquota.txt README.maildirquota
171 install authlib/authdaemonrc $RPM_BUILD_ROOT%{_sysconfdir}
172 install authlib/authldaprc $RPM_BUILD_ROOT%{_sysconfdir}
173 install authlib/authmysqlrc $RPM_BUILD_ROOT%{_sysconfdir}
175 mv -f $RPM_BUILD_ROOT%{_datadir}/*db \
176 $RPM_BUILD_ROOT%{_sbindir}
177 mv -f $RPM_BUILD_ROOT%{_datadir}/mk*cert \
178 $RPM_BUILD_ROOT%{_sbindir}
180 imap/html2man.pl tcpd/couriertls.html > $RPM_BUILD_ROOT%{_mandir}/man8/couriertls.8
182 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authcram.8
183 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpam.8
184 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpwd.8
185 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authshadow.8
186 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authuserdb.8
187 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authvchkpw.8
188 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemon.8
189 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemond.8
190 %{!?_without_mysql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authmysql.8}
191 %{!?_without_ldap:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authldap.8}
192 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8
193 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8
195 gzip -9nf README* imap/BUGS AUTHORS COPYING
197 touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap}
200 rm -rf $RPM_BUILD_ROOT
203 /sbin/chkconfig --add courier-imap
205 if [ -f /var/lock/subsys/courier-imap ]; then
206 /etc/rc.d/init.d/courier-imap restart >&2
208 echo "Run \"/etc/rc.d/init.d/courier-imap start\" to start courier-imap daemon."
212 if [ "$1" = "0" ]; then
213 if [ -f /var/lock/subsys/courier-imap ]; then
214 /etc/rc.d/init.d/courier-imap stop >&2
216 /sbin/chkconfig --del courier-imap
220 /sbin/chkconfig --add authdaemon
222 if [ -f /var/lock/subsys/authdaemon ]; then
223 /etc/rc.d/init.d/authdaemon restart >&2
225 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
229 if [ "$1" = "0" ]; then
230 if [ -f /var/lock/subsys/authdaemon ]; then
231 /etc/rc.d/init.d/authdaemon stop >&2
234 /sbin/chkconfig --del authdaemon
238 /sbin/chkconfig --add courier-imap-pop3
240 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
241 /etc/rc.d/init.d/courier-imap-pop3 restart >&2
243 echo "Run \"/etc/rc.d/init.d/courier-imap-pop3 start\" to start courier-imap pop3 daemon."
247 if [ "$1" = "0" ]; then
248 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
249 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
251 /sbin/chkconfig --del courier-imap-pop3
256 . /etc/sysconfig/authdaemon
257 if [ "$METHOD" = "ldap" ]; then
258 if [ -f /var/lock/subsys/authdaemon ]; then
259 /etc/rc.d/init.d/authdaemon stop >&2
261 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
267 . /etc/sysconfig/authdaemon
268 if [ "$1" = "$0" -a "$METHOD" = "ldap" ]; then
269 if [ -f /var/lock/subsys/authdaemon ]; then
270 /etc/rc.d/init.d/authdaemon stop >&2
276 . /etc/sysconfig/authdaemon
277 if [ "$METHOD" = "mysql" ]; then
278 if [ -f /var/lock/subsys/authdaemon ]; then
279 /etc/rc.d/init.d/authdaemon stop >&2
281 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
287 . /etc/sysconfig/authdaemon
288 if [ "$1" = "$0" -a "$METHOD" = "mysql" ]; then
289 if [ -f /var/lock/subsys/authdaemon ]; then
290 /etc/rc.d/init.d/authdaemon stop >&2
295 %defattr(644,root,root,755)
296 %attr(640,root,root) %config %verify(not size mtime md5) /etc/pam.d/imap
297 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.imap
298 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap
299 %attr(754,root,root) /etc/rc.d/init.d/courier-imap
300 %{_sysconfdir}/imapd.cnf
301 %attr(755,root,root) %{_bindir}/imapd
302 %attr(755,root,root) %{_sbindir}/imaplogin
303 %attr(755,root,root) %{_sbindir}/mkimapdcert
304 %{_mandir}/man8/imapd*
307 %defattr(644,root,root,755)
309 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/authdaemon
310 %attr(754,root,root) /etc/rc.d/init.d/authdaemon
311 %attr(700,root,root) /var/lib/authdaemon
312 %attr(750,root,root) %dir %{_sysconfdir}
314 %dir %{_libexecdir}/authlib
315 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authdaemonrc
316 %{_sysconfdir}/quotawarnmsg.example
317 %attr(755,root,root) %{_bindir}/couriertls
318 %attr(755,root,root) %{_libexecdir}/authlib/authdaemon
319 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.plain
320 %attr(755,root,root) %{_libexecdir}/couriertcpd
321 %attr(755,root,root) %{_libexecdir}/logger
322 %attr(755,root,root) %{_libexecdir}/makedatprog
323 %{_mandir}/man8/auth[cdpsuv]*
324 %{_mandir}/man8/authlib*
325 %{_mandir}/man8/couriert*
329 %defattr(644,root,root,755)
330 %attr(755,root,root) %{_sbindir}/makeuserdb
331 %attr(755,root,root) %{_sbindir}/pw2userdb
332 %attr(755,root,root) %{_sbindir}/userdb
333 %attr(755,root,root) %{_sbindir}/userdbpw
334 %attr(755,root,root) %{_sbindir}/vchkpw2userdb
335 %{_mandir}/man8/makeuserdb*
336 %{_mandir}/man8/userdb*
337 %{_mandir}/man8/*pw2userdb*
340 %defattr(644,root,root,755)
341 %attr(755,root,root) %{_libexecdir}/deliverquota
342 %{_mandir}/man8/deliverquota*
345 %defattr(644,root,root,755)
346 %attr(755,root,root) %{_bindir}/maildirmake
347 %{_mandir}/man1/maildirmake*
350 %defattr(644,root,root,755)
351 %attr(640,root,root) %config %verify(not size mtime md5) /etc/pam.d/pop3
352 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.pop3
353 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap-pop3
354 %attr(754,root,root) /etc/rc.d/init.d/courier-imap-pop3
355 %attr(755,root,root) %{_bindir}/pop3d
356 %attr(755,root,root) %{_sbindir}/mkpop3dcert
357 %attr(755,root,root) %{_sbindir}/pop3login
358 %{_sysconfdir}/pop3d.cnf
360 %if %{?_without_ldap:0}%{!?_without_ldap:1}
362 %defattr(644,root,root,755)
363 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authldaprc
364 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.ldap
365 %{_mandir}/man8/authldap*
368 %if %{?_without_mysql:0}%{!?_without_mysql:1}
370 %defattr(644,root,root,755)
371 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authmysqlrc
372 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.mysql
373 %{_mandir}/man8/authmysql*