[dovecot] dovecot RPM for Red Hat Linux
http://bugzilla.fedora.us/show_bug.cgi?id=160
This .src.rpm is dovecot with RH-specific default settings. I modified Jeremy Katz' dovecot-0.99.8.1 package a bit. When I upgraded from 0.99.8.1 it seemed to be broken until I looked at /var/log/maillog. There it indicated that the dovecot cache files were bad, so I erased /home/*/mail/.imap/ and it seemed to work subsequently.
There are a few more RH specific tweaks that I plan on doing for this package. If you have any suggestions to default config tweaks for this package please reply or post in that bugzilla entry above. I would like for this package to be a drop-in replacement for RHL's uw-imapd eventually, but there are a number of migration issues that need to be addressed first. This package will eventually be included in the Fedora tree after it goes through our QA.
http://www.fedora.us Fedora Linux is a project of volunteer package developers making 3rd party packages specifically for Red Hat Linux.
Warren Togami warren@togami.com
p.s. Keep up the good work. I absolutely love dovecot!
On Sun, 2003-04-13 at 15:42, Warren Togami wrote:
http://bugzilla.fedora.us/show_bug.cgi?id=160
This .src.rpm is dovecot with RH-specific default settings. I modified Jeremy Katz' dovecot-0.99.8.1 package a bit.
I ran into and fixed a few packaging problems listed below, but the last two I'm not exactly sure how to fix. Any suggestions?
One problem within /etc/init.d/dovecot
start() {
# Check if pxe is already running
if [ ! -f /var/lock/subsys/dovecot ]; then
echo -n $"Starting $prog: "
/usr/sbin/dovecot &
[ -n "pidofproc /usr/sbin/dovecot
" ] && success
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/dovecot
echo
fi
}
This line "/usr/sbin/dovecot &" executes in the background, but the next line "[
-n "pidofproc /usr/sbin/dovecot
" ] && success" happens too soon, causing a non
zero return value and a FAILED message during bootup. I confirmed this by
adding "sleep 5" between the two lines, giving it enough time to startup
completely before testing for the pid. It no displays the fake FAILED message
during bootup. What should be the proper fix for this?
RH init script problem
Another problem happens during RH's init scripts after you reboot. By default dovecot uses /var/run/dovecot/login/ as a directory to create unix sockets for login. RH's init script displays an error messages when I tries to remove /var/run/*/* files because it is a directory, not a file. I changed dovecot's default to /var/run/dovecot and it now avoids this error.
chkconfig problem
[root@goku log]# chkconfig --list |grep dovecot dovecot 0:off 1:off 2:off 3:off 4:off 5:off 6:off [root@goku log]# chkconfig dovecot on [root@goku log]# chkconfig --list |grep dovecot dovecot 0:off 1:off 2:off 3:off 4:off 5:off 6:off The init.d and rc.d stuff seems to have problems, I haven't analyzed this yet.
Service name problem
During startup it says "5dovecot: Starting Dovecot Imap:" I'm not sure why it says "5dovecot" rather than "dovecot". Any ideas?
Warren Togami warren@togami.com
here is what we use to compile the cvs. Warren Togami wrote:
On Sun, 2003-04-13 at 15:42, Warren Togami wrote:
http://bugzilla.fedora.us/show_bug.cgi?id=160
This .src.rpm is dovecot with RH-specific default settings. I modified Jeremy Katz' dovecot-0.99.8.1 package a bit.
I ran into and fixed a few packaging problems listed below, but the last two I'm not exactly sure how to fix. Any suggestions?
One problem within /etc/init.d/dovecot ====================================== start() { # Check if pxe is already running if [ ! -f /var/lock/subsys/dovecot ]; then echo -n $"Starting $prog: " /usr/sbin/dovecot & [ -n "`pidofproc /usr/sbin/dovecot`" ] && success RETVAL=$? [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dovecot echo fi }
This line "/usr/sbin/dovecot &" executes in the background, but the next line "[ -n "`pidofproc /usr/sbin/dovecot`" ] && success" happens too soon, causing a non zero return value and a FAILED message during bootup. I confirmed this by adding "sleep 5" between the two lines, giving it enough time to startup completely before testing for the pid. It no displays the fake FAILED message during bootup. What should be the proper fix for this?
RH init script problem ====================== Another problem happens during RH's init scripts after you reboot. By default dovecot uses /var/run/dovecot/login/ as a directory to create unix sockets for login. RH's init script displays an error messages when I tries to remove /var/run/*/* files because it is a directory, not a file. I changed dovecot's default to /var/run/dovecot and it now avoids this error.
chkconfig problem ================= [root@goku log]# chkconfig --list |grep dovecot dovecot 0:off 1:off 2:off 3:off 4:off 5:off 6:off [root@goku log]# chkconfig dovecot on [root@goku log]# chkconfig --list |grep dovecot dovecot 0:off 1:off 2:off 3:off 4:off 5:off 6:off The init.d and rc.d stuff seems to have problems, I haven't analyzed this yet.
Service name problem ==================== During startup it says "5dovecot: Starting Dovecot Imap:" I'm not sure why it says "5dovecot" rather than "dovecot". Any ideas?
Warren Togami warren@togami.com
--
Levente "Si vis pacem para bellum!"
--- dovecot-0.99.8.1/doc/Makefile.in.lfarkas 2003-02-28 15:04:45.000000000 +0100
+++ dovecot-0.99.8.1/doc/Makefile.in 2003-02-28 15:05:46.000000000 +0100
@@ -82,7 +82,7 @@
VPOPMAIL_LIBS = @VPOPMAIL_LIBS@
ssldir = @ssldir@
-docdir = $(datadir)/doc/dovecot
+docdir = $(datadir)/doc/dovecot-0.99.8.1
doc_DATA = auth.txt configuration.txt design.txt index.txt mail-storages.txt multiaccess.txt nfs.txt
--- dovecot-1.0/configure.lfarkas 2003-03-20 15:53:04.000000000 +0100
+++ dovecot-1.0/configure 2003-03-20 15:54:37.000000000 +0100
@@ -8205,7 +8205,7 @@
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+LIBTOOL='$(SHELL) libtool'
# Prevent multiple expansion
#!/bin/bash
#
# /etc/rc.d/init.d/dovecot
#
# Starts the dovecot daemon
#
# chkconfig: - 345 54 54
# description: Dovecot Imap Server
# processname: dovecot
# Source function library.
. /etc/init.d/functions
test -x /usr/sbin/dovecot || exit 0
RETVAL=0
prog="dovecot"
start() {
echo -n $"Starting $prog: "
# Check if dovecot is already running
if [ ! -f /var/lock/subsys/dovecot ]; then
daemon /usr/sbin/dovecot
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/dovecot
echo
else
failure $"dovecot start"
echo
fi
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
killproc dovecot
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dovecot
echo
return $RETVAL
}
#
# See how we were called.
#
case "$1" in
start)
start
;;
stop)
stop
;;
reload|restart)
stop
start
;;
condrestart)
if [ -f /var/lock/subsys/dovecot ]; then
stop
start
fi
;;
status)
status /usr/sbin/dovecot
;;
*)
echo $"Usage: $0 {condrestart|start|stop|restart|reload|status}"
exit 1
esac
exit $?
#%PAM-1.0
#
# $Id: system-auth.authpam,v 1.1 2001/02/02 05:42:57 mrsam Exp $
#
# Copyright 1998-2001 Double Precision, Inc. See COPYING for
# distribution information.
#
# This is a sample authpam configuration file that uses pam_stack
# (circa linux-pam 0.72).
auth required pam_nologin.so
auth required pam_stack.so service=system-auth
account required pam_stack.so service=system-auth
session required pam_stack.so service=system-auth
%define uid 96
%define gid 96
Summary: Dovecot Secure imap server
Name: dovecot
Version: 1.0
Release: cvs
License: GPL
Group: System Environment/Daemons
Source: %{name}-%{version}.tar.gz
Source2: dovecot.init
Source3: dovecot.pam
Patch: dovecot-libtool.patch
URL: http://dovecot.procontrol.fi/
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root
%description
Dovecot IMAP server - compiled with openssl, pam and ldap support certs in /etc/ssl
%prep
%setup -q
%patch -p1
%build
#./autogen.sh
%configure --with-ldap --with-ssl=openssl --with-rawlog
make
%install
rm -rf $RPM_BUILD_ROOT
%makeinstall
rm -rf $RPM_BUILD_ROOT/%{_datadir}/%{name}
rm -rf $RPM_BUILD_ROOT/%{_datadir}/doc/%{name}
mv $RPM_BUILD_ROOT/%{_sysconfdir}/dovecot-example.conf $RPM_BUILD_ROOT/%{_sysconfdir}/dovecot.conf
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d
install -m 755 %{SOURCE2} $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/dovecot
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/pam.d
install -m 644 %{SOURCE3} $RPM_BUILD_ROOT/%{_sysconfdir}/pam.d/imap
install -m 644 %{SOURCE3} $RPM_BUILD_ROOT/%{_sysconfdir}/pam.d/imaps
install -m 644 %{SOURCE3} $RPM_BUILD_ROOT/%{_sysconfdir}/pam.d/pop3
install -m 644 %{SOURCE3} $RPM_BUILD_ROOT/%{_sysconfdir}/pam.d/pop3s
%post
/sbin/chkconfig --add dovecot
# Add the dovecot user and group if not found
groupadd -g %{gid} -r dovecot 2>/dev/null || :
useradd -d /var/run/dovecot -s /bin/false -g dovecot -M -r -u %{uid} dovecot 2>/dev/null || :
%preun
/sbin/chkconfig --del dovecot
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%config %{_sysconfdir}/dovecot.conf
%config %{_sysconfdir}/pam.d/*
%config %{_sysconfdir}/rc.d/init.d/dovecot
%dir %{_libexecdir}/%{name}
%{_libexecdir}/%{name}/*
%dir %{_sbindir}
%{_sbindir}/*
%doc doc/*.txt doc/dovecot-* doc/mkcert.sh INSTALL AUTHORS ChangeLog COPYING TODO README NEWS COPYING.LGPL
%changelog
* Mon Mar 24 2003 Levente Farkas
On 13 Apr 2003, Warren Togami wrote:
On Sun, 2003-04-13 at 15:42, Warren Togami wrote:
http://bugzilla.fedora.us/show_bug.cgi?id=160
This .src.rpm is dovecot with RH-specific default settings. I modified Jeremy Katz' dovecot-0.99.8.1 package a bit.
I ran into and fixed a few packaging problems listed below, but the last two I'm not exactly sure how to fix. Any suggestions?
One problem within /etc/init.d/dovecot
start() { # Check if pxe is already running if [ ! -f /var/lock/subsys/dovecot ]; then echo -n $"Starting $prog: " /usr/sbin/dovecot & [ -n "
pidofproc /usr/sbin/dovecot
" ] && success RETVAL=$? [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dovecot echo fi }
Warren, why are you using pidofproc and success yourself ? Red Hat has the infrastructure that takes care of this. I have never have to use these myself.
You could take a look at my sysv-script in my SPEC file. I always embed these files in the SPEC file so that the path-macros affect the sysv-script too.
There I simply do:
start() {
echo -n \$"Starting \$prog: "
daemon \$prog
RETVAL=\$?
echo
touch %{_localstatedir}/lock/subsys/\$prog
return \$RETVAL
}
stop() {
echo -n \$"Shutting down \$prog: "
killproc \$prog
RETVAL=\$?
echo
rm -f %{_localstatedir}/lock/subsys/\$prog
return \$RETVAL
}
Any suggestions to this are welcomed.
Kind regards, -- dag wieers, dag@wieers.com, http://dag.wieers.com/ -- �Any errors in spelling, tact or fact are transmission errors�
On Mon, 14 Apr 2003, Dag Wieers wrote:
On 13 Apr 2003, Warren Togami wrote:
On Sun, 2003-04-13 at 15:42, Warren Togami wrote:
http://bugzilla.fedora.us/show_bug.cgi?id=160
This .src.rpm is dovecot with RH-specific default settings. I modified Jeremy Katz' dovecot-0.99.8.1 package a bit.
I ran into and fixed a few packaging problems listed below, but the last two I'm not exactly sure how to fix. Any suggestions?
One problem within /etc/init.d/dovecot
start() { # Check if pxe is already running if [ ! -f /var/lock/subsys/dovecot ]; then echo -n $"Starting $prog: " /usr/sbin/dovecot & [ -n "
pidofproc /usr/sbin/dovecot
" ] && success RETVAL=$? [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dovecot echo fi }Warren, why are you using pidofproc and success yourself ? Red Hat has the infrastructure that takes care of this. I have never have to use these myself.
You could take a look at my sysv-script in my SPEC file. I always embed these files in the SPEC file so that the path-macros affect the sysv-script too.
There I simply do:
-snip-
Make that:
start() {
echo -n \$"Starting \$prog: "
daemon \$prog
RETVAL=\$?
echo
[ \$RETVAL -eq 0 ] && touch %{_localstatedir}/lock/subsys/\$prog
return \$RETVAL
}
stop() {
echo -n \$"Shutting down \$prog: "
killproc \$prog
RETVAL=\$?
echo
[ \$RETVAL -eq 0 ] && rm -f %{_localstatedir}/lock/subsys/\$prog
return \$RETVAL
}
Kind regards, -- dag wieers, dag@wieers.com, http://dag.wieers.com/ -- �Any errors in spelling, tact or fact are transmission errors�
On 13 Apr 2003, Warren Togami wrote:
On Sun, 2003-04-13 at 15:42, Warren Togami wrote:
chkconfig problem
[root@goku log]# chkconfig --list |grep dovecot dovecot 0:off 1:off 2:off 3:off 4:off 5:off 6:off [root@goku log]# chkconfig dovecot on [root@goku log]# chkconfig --list |grep dovecot dovecot 0:off 1:off 2:off 3:off 4:off 5:off 6:off The init.d and rc.d stuff seems to have problems, I haven't analyzed this yet.
It probably has to do with the chkconfig headers in your sysv-script.
[root@lisse SPECS]# rpm -q dovecot dovecot-0.99.8.1-0.dag.rh90
[root@lisse SPECS]# chkconfig --list dovecot
dovecot 0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@lisse SPECS]# chkconfig dovecot on
[root@lisse SPECS]# chkconfig --list dovecot
dovecot 0:off 1:off 2:on 3:on 4:on 5:on 6:off
-- dag wieers, dag@wieers.com, http://dag.wieers.com/ -- �Any errors in spelling, tact or fact are transmission errors�
On Mon, 2003-04-14 at 08:58, Warren Togami wrote:
RH init script problem
Another problem happens during RH's init scripts after you reboot. By default dovecot uses /var/run/dovecot/login/ as a directory to create unix sockets for login. RH's init script displays an error messages when I tries to remove /var/run/*/* files because it is a directory, not a file. I changed dovecot's default to /var/run/dovecot and it now avoids this error.
Rather make a new directory for it, eg. /var/run/dovecot-login. Currently it's not that important, but it might change in future. Or actually I think it breaks if Dovecot is started via inetd, because it creates a socket in /var/run/dovecot which would conflict with auth sockets.
participants (4)
-
Dag Wieers
-
Farkas Levente
-
Timo Sirainen
-
Warren Togami