1 message in net.sourceforge.lists.courier-users[courier-users] Courier IMAP with DJB...
FromSent OnAttachments
Christian HeimesMay 28, 2002 5:58 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[courier-users] Courier IMAP with DJB daemontools - SSL doesn't workActions...
From:Christian Heimes (chei@gmx.net)
Date:May 28, 2002 5:58:44 am
List:net.sourceforge.lists.courier-users

Hello!

I want to use daemontools to supervise courier imap. IMAP with daemontools and sysvinit from courier works fine, but IMAP over SSL doesn't work well with daemontools:

imap over ssl with sysvinit: fine

imap over ssl with daemontools: error error messages are: starttls: accept: error:00000000:lib(0):func(0):reason(0) or: starttls: accept: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number

imap over ssl with sysvinit, login with email client, stopping imap with sysvinit and then starting imap over ssl with daemontools: works fine

I think, there is a problem with the ssl handshake. I tested with M$ Outlook and stunnel -c -f -r imaps, both failed with imap over ssl with daemontools.

My supervise script for imap over ssl: --- cut --- #!/bin/sh exec 2>&1

MAILDIR=".Maildir"

# location of courier-imap prefix="/usr/lib/courier-imap" exec_prefix="/usr/lib/courier-imap" bindir="/usr/lib/courier-imap/bin" libexecdir="/usr/lib/courier-imap/libexec"

# load configuration files . /etc/imap/imapd-ssl . /etc/imap/imapd

IMAP_ULIMITD=$(($IMAP_ULIMITD*1024)) IMAP_STARTTLS=${IMAPDSTARTTLS}; export IMAP_STARTTLS; IMAP_TLS="1"; export IMAP_TLS; TLS_PROTOCOL=${TLS_STARTTLS_PROTOCOL};

`sed -n '/^#/d;/=/p' </etc/imap/imapd | \ sed 's/=.*//;s/^/export /;s/$//'; sed -n '/^#/d;/=/p' </etc/imap/imapd-ssl | \ sed 's/=.*//;s/^/export /;s/$//'`

LIBAUTHMODULES="" for f in `echo $AUTHMODULES`; do LIBAUTHMODULES="$LIBAUTHMODULES /usr/lib/courier-imap/libexec/authlib/$f" done

if test -x ${libexecdir}/authlib/authdaemond; then /usr/bin/env - ${libexecdir}/authlib/authdaemond start fi

exec /service/bin/softlimit -d${IMAP_ULIMITD} \ /usr/local/bin/tcpserver -c${MAXDAEMONS} -v -H -R ${SSLADDRESS} ${SSLPORT} \ ${exec_prefix}/bin/couriertls -server -tcpd \ ${exec_prefix}/sbin/imaplogin $LIBAUTHMODULES \ ${exec_prefix}/bin/imapd ${MAILDIR} 2>&1 --- cut ---

I'm using courier-imap 1.4.5, openssl 0.9.6b with rc5 and daemontools 0.76 on SuSe 7.3

Christian