Port 465

An SSL-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-ssl
cd smtp-ssl
wget http://qmail.jms1.net/scripts/service-qmail-smtpd-run
mv service-qmail-smtpd-run run
chmod 700 run

Edit /var/service/smtp-ssl/run and set the appropriate options:

IP=<IP ADDRESS TO LISTEN ON>
PORT=465
SSL=1
FORCE_TLS=0
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

If you created SSL certifcates using the Apache SSL instructions you can use the SSL certificate you created:

cd ~/cert
cat server.key server.crt > /var/qmail/control/servercert.pem

Create the symbolic link in /service to start the service:

ln -s /var/service/smtp-ssl /service/

CentOS 7 Firewall settings:

firewall-cmd --permanent --zone=public  --add-port=465/tcp
firewall-cmd --reload

Testing SMTP Auth connections

Credits

Various bits of code, scripts, and procedures were put together with information from John Simpson's qmail.jms1.net website. It's an excellent resource on managing and setting up a Qmail server.

Recent Updates

  • 2 years 2 days ago
  • 2 years 2 days ago
  • 2 years 4 days ago
    php 8.x
  • 2 years 6 days ago
    10.6.7
  • 2 years 1 week ago
    Drop Centos 5/6 stuff