Summary: Courier mail server
Summary(pl): Serwer poczty Courier
Name: courier
-Version: 0.45.4
+Version: 0.45.5
Release: 1
License: GPL
Group: Networking/Daemons
Source0: http://dl.sourceforge.net/courier/%{name}-%{version}.tar.bz2
-# Source0-md5: ab2a668fe590f42c40649b62af704995
+# Source0-md5: 59f69d851740a11a0172eb803f9ab12f
Patch0: %{name}-openssl-path.patch
Patch1: %{name}-withoutfam.patch
Patch2: %{name}-maildir.patch
Patch3: %{name}-sendmail_dir.patch
Patch4: %{name}-start_scripts.patch
Patch5: %{name}-fix_build.patch
+Patch6: %{name}-certs.patch
URL: http://www.courier-mta.org/
BuildRequires: autoconf
BuildRequires: automake
%define _libexecdir %{_libdir}
%define _localstatedir /var/spool/courier
%define _sysconfdir /etc/courier
+%define _certsdir %{_sysconfdir}/certs
%define initdir /etc/rc.d/init.d
# Change the following if your DocumentRoot and cgibindir differ. This is
%patch3 -p1
%patch4 -p1
%patch5 -p1
+%patch6 -p1
%build
# we don't want fax module
%{__autoconf}
ln -s ../ltmain.sh .
%{__automake}
+
+cd module.esmtp
+%{__aclocal}
+%{__autoconf}
+ln -s ../ltmain.sh .
+%{__automake}
+cd ../..
+
+cd imap
+%{__aclocal}
+%{__autoconf}
+%{__automake}
cd ..
%configure \
--sysconfdir=%{_sysconfdir} \
--mandir=%{_mandir} \
--enable-imageurl=%{_imageurl} \
+ --with-certsdir=%{_certsdir} \
--with-db=db \
--with-mailer=%{_sbindir}/sendmail
umask 022
install -d -p $RPM_BUILD_ROOT{/etc/{cron.hourly,pam.d},%{initdir}} \
$RPM_BUILD_ROOT{%{_cgibindir},%{_documentrootdir},%{_prefix}/lib} \
- $RPM_BUILD_ROOT{%{_sysconfdir}/{userdb,hosteddomains,shared} \
- $RPM_BUILD_ROOT%{_localstatedir}{/calendar/{private,public},/tmp/broken}} \
- $RPM_BUILD_ROOT/etc/cron.hourly
+ $RPM_BUILD_ROOT%{_sysconfdir}/{userdb,hosteddomains,shared} \
+ $RPM_BUILD_ROOT%{_localstatedir}{/calendar/{private,public},/tmp/broken} \
+ $RPM_BUILD_ROOT{/etc/cron.hourly,%{_certsdir}}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
# create file me to put localdomain
touch $RPM_BUILD_ROOT%{_sysconfdir}/me
+# create calendarmode
+touch $RPM_BUILD_ROOT%{_sysconfdir}/calendarmode
+
install courier.sysvinit $RPM_BUILD_ROOT%{initdir}/courier
#
# Red Hat /etc/profile.d scripts
%clean
rm -rf $RPM_BUILD_ROOT
+%triggerin -- courier < 0.45.5
+echo
+echo Directory with certificates has changed to %{_certsdir}
+echo
+
%post
-if [ "$1" = "1" ]; then
/sbin/chkconfig --add courier
+
+if [ "$1" = "1" ]; then
/bin/hostname -f >/etc/courier/me
cat <<EOF
%{_sbindir}/imapd stop
%{_sbindir}/imapd start
fi
+else
+echo
+echo Type "%{_sbindir}/imapd start" to start imapd server
+echo
+fi
if [ -e %{_localstatedir}/tmp/imapd-ssl.pid ]; then
%{_sbindir}/imapd-ssl stop
%{_sbindir}/imapd-ssl start
fi
+else
+echo
+echo Type "%{_sbindir}/imapd-ssl start" to start imapd-ssl server
+echo
+fi
%preun imapd
if [ "$1" = "0" ]; then
%{_sbindir}/pop3d stop
%{_sbindir}/pop3d start
fi
+else
+echo
+echo Type "%{_sbindir}/pop3d start" to start pop3d server
+echo
+fi
if [ -e %{_localstatedir}/tmp/pop3d-ssl.pid ]; then
%{_sbindir}/pop3d-ssl stop
%{_sbindir}/pop3d-ssl start
fi
+else
+echo
+echo Type "%{_sbindir}/pop3d-ssl start" to start pop3d-ssl server
+echo
+fi
%preun pop3d
if [ "$1" = "0" ]; then
fi
%post webmail
-if ps -A |grep -q sqwebmaild; then
- %{_libdir}/courier/sqwebmaild stop
- %{_libdir}/courier/sqwebmaild start
+if [ "$1" = "1" ]; then
+echo
+echo If you want to have calendar starting by default then
+echo put word net to %{_sysconfdir}/calendarmode
+echo
+fi
+if [ -e %{_localstatedir}/tmp/sqwebmaild.pid ]; then
+ %{_sbindir}/webmaild stop
+ %{_sbindir}/webmaild start
else
echo
-echo Type "%{_libdir}/courier/sqwebmaild start" to start webmail server
+echo Type "%{_sbindir}/webmaild start" to start webmail server
echo
fi
%preun webmail
if [ "$1" = "0" ]; then
- if ps -A |grep -q sqwebmaild; then
- %{_libdir}/courier/sqwebmaild stop
+ if [ -e %{_localstatedir}/tmp/sqwebmaild.pid ]; then
+ %{_sbindir}/webmaild stop
fi
fi
%{_mandir}/man1/testmxlookup.1*
%{_mandir}/man1/dot-forward.1*
%{_mandir}/man1/couriertls.1*
+%{_mandir}/man1/courierlogger.1*
%{_mandir}/man1/mailq*
%{_mandir}/man1/couriertcpd*
%{_mandir}/man1/dotforward.1*
%{_mandir}/man8/pw2userdb.8*
%{_mandir}/man8/vchkpw2userdb.8*
%dir %{_sysconfdir}
+%attr(750,daemon,root) %dir %{_certsdir}
%attr(755,daemon,daemon) %dir %{_sysconfdir}/hosteddomains
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/me
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/ldapaddressbook
%attr(755,root,root) %{_datadir}/makeuucpneighbors
%dir %{_libdir}/courier/modules/local
%attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/module.local
-%attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authmodulelist
%attr(755,root,root) %{_libdir}/courier/modules/local/courierlocal
%attr(755,root,root) %{_libdir}/courier/modules/local/courierdeliver
%attr(755,root,root) %{_bindir}/preline
%attr(644,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/webmail
%attr(644,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/calendar
%{_documentrootdir}/webmail
+%attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sqwebmaild
+%attr(755,root,root) %{_sbindir}/webmaild
%dir %{_datadir}/sqwebmail
%dir %{_datadir}/sqwebmail/html
%dir %{_datadir}/sqwebmail/html/en-us
%attr(755,root,root) %{_libdir}/courier/sqwebmaild
%attr(700, bin, bin) %dir %{_localstatedir}/webmail-logincache
%attr(755,root,root) /etc/cron.hourly/courier-webmail-cleancache
-%attr(751,daemon,daemon) %dir %{_localstatedir}/calendar
-%attr(750,daemon,daemon) %dir %{_localstatedir}/calendar/localcache
-%attr(750,daemon,daemon) %dir %{_localstatedir}/calendar/private
-%attr(755,daemon,daemon) %dir %{_localstatedir}/calendar/public
+%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/calendarmode
+%attr(751,bin,bin) %dir %{_localstatedir}/calendar
+%attr(700,bin,bin) %dir %{_localstatedir}/calendar/localcache
+%attr(750,bin,bin) %dir %{_localstatedir}/calendar/private
+%attr(755,bin,bin) %dir %{_localstatedir}/calendar/public
%files maildrop
%defattr(644,root,root,755)