Setting IMAPd MAILDIR?
Leonard Chung
leonard at chung.yikes.com
Sun Jan 2 03:52:58 PST 2005
Hi there,
I recently upgraded courier-imap using portupgrade, and I've noticed
that it no longer uses the proper maildir directory (./Maildir), but
rather just the user home directory.
This seems to have to do with the change of courier-imap to rc.subr
style scripts. It uses a variable called MAILDIRPATH which isn't defined
anywhere that I can find:
/usr/local/libexec/courier-imap/couriertcpd
-address=$ADDRESS \
-stderrlogger=${exec_prefix}/sbin/courierlogger
\
-stderrloggername=imapd \
-maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP \
-pid=$PIDFILE $TCPDOPTS \
$PORT ${exec_prefix}/sbin/imaplogin
$LIBAUTHMODULES \
${exec_prefix}/bin/imapd ${MAILDIRPATH}"
If I delete ${MAILDIRPATH} and replace it with "./Maildir", then
everything works fine. However, I imagine there is a better (i.e.
recommended) place for me to put this information. This is a machine
running 4.10REL.
Can somebody tell me where MAILDIRPATH is supposed to be defined within
this new rc.subr scheme and also if anybody has any idea why the rc
script uses a variable which is undefined?
Thanks!
Leonard
leonard at chung:/usr/local/libexec/courier-imap# more imapd.rc
#! /bin/sh
# $Id: imapd.rc.in,v 1.26 2004/04/18 15:54:38 mrsam Exp $
#
# Copyright 1998 - 2002 Double Precision, Inc.
# See COPYING for distribution information.
prefix=/usr/local
exec_prefix=/usr/local
bindir=${exec_prefix}/bin
libexecdir=/usr/local/libexec/courier-imap
if test ! -f /usr/local/etc/courier-imap/imapd
then
echo "/usr/local/etc/courier-imap/imapd does not exist, forgot
make install-configure?"
exit 1
fi
if test ! -f /usr/local/etc/courier-imap/imapd-ssl
then
echo "/usr/local/etc/courier-imap/imapd-ssl does not exist,
forgot make install-configure?"
exit 1
fi
TLS_CACHEFILE=""
. /usr/local/etc/courier-imap/imapd-ssl
. /usr/local/etc/courier-imap/imapd
case $1 in
start)
LIBAUTHMODULES=""
for f in `echo $AUTHMODULES`
do
LIBAUTHMODULES="$LIBAUTHMODULES
/usr/local/libexec/courier-imap/authlib/$f"
done
if test -x ${libexecdir}/authlib/authdaemond
then
/usr/bin/env - DEBUG_LOGIN="$DEBUG_LOGIN"
${libexecdir}/authlib/authdaemond start
fi
if test "$TLS_CACHEFILE" != ""
then
rm -f $TLS_CACHEFILE
fi
ulimit -v $IMAP_ULIMITD
/usr/bin/env - /bin/sh -c " set -a ;
prefix=/usr/local ;
exec_prefix=/usr/local ;
bindir=${exec_prefix}/bin ;
libexecdir=/usr/local/libexec/courier-imap ;
. /usr/local/etc/courier-imap/imapd ; \
. /usr/local/etc/courier-imap/imapd-ssl
; \
IMAP_STARTTLS=$IMAPDSTARTTLS ; export IMAP_STARTTLS ; \
TLS_PROTOCOL=$TLS_STARTTLS_PROTOCOL ; \
/usr/local/libexec/courier-imap/couriertcpd
-address=$ADDRESS \
-stderrlogger=${exec_prefix}/sbin/courierlogger
\
-stderrloggername=imapd \
-maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP \
-pid=$PIDFILE $TCPDOPTS \
$PORT ${exec_prefix}/sbin/imaplogin
$LIBAUTHMODULES \
${exec_prefix}/bin/imapd ${MAILDIRPATH}"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^
;;
stop)
/usr/local/libexec/courier-imap/couriertcpd -pid=$PIDFILE -stop
if test -x ${libexecdir}/authlib/authdaemond
then
${libexecdir}/authlib/authdaemond stop
fi
;;
esac
exit 0
More information about the freebsd-questions
mailing list