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
52 Common files for imap and pop daemons.
54 %description common -l pl
55 Pliki wspólne dla serwerów imap i pop.
58 Summary: Courier-IMAP POP3 Server
59 Summary(pl): Serwer Courier-IMAP POP3
60 Group: Networking/Daemons
61 Group(de): Netzwerkwesen/Server
62 Group(pl): Sieciowe/Serwery
63 Prereq: %{name}-common = %{version}
68 Courier-IMAP POP3 is an POP3 server for Maildir mailboxes.
70 %description pop3 -l pl
71 Courier-IMAP POP3 jest serwerem POP3 dla skrzynek pocztowych Maildir.
74 Summary: LDAP authentication daemon for Courier IMAP
75 Summary(pl): Demon autentykacji LDAP do Courier IMAP
76 Group: Networking/Daemons
77 Group(de): Netzwerkwesen/Server
78 Group(pl): Sieciowe/Serwery
79 Prereq: %{name}-common = %{version}
82 This package provides LDAP authentication for Courier IMAP.
84 %description authldap -l pl
85 Ten pakiet pozwala na korzystanie z autentykacji LDAP w Courier IMAP.
88 Summary: MySQL authentication daemon for Courier IMAP
89 Summary(pl): Demon autentykacji MySQL do Courier IMAP
90 Group: Networking/Daemons
91 Group(de): Netzwerkwesen/Server
92 Group(pl): Sieciowe/Serwery
93 Prereq: %{name}-common = %{version}
95 %description authmysql
96 This package provides MySQL authentication for Courier IMAP.
98 %description authmysql -l pl
99 Ten pakiet pozwala na korzystanie z autentykacji MySQL w Courier IMAP.
106 --with-authdaemonvar=/var/lib/authdaemon \
107 %{!?_without_mysql:--with-mysql-libs=/usr/lib --with-mysql-includes=/usr/include/mysql} \
108 %{?_without_ldap:--without-authldap}
113 rm -rf $RPM_BUILD_ROOT
114 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig} \
115 $RPM_BUILD_ROOT{%{_sysconfdir},/var/lib/authdaemon}
117 %{__make} install DESTDIR=$RPM_BUILD_ROOT
119 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap
120 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap-pop3
121 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/authdaemon
123 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/imap
124 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/pop3
126 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap
127 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap-pop3
128 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/authdaemon
130 rm -rf $RPM_BUILD_ROOT%{_mandir}/man8/{authcram,authpam,authpwd,authshadow,authuserdb,authvchkpw,pw2userdb,vchkpw2userdb,authdaemon,authdaemond,authldap,authmysql}.8 \
131 $RPM_BUILD_ROOT%{_sbindir}/{*db,mk*cert}
133 mv -f imap/README README.imap
134 mv -f maildir/README.maildirquota.txt README.maildirquota
136 install authlib/authdaemonrc $RPM_BUILD_ROOT%{_sysconfdir}
137 install authlib/authldaprc $RPM_BUILD_ROOT%{_sysconfdir}
138 install authlib/authmysqlrc $RPM_BUILD_ROOT%{_sysconfdir}
140 mv -f $RPM_BUILD_ROOT%{_datadir}/*db \
141 $RPM_BUILD_ROOT%{_sbindir}
142 mv -f $RPM_BUILD_ROOT%{_datadir}/mk*cert \
143 $RPM_BUILD_ROOT%{_sbindir}
145 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authcram.8
146 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpam.8
147 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpwd.8
148 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authshadow.8
149 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authuserdb.8
150 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authvchkpw.8
151 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemon.8
152 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemond.8
153 %{!?_without_mysql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authmysql.8}
154 %{!?_without_ldap:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authldap.8}
155 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8
156 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8
158 gzip -9nf README* imap/BUGS AUTHORS COPYING
160 touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap}
163 rm -rf $RPM_BUILD_ROOT
166 /sbin/chkconfig --add courier-imap
168 if [ -f /var/lock/subsys/courier-imap ]; then
169 /etc/rc.d/init.d/courier-imap restart >&2
171 echo "Run \"/etc/rc.d/init.d/courier-imap start\" to start courier-imap daemon."
175 if [ "$1" = "0" ]; then
176 if [ -f /var/lock/subsys/courier-imap ]; then
177 /etc/rc.d/init.d/courier-imap stop >&2
179 /sbin/chkconfig --del courier-imap
183 /sbin/chkconfig --add authdaemon
185 if [ -f /var/lock/subsys/authdaemon ]; then
186 /etc/rc.d/init.d/authdaemon restart >&2
188 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
192 if [ "$1" = "0" ]; then
193 if [ -f /var/lock/subsys/authdaemon ]; then
194 /etc/rc.d/init.d/authdaemon stop >&2
197 /sbin/chkconfig --del authdaemon
201 /sbin/chkconfig --add courier-imap-pop3
203 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
204 /etc/rc.d/init.d/courier-imap-pop3 restart >&2
206 echo "Run \"/etc/rc.d/init.d/courier-imap-pop3 start\" to start courier-imap pop3 daemon."
210 if [ "$1" = "0" ]; then
211 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
212 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
214 /sbin/chkconfig --del courier-imap-pop3
219 . /etc/sysconfig/authdaemon
220 if [ "$METHOD" = "ldap" ]; then
221 if [ -f /var/lock/subsys/authdaemon ]; then
222 /etc/rc.d/init.d/authdaemon stop >&2
224 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
230 . /etc/sysconfig/authdaemon
231 if [ "$1" = "$0" -a "$METHOD" = "ldap" ]; then
232 if [ -f /var/lock/subsys/authdaemon ]; then
233 /etc/rc.d/init.d/authdaemon stop >&2
239 . /etc/sysconfig/authdaemon
240 if [ "$METHOD" = "mysql" ]; then
241 if [ -f /var/lock/subsys/authdaemon ]; then
242 /etc/rc.d/init.d/authdaemon stop >&2
244 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
250 . /etc/sysconfig/authdaemon
251 if [ "$1" = "$0" -a "$METHOD" = "mysql" ]; then
252 if [ -f /var/lock/subsys/authdaemon ]; then
253 /etc/rc.d/init.d/authdaemon stop >&2
258 %defattr(644,root,root,755)
259 %attr(640,root,root) %config %verify(not size mtime md5) /etc/pam.d/imap
260 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.imap
261 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap
262 %attr(754,root,root) /etc/rc.d/init.d/courier-imap
263 %{_sysconfdir}/imapd.cnf
264 %attr(755,root,root) %{_bindir}/imapd
265 %attr(755,root,root) %{_sbindir}/imaplogin
266 %attr(755,root,root) %{_sbindir}/mkimapdcert
267 %{_mandir}/man8/imapd*
270 %defattr(644,root,root,755)
272 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/authdaemon
273 %attr(754,root,root) /etc/rc.d/init.d/authdaemon
274 %attr(700,root,root) /var/lib/authdaemon
275 %attr(750,root,root) %dir %{_sysconfdir}
277 %dir %{_libexecdir}/authlib
278 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authdaemonrc
279 %{_sysconfdir}/quotawarnmsg.example
280 %attr(755,root,root) %{_bindir}/couriertls
281 %attr(755,root,root) %{_bindir}/maildirmake
282 %attr(755,root,root) %{_sbindir}/makeuserdb
283 %attr(755,root,root) %{_sbindir}/pw2userdb
284 %attr(755,root,root) %{_sbindir}/userdb
285 %attr(755,root,root) %{_sbindir}/userdbpw
286 %attr(755,root,root) %{_sbindir}/vchkpw2userdb
287 %attr(755,root,root) %{_libexecdir}/authlib/authdaemon
288 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.plain
289 %attr(755,root,root) %{_libexecdir}/couriertcpd
290 %attr(755,root,root) %{_libexecdir}/deliverquota
291 %attr(755,root,root) %{_libexecdir}/logger
292 %attr(755,root,root) %{_libexecdir}/makedatprog
294 %{_mandir}/man8/auth[cdpsuv]*
295 %{_mandir}/man8/authlib*
296 %{_mandir}/man8/[cdmpuv]*
299 %defattr(644,root,root,755)
300 %attr(640,root,root) %config %verify(not size mtime md5) /etc/pam.d/pop3
301 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.pop3
302 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap-pop3
303 %attr(754,root,root) /etc/rc.d/init.d/courier-imap-pop3
304 %attr(755,root,root) %{_bindir}/pop3d
305 %attr(755,root,root) %{_sbindir}/mkpop3dcert
306 %attr(755,root,root) %{_sbindir}/pop3login
307 %{_sysconfdir}/pop3d.cnf
309 %if %{?_without_ldap:0}%{!?_without_ldap:1}
311 %defattr(644,root,root,755)
312 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authldaprc
313 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.ldap
314 %{_mandir}/man8/authldap*
317 %if %{?_without_mysql:0}%{!?_without_mysql:1}
319 %defattr(644,root,root,755)
320 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authmysqlrc
321 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.mysql
322 %{_mandir}/man8/authmysql*