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 Source0: http://download.sourceforge.net/courier/%{name}-%{version}.tar.gz
15 Source2: %{name}-pop3.init
16 Source3: %{name}-authdaemon.init
18 Source5: %{name}-pop3.pamd
19 Source6: %{name}.sysconfig
20 Source7: %{name}-pop3.sysconfig
21 Source8: %{name}-authdaemon.sysconfig
22 Patch0: ftp://ftp.pld.org.pl/people/siefca/patches/courier/%{name}-myownquery-fix.patch
23 URL: http://www.inter7.com/courierimap/
24 %{!?_without_postgresql:BuildRequires: postgresql-devel}
25 %{!?_without_mysql:BuildRequires: mysql-devel}
26 %{!?_without_mysql:BuildRequires: zlib-devel}
27 %{!?_without_ldap:BuildRequires: openldap-devel}
28 BuildRequires: gdbm-devel
29 BuildRequires: libstdc++-devel
30 BuildRequires: openssl-devel
31 BuildRequires: kernel-headers
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
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
67 Commands used to create the /etc/userdb.dat.
69 %description userdb -l pl
70 Polecenia u¿ywane do stworzenia /etc/userdb.dat.
73 Summary: Deliver to a maildir with a quota
74 Group: Networking/Daemons
76 %description deliverquota
77 deliverquota is a temporary hack to implement E-mail delivery to a
78 maildir with a software-imposed quota.
80 %description deliverquota -l pl
81 deliverquota jest tymczasowym rozwi±zaniem implementuj±cym
82 dostarczanie e-maili do maildir z programowo narzucon± quot±.
85 Summary: Tool for making mail folders in Maildir format.
86 Group: Networking/Daemons
87 Conflicts: qmail-maildirmake
89 %description maildirmake
90 Maildirmake is a tool for making mail folders in Maildir format.
92 %description maildirmake -l pl
93 Maildirmake jest narzêdziem do tworzenia folderów pocztowych w
97 Summary: Courier-IMAP POP3 Server
98 Summary(pl): Serwer Courier-IMAP POP3
99 Group: Networking/Daemons
100 PreReq: %{name}-common = %{version}
102 Obsoletes: pop3daemon
105 Courier-IMAP POP3 is an POP3 server for Maildir mailboxes.
107 %description pop3 -l pl
108 Courier-IMAP POP3 jest serwerem POP3 dla skrzynek pocztowych Maildir.
111 Summary: LDAP authentication daemon for Courier IMAP
112 Summary(pl): Demon autentykacji LDAP do Courier IMAP
113 Group: Networking/Daemons
114 PreReq: %{name}-common = %{version}
116 %description authldap
117 This package provides LDAP authentication for Courier IMAP.
119 %description authldap -l pl
120 Ten pakiet pozwala na korzystanie z autentykacji LDAP w Courier IMAP.
123 Summary: MySQL authentication daemon for Courier IMAP
124 Summary(pl): Demon autentykacji MySQL do Courier IMAP
125 Group: Networking/Daemons
126 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.
136 Summary: PostgreSQL authentication daemon for Courier IMAP
137 Summary(pl): Demon autentykacji PostgreSQL do Courier IMAP
138 Group: Networking/Daemons
139 PreReq: %{name}-common = %{version}
141 %description authpgsql
142 This package provides PostgreSQL authentication for Courier IMAP.
144 %description authpgsql -l pl
145 Ten pakiet pozwala na korzystanie z autentykacji PostgreSQL w Courier
155 --with-authchangepwdir=/var/tmp \
156 --with-authdaemonvar=/var/lib/authdaemon \
157 %{!?_without_mysql:--with-mysql-libs=%{_libdir} --with-mysql-includes=%{_includedir}/mysql} \
158 %{?_without_mysql:--without-authmysql} \
159 %{!?_without_postgresql:--with-pgsql-libs=%{_libdir} --with-pgsql-includes=%{_includedir}/postgresql} \
160 %{?_without_postgresql:--without-authpgsql} \
161 %{?_without_ldap:--without-authldap}
166 rm -rf $RPM_BUILD_ROOT
167 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig} \
168 $RPM_BUILD_ROOT{%{_sysconfdir},/var/lib/authdaemon}
170 %{__make} install DESTDIR=$RPM_BUILD_ROOT
172 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap
173 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap-pop3
174 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/authdaemon
176 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/imap
177 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/pop3
179 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap
180 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap-pop3
181 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/authdaemon
183 rm -rf $RPM_BUILD_ROOT%{_mandir}/man8/{authcram,authpam,authpwd,authshadow,authuserdb,authvchkpw,pw2userdb,vchkpw2userdb,authdaemon,authdaemond,authldap,authmysql}.8 \
184 $RPM_BUILD_ROOT%{_sbindir}/{*db,mk*cert}
186 mv -f authlib/README.authmysql.html README.authmysql.html
187 mv -f authlib/README.ldap README.ldap
188 mv -f authlib/README.authmysql.myownquery README.authmysql.myownquery
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 mv -f tcpd/couriertls.1 $RPM_BUILD_ROOT%{_mandir}/man8/couriertls.1
203 mv -f imap/courierpop3d.8 $RPM_BUILD_ROOT%{_mandir}/man8/courierpop3d.8
205 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authcram.8
206 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpam.8
207 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpwd.8
208 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authshadow.8
209 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authuserdb.8
210 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authvchkpw.8
211 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemon.8
212 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemond.8
213 %{!?_without_pgsql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpgsql.8}
214 %{!?_without_mysql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authmysql.8}
215 %{!?_without_ldap:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authldap.8}
216 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8
217 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8
219 gzip -9nf README* imap/BUGS AUTHORS COPYING
221 touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap}
224 rm -rf $RPM_BUILD_ROOT
227 /sbin/chkconfig --add courier-imap
229 if [ -f /var/lock/subsys/courier-imap ]; then
230 /etc/rc.d/init.d/courier-imap restart >&2
232 echo "Run \"/etc/rc.d/init.d/courier-imap start\" to start courier-imap daemon."
236 if [ "$1" = "0" ]; then
237 if [ -f /var/lock/subsys/courier-imap ]; then
238 /etc/rc.d/init.d/courier-imap stop >&2
240 /sbin/chkconfig --del courier-imap
244 /sbin/chkconfig --add authdaemon
246 if [ -f /var/lock/subsys/authdaemon ]; then
247 /etc/rc.d/init.d/authdaemon restart >&2
249 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
253 if [ "$1" = "0" ]; then
254 if [ -f /var/lock/subsys/authdaemon ]; then
255 /etc/rc.d/init.d/authdaemon stop >&2
258 /sbin/chkconfig --del authdaemon
262 /sbin/chkconfig --add courier-imap-pop3
264 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
265 /etc/rc.d/init.d/courier-imap-pop3 restart >&2
267 echo "Run \"/etc/rc.d/init.d/courier-imap-pop3 start\" to start courier-imap pop3 daemon."
271 if [ "$1" = "0" ]; then
272 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
273 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
275 /sbin/chkconfig --del courier-imap-pop3
280 . /etc/sysconfig/authdaemon
281 if [ "$METHOD" = "ldap" ]; then
282 if [ -f /var/lock/subsys/authdaemon ]; then
283 /etc/rc.d/init.d/authdaemon restart >&2
285 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
291 . /etc/sysconfig/authdaemon
292 if [ "$1" = "$0" -a "$METHOD" = "ldap" ]; then
293 if [ -f /var/lock/subsys/authdaemon ]; then
294 /etc/rc.d/init.d/authdaemon stop >&2
300 . /etc/sysconfig/authdaemon
301 if [ "$METHOD" = "mysql" ]; then
302 if [ -f /var/lock/subsys/authdaemon ]; then
303 /etc/rc.d/init.d/authdaemon restart >&2
305 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
311 . /etc/sysconfig/authdaemon
312 if [ "$1" = "$0" -a "$METHOD" = "mysql" ]; then
313 if [ -f /var/lock/subsys/authdaemon ]; then
314 /etc/rc.d/init.d/authdaemon stop >&2
319 %defattr(644,root,root,755)
320 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/imap
321 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.imap
322 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap
323 %attr(754,root,root) /etc/rc.d/init.d/courier-imap
324 %{_sysconfdir}/imapd.cnf
325 %attr(755,root,root) %{_bindir}/imapd
326 %attr(755,root,root) %{_sbindir}/imaplogin
327 %attr(755,root,root) %{_sbindir}/mkimapdcert
328 %{_mandir}/man8/imapd*
331 %defattr(644,root,root,755)
333 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/authdaemon
334 %attr(754,root,root) /etc/rc.d/init.d/authdaemon
335 %attr(700,root,root) /var/lib/authdaemon
336 %attr(750,root,root) %dir %{_sysconfdir}
338 %dir %{_libexecdir}/authlib
339 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authdaemonrc
340 %{_sysconfdir}/quotawarnmsg.example
341 %attr(755,root,root) %{_bindir}/couriertls
342 %attr(755,root,root) %{_libexecdir}/authlib/authdaemon
343 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.plain
344 %attr(755,root,root) %{_libexecdir}/couriertcpd
345 %attr(755,root,root) %{_libexecdir}/logger
346 %attr(755,root,root) %{_libexecdir}/makedatprog
347 %{_mandir}/man8/auth[cdpsuv]*
348 %{_mandir}/man7/authlib*
349 %{_mandir}/man1/couriert*
353 %defattr(644,root,root,755)
354 %attr(755,root,root) %{_sbindir}/makeuserdb
355 %attr(755,root,root) %{_sbindir}/pw2userdb
356 %attr(755,root,root) %{_sbindir}/userdb
357 %attr(755,root,root) %{_sbindir}/userdbpw
358 %attr(755,root,root) %{_sbindir}/vchkpw2userdb
359 %{_mandir}/man8/makeuserdb*
360 %{_mandir}/man8/userdb*
361 %{_mandir}/man8/*pw2userdb*
364 %defattr(644,root,root,755)
365 %attr(755,root,root) %{_libexecdir}/deliverquota
366 %{_mandir}/man8/deliverquota*
369 %defattr(644,root,root,755)
370 %attr(755,root,root) %{_bindir}/maildirmake
371 %{_mandir}/man1/maildirmake*
374 %defattr(644,root,root,755)
375 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/pop3
376 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.pop3
377 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap-pop3
378 %attr(754,root,root) /etc/rc.d/init.d/courier-imap-pop3
379 %attr(755,root,root) %{_bindir}/pop3d
380 %attr(755,root,root) %{_sbindir}/mkpop3dcert
381 %attr(755,root,root) %{_sbindir}/pop3login
382 %{_sysconfdir}/pop3d.cnf
383 %{_mandir}/man8/courierpop*
385 %if %{?_without_ldap:0}%{!?_without_ldap:1}
387 %defattr(644,root,root,755)
388 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authldaprc
389 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.ldap
390 %{_mandir}/man8/authldap*
393 %if %{?_without_mysql:0}%{!?_without_mysql:1}
395 %defattr(644,root,root,755)
396 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authmysqlrc
397 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.mysql
398 %{_mandir}/man8/authmysql*
401 %if %{?_without_pgsql:0}%{!?_without_pgsql:1}
403 %defattr(644,root,root,755)
404 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authpgsqlrc
405 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.pgsql
406 %{_mandir}/man8/authpgsql*