3-E: Qmail-smtpd-ssl

cd /var/qmail/supervise
cp -r qmail-smtpd qmail-smtpd-ssl
cd qmail-smtpd-ssl/
rm -r supervise/
rm -r log/supervise/

rm log/run
nano log/run

==============================================================

#!/bin/sh
exec /usr/bin/setuidgid qmaill /usr/bin/multilog t s100000000 n5 /var/log/qmail/smtpd-ssl

==============================================================

chmod a+x log/run

#And then the launcher. You can use a lower softlimit here. Don't forget to replace mail.example.com with your server's hostname

nano run

#delete everything that's inside and paste the following

=====================================================
#!/bin/sh

# sslserver arguments
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
LOCAL=`head -1 /var/qmail/control/me`

# sslserver certificates
export CERTFILE="/var/qmail/control/servercert.pem"
export KEYFILE=""
export DHFILE=""

# skip remote blacklists (/etc/tcp.smtp applies anyways)
RBLSMTPD=""; export RBLSMTPD

# qmail options
ALLOW_INSECURE_AUTH="1"; export ALLOW_INSECURE_AUTH
REQUIRE_AUTH="1"; export REQUIRE_AUTH

#Here you need to make a desicion. if you enable the following you will be more

#throughful, but at the expense of slowing down smtp for your clients, i prefer to disable it
#QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl" ; export QMAILQUEUE

#Or what's better...

QMAILQUEUE="/var/qmail/bin/qmail-queue"

# sslserver limits
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`

if [ -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z "$MAXSMTPD" -o -z "$LOCAL" ]; then
    echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in
    echo /var/qmail/supervise/qmail-smtpd/run
    exit 1
fi

if [ ! -f /var/qmail/control/rcpthosts ]; then
    echo "No /var/qmail/control/rcpthosts!"
    echo "Refusing to start SMTP listener because it'll create an open relay"
    exit 1
fi

exec /usr/bin/softlimit -m 150000000 \
       /usr/local/bin/sslserver -e \
          -v -R -l "$LOCAL" -x /etc/tcp.smtp.cdb \
          -c "$MAXSMTPD" \
          -u "$QMAILDUID" -g "$NOFILESGID" 0 465 \
               /usr/bin/rblsmtpd \
               /var/qmail/bin/qmail-smtpd mail.example.com \
               /home/vpopmail/bin/vchkpw /usr/bin/true 2>&1
=====================================================

ln -s /var/qmail/supervise/qmail-smtpd-ssl /etc/service