Skip to main content

Port 587

Posted in

A TLS-encrypted SMTP service so your users can send mail through your server without passing clear-text passwords across the network.

Set up the service directory, download John Simpson's SMTP run script, and set it's permissions:

cd /var/service
mkdir -m 1755 smtp-tls
cd smtp-tls
wget http://qmail.jms1.net/scripts/service-qmail-smtpd-run
mv service-qmail-smtpd-run run
chmod 700 run

Edit /var/service/smtp-tls/run and set the appropriate options:
IP=<IP ADDRESS TO LISTEN ON>
PORT=587
SSL=0
FORCE_TLS=1
DENY_TLS=0
AUTH=1
REQUIRE_AUTH=1
ALLOW_INSECURE_AUTH=0
AUTH_CDB="$VQ/control/auth.cdb"
CHECKPW="/home/vpopmail/bin/vchkpw"

Unless for some reason you want to be using validrcptto on your authenticated SMTP services, you should disable it in the run script:
#VALIDRCPTTO_CDB="$VQ/control/validrcptto.cdb"
#VALIDRCPTTO_LIMIT=10
#VALIDRCPTTO_LOG=2

Set up the "log" directory, download its "run" script, and set its permissions:
mkdir -m 755 log
cd log
wget http://qmail.jms1.net/scripts/run.log
mv run.log run
chmod 700 run

Create the symbolic link in /service to start the service:
ln -s /var/service/smtp-tls /service/