Hello all!

I installed the syscp package including "courier-imap" and "courier-pop" 
on DEBIAN etch, using this documentation:

http://files.syscp.org/docs/syscp-howto-etch/#id5158422

I assume that most packages are standard debian packages and since I use
apt-get to install them I guess that my behaviour applies to other
DEBIAN installations as well.

The problem is that I can't start courier-imap:

###########################
/etc/init.d/courier-imap start

Starting Courier IMAP server:0022
unlimited
Unknown option '-pid='
###########################

My /etc/init.d/courier-imap script looks like this:

###########################
#! /bin/bash -e

prefix="/usr"
exec_prefix=${prefix}
sysconfdir="/etc/courier"
bindir="${exec_prefix}/bin"
sbindir="${exec_prefix}/sbin"
libexecdir="${prefix}/lib/courier"
TCPD="${sbindir}/couriertcpd"
DAEMON="imapd"
PROGRAM="Courier IMAP server"
SSLCONFIG=

# first of all check if daemon is available
if ! [ -x "${bindir}/imapd" ]; then
        exit 0
fi

if ! [ -x $TCPD ]; then
  echo "ERR: $TCPD missing"
  exit 1
fi

if ! [ -f ${sysconfdir}/$DAEMON ]; then
  echo "ERR: config file missing"
  exit 1
fi

# read/set defaults
if [ -f /etc/default/courier ]; then
        . /etc/default/courier
fi
if [ -z "$MAILDIR" ]; then
        MAILDIR=Maildir
fi

if [ -f "${sysconfdir}/imapd-ssl" ]; then
        . "${sysconfdir}/imapd-ssl"
        SSLCONFIG=1
fi
. ${sysconfdir}/$DAEMON

START=no
case "$IMAPDSTART" in
        [yY]*)START=yes;;
esac

case "$1" in
start)
  if [ "$START" = "yes" ]; then
    echo -n "Starting $PROGRAM:"

        umask $IMAP_UMASK
    ulimit -v $IMAP_ULIMITD
    /usr/bin/env - /bin/sh -c " set -a; \
                bindir=${bindir}; \
                . ${sysconfdir}/imapd; \
                if [ "$SSLCONFIG" ]; then . ${sysconfdir}/imapd-ssl; fi; \
                IMAP_STARTTLS=$IMAPDSTARTTLS ; export IMAP_STARTTLS ; \
                PROXY_HOSTNAME=$PROXY_HOSTNAME;
                TLS_PROTOCOL=$TLS_STARTTLS_PROTOCOL ; \
                /usr/sbin/courierlogger -pid=$PIDFILE -start $LOGGEROPTS \
                $TCPD -address=$ADDRESS \
                        -maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP \
                        $TCPDOPTS \
                        $PORT ${libexecdir}/courier/imaplogin \
                                ${bindir}/imapd $MAILDIR"
    echo " $DAEMON."
  fi
        ;;
stop)
  echo -n "Stopping $PROGRAM:"
  /usr/sbin/courierlogger -pid=$PIDFILE -stop
  echo " $DAEMON."
        ;;
restart | reload | force-reload)
  $0 stop
  $0 start
        ;;
*)
  echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
  exit 1
  ;;
esac
exit 0
###########################

To me it looks like if $PIDFILE in line "/usr/sbin/courierlogger
-pid=$PIDFILE -start $LOGGEROPTS \" might not be declared correctly.

I am a newbie to linux and don't know where or how to look for the
contents of $PIDFILE.

I installed courier-pop too and that daemon works fine without any problems.

My /etc/init.d/courier-pop looks like this.

###########################
#! /bin/sh -e

prefix="/usr"
exec_prefix=${prefix}
sysconfdir="/etc/courier"
sbindir="${exec_prefix}/sbin"
libexecdir="${prefix}/lib/courier"
TCPD="${sbindir}/couriertcpd"
DAEMON=${sbindir}/pop3d
PROGRAM="Courier POP3 server"
PROG="pop3d"
SSLCONFIG=

test -f $DAEMON || exit 0

if ! [ -x $TCPD ]; then
  echo "ERR: $TCPD missing"
  exit 1
fi

if ! [ -f ${sysconfdir}/pop3d ]; then
  echo "ERR: config file missing"
  exit 1
fi

# read/set defaults
if [ -f /etc/default/courier ]; then
        . /etc/default/courier
fi
if [ -z "$MAILDIR" ]; then
        MAILDIR=Maildir
fi

if [ -f "${sysconfdir}/pop3d-ssl" ]; then
        . "${sysconfdir}/pop3d-ssl"
        SSLCONFIG=1
fi
. ${sysconfdir}/pop3d

START=no
case "$POP3DSTART" in
  [yY]*)START=yes;;
esac

case "$1" in
start)
  if [ "$START" = "yes" ]; then
    echo -n "Starting $PROGRAM:"

    /usr/bin/env - /bin/sh -c " set -a; \
                . ${sysconfdir}/pop3d; \
                if [ "$SSLCONFIG" ]; then . ${sysconfdir}/pop3d-ssl; fi; \
                POP3_STARTTLS=$POP3_STARTTLS; export POP3_STARTTLS; \
                TLS_PROTOCOL=$TLS_STARTTLS_PROTOCOL; \
            $TCPD -pid=$PIDFILE -stderrlogger=${sbindir}/courierlogger \
                -maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP \
                $TCPDOPTS -address=$ADDRESS $PORT \
                ${libexecdir}/courier/courierpop3login $AUTHMODULELIST \
                ${libexecdir}/courier/courierpop3d $MAILDIR"
    echo " $PROG."
  fi
    ;;
stop)
  echo -n "Stopping $PROGRAM:"
  $TCPD -pid=$PIDFILE -stop
  echo " $PROG."
    ;;
restart | reload | force-reload)
  $0 stop
  $0 start
    ;;
*)
  echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
  exit 1
  ;;
esac

exit 0
###########################

The pop script also has a $PIDFILE line ("$TCPD -pid=$PIDFILE
-stderrlogger=${sbindir}/courierlogger \"), although it is used in a
different context.

The courier-imap script want to use the pifile in context with the
courierlogger. the courierlogger help shows:

###########################
Usage: courierlogger [-name=name] [-pid=pidfile] [-facility=type]
       [-start|-stop|-restart] [cmd [args...]]
###########################

So I guess the option -pid=<somefile> is correct.

Can someone tell me what's wrong here?

Thanks,

Michael






-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Courier-imap mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap

Reply via email to