Hello there,

I wish to have the following setup:

o imapd running on IP xxx.xxx.xxx.xxx port 143 wich accepts only
STARTTLS connections
o imapd-ssl running on ip xxx.xxx.xxx.xxx port 993 wich accepts only
(of course) secure connections
o imapd running on port 127.0.0.1 port 143 wich accepts nonsecure
connections (local webmail)

I think that this is not possible out of the box. I know I can have
couriertcpd running on multiple port numbers like so:
PORT=xxx.xxx.xxx.xxx:143,127.0.0.1:143
But I cannot specify IMAP_TLS_REQUIRED on an per IP basis.

So, I'm planning on doing it like this:


relevant entries in /courier/etc/imapd
ADDRESS=xxx.xxx.xxx.xxx
PORT=143

relevant entries in /courier/etc/imapd-ssl
SSLADDRESS=xxx.xxx.xxx.xxx
SSLPORT=993
IMAP_TLS_REQUIRED=1

make a new /courier/etc/imapd-webmail that is a copy of
/courier/etc/imapd with the following relevant changes:

ADDRESS=127.0.0.1
PORT=143
MAXDAEMONS=40
MAXPERIP=40
PIDFILE=/courier/var/tmp/imapd-webmail.pid

(!!! IMPORTANT!!!)  I don't know how the local webmail worked until
now with MAXPERIP set to 4 before :-)

make a new /courier/sbin/imapd-webmail that is a copy of
/courier/sbin/imapd with the following content:

#! /bin/sh
# $Id: imapd.rc.in,v 1.16 2002/12/24 02:35:50 mrsam Exp $
#
# Copyright 1998 - 1999 Double Precision, Inc.
# See COPYING for distribution information.


prefix=/courier
exec_prefix=/courier
sbindir=${exec_prefix}/sbin

. ${prefix}/etc/imapd-webmail

case $1 in
start)
        LIBAUTHMODULES=""
        for f in `echo $AUTHMODULES`
        do
                LIBAUTHMODULES="$LIBAUTHMODULES
${exec_prefix}/libexec/authlib/$f"
        done

        ulimit -v $IMAP_ULIMITD
        /usr/bin/env - /bin/sh -c " set -a ; \
                                prefix=/courier ; \
                                exec_prefix=/courier ; \
                                sbindir=${exec_prefix}/sbin ; \
                                bindir=/courier/bin ; \
                                . ${prefix}/etc/imapd-webmail ; \
                IMAP_STARTTLS=NO ; export IMAP_STARTTLS ; \
                ${exec_prefix}/sbin/couriertcpd -address=$ADDRESS \
                        -stderrlogger=${exec_prefix}/sbin/courierlogge
r \
                        -stderrloggername=imapd-webmail \
                        -maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP \
                        -pid=$PIDFILE $TCPDOPTS \
                        $PORT ${exec_prefix}/libexec/courier/imaplogin
$LIBAUTHMODULES \
                                /courier/bin/imapd Maildir"
        ;;
stop)
        ${exec_prefix}/sbin/couriertcpd -pid=$PIDFILE -stop
        ;;
restart)
        ${exec_prefix}/sbin/couriertcpd -pid=$PIDFILE -restart
        ;;
esac
exit 0


As an aside, why doesnt the /courier/sbin/imapd-ssl  have a the
following?
restart)
        ${exec_prefix}/sbin/couriertcpd -pid=$PIDFILE -restart
        ;;

Well. This is my idea. Do you see any problem with this? Is it safe to
run multiple instances of imapd? I suppose so, because there are
already two of them runnig (ssl and non ssl). Three won't hurt, right?

Best regards and sorry for the long email.

Miguel Cabe�a



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to