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_mysql:--without-authmysql} \
162 %{!?_without_postgresql:--with-mysql-libs=%{_libdir} --with-pgsql-includes=%{_includedir}/postgresql} \
163 %{?_without_postgresql:--without-authpgsql} \
164 %{?_without_ldap:--without-authldap}
169 rm -rf $RPM_BUILD_ROOT
170 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig} \
171 $RPM_BUILD_ROOT{%{_sysconfdir},/var/lib/authdaemon}
173 %{__make} install DESTDIR=$RPM_BUILD_ROOT
175 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap
176 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap-pop3
177 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/authdaemon
179 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/imap
180 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/pop3
182 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap
183 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap-pop3
184 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/authdaemon
186 rm -rf $RPM_BUILD_ROOT%{_mandir}/man8/{authcram,authpam,authpwd,authshadow,authuserdb,authvchkpw,pw2userdb,vchkpw2userdb,authdaemon,authdaemond,authldap,authmysql}.8 \
187 $RPM_BUILD_ROOT%{_sbindir}/{*db,mk*cert}
189 mv -f imap/README README.imap
190 mv -f maildir/README.maildirquota.txt README.maildirquota
192 install authlib/authdaemonrc $RPM_BUILD_ROOT%{_sysconfdir}
193 install authlib/authldaprc $RPM_BUILD_ROOT%{_sysconfdir}
194 install authlib/authmysqlrc $RPM_BUILD_ROOT%{_sysconfdir}
195 install authlib/authpgsqlrc $RPM_BUILD_ROOT%{_sysconfdir}
197 mv -f $RPM_BUILD_ROOT%{_datadir}/*db \
198 $RPM_BUILD_ROOT%{_sbindir}
199 mv -f $RPM_BUILD_ROOT%{_datadir}/mk*cert \
200 $RPM_BUILD_ROOT%{_sbindir}
202 imap/html2man.pl tcpd/couriertls.html > $RPM_BUILD_ROOT%{_mandir}/man8/couriertls.8
204 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authcram.8
205 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpam.8
206 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpwd.8
207 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authshadow.8
208 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authuserdb.8
209 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authvchkpw.8
210 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemon.8
211 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemond.8
212 %{!?_without_pgsql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpgsql.8}
213 %{!?_without_mysql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authmysql.8}
214 %{!?_without_ldap:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authldap.8}
215 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8
216 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8
218 gzip -9nf README* imap/BUGS AUTHORS COPYING
220 touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap}
223 rm -rf $RPM_BUILD_ROOT
226 /sbin/chkconfig --add courier-imap
228 if [ -f /var/lock/subsys/courier-imap ]; then
229 /etc/rc.d/init.d/courier-imap restart >&2
231 echo "Run \"/etc/rc.d/init.d/courier-imap start\" to start courier-imap daemon."
235 if [ "$1" = "0" ]; then
236 if [ -f /var/lock/subsys/courier-imap ]; then
237 /etc/rc.d/init.d/courier-imap stop >&2
239 /sbin/chkconfig --del courier-imap
243 /sbin/chkconfig --add authdaemon
245 if [ -f /var/lock/subsys/authdaemon ]; then
246 /etc/rc.d/init.d/authdaemon restart >&2
248 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
252 if [ "$1" = "0" ]; then
253 if [ -f /var/lock/subsys/authdaemon ]; then
254 /etc/rc.d/init.d/authdaemon stop >&2
257 /sbin/chkconfig --del authdaemon
261 /sbin/chkconfig --add courier-imap-pop3
263 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
264 /etc/rc.d/init.d/courier-imap-pop3 restart >&2
266 echo "Run \"/etc/rc.d/init.d/courier-imap-pop3 start\" to start courier-imap pop3 daemon."
270 if [ "$1" = "0" ]; then
271 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
272 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
274 /sbin/chkconfig --del courier-imap-pop3
279 . /etc/sysconfig/authdaemon
280 if [ "$METHOD" = "ldap" ]; then
281 if [ -f /var/lock/subsys/authdaemon ]; then
282 /etc/rc.d/init.d/authdaemon stop >&2
284 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
290 . /etc/sysconfig/authdaemon
291 if [ "$1" = "$0" -a "$METHOD" = "ldap" ]; then
292 if [ -f /var/lock/subsys/authdaemon ]; then
293 /etc/rc.d/init.d/authdaemon stop >&2
299 . /etc/sysconfig/authdaemon
300 if [ "$METHOD" = "mysql" ]; then
301 if [ -f /var/lock/subsys/authdaemon ]; then
302 /etc/rc.d/init.d/authdaemon stop >&2
304 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
310 . /etc/sysconfig/authdaemon
311 if [ "$1" = "$0" -a "$METHOD" = "mysql" ]; then
312 if [ -f /var/lock/subsys/authdaemon ]; then
313 /etc/rc.d/init.d/authdaemon stop >&2
318 %defattr(644,root,root,755)
319 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/imap
320 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.imap
321 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap
322 %attr(754,root,root) /etc/rc.d/init.d/courier-imap
323 %{_sysconfdir}/imapd.cnf
324 %attr(755,root,root) %{_bindir}/imapd
325 %attr(755,root,root) %{_sbindir}/imaplogin
326 %attr(755,root,root) %{_sbindir}/mkimapdcert
327 %{_mandir}/man8/imapd*
330 %defattr(644,root,root,755)
332 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/authdaemon
333 %attr(754,root,root) /etc/rc.d/init.d/authdaemon
334 %attr(700,root,root) /var/lib/authdaemon
335 %attr(750,root,root) %dir %{_sysconfdir}
337 %dir %{_libexecdir}/authlib
338 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authdaemonrc
339 %{_sysconfdir}/quotawarnmsg.example
340 %attr(755,root,root) %{_bindir}/couriertls
341 %attr(755,root,root) %{_libexecdir}/authlib/authdaemon
342 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.plain
343 %attr(755,root,root) %{_libexecdir}/couriertcpd
344 %attr(755,root,root) %{_libexecdir}/logger
345 %attr(755,root,root) %{_libexecdir}/makedatprog
346 %{_mandir}/man8/auth[cdpsuv]*
347 %{_mandir}/man8/authlib*
348 %{_mandir}/man8/couriert*
352 %defattr(644,root,root,755)
353 %attr(755,root,root) %{_sbindir}/makeuserdb
354 %attr(755,root,root) %{_sbindir}/pw2userdb
355 %attr(755,root,root) %{_sbindir}/userdb
356 %attr(755,root,root) %{_sbindir}/userdbpw
357 %attr(755,root,root) %{_sbindir}/vchkpw2userdb
358 %{_mandir}/man8/makeuserdb*
359 %{_mandir}/man8/userdb*
360 %{_mandir}/man8/*pw2userdb*
363 %defattr(644,root,root,755)
364 %attr(755,root,root) %{_libexecdir}/deliverquota
365 %{_mandir}/man8/deliverquota*
368 %defattr(644,root,root,755)
369 %attr(755,root,root) %{_bindir}/maildirmake
370 %{_mandir}/man1/maildirmake*
373 %defattr(644,root,root,755)
374 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/pop3
375 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.pop3
376 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap-pop3
377 %attr(754,root,root) /etc/rc.d/init.d/courier-imap-pop3
378 %attr(755,root,root) %{_bindir}/pop3d
379 %attr(755,root,root) %{_sbindir}/mkpop3dcert
380 %attr(755,root,root) %{_sbindir}/pop3login
381 %{_sysconfdir}/pop3d.cnf
383 %if %{?_without_ldap:0}%{!?_without_ldap:1}
385 %defattr(644,root,root,755)
386 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authldaprc
387 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.ldap
388 %{_mandir}/man8/authldap*
391 %if %{?_without_mysql:0}%{!?_without_mysql:1}
393 %defattr(644,root,root,755)
394 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authmysqlrc
395 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.mysql
396 %{_mandir}/man8/authmysql*
399 %if %{?_without_pgsql:0}%{!?_without_pgsql:1}
401 %defattr(644,root,root,755)
402 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authpgsqlrc
403 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.pgsql
404 %{_mandir}/man8/authpgsql*