Jun
03
|
1. First stop qmail: “qmailctl stop”
2. Go to /var/qmail/supervise/ and copy entire smtp directory to smtp-ssl .
Edit /var/qmail/supervise/smtp-ssl/run by adding :
SMTPS=1
export SMTPS
after line: VCHKPW=”/home/vpopmail/bin/vchkpw” and change port from smtp to 465 .
Now file should look like this:
#!/bin/sh
QMAILDUID=`id -u vpopmail`
NOFILESGID=`id -g vpopmail`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
SMTPD=”/var/qmail/bin/qmail-smtpd”
TCP_CDB=”/etc/tcprules.d/tcp.smtp.cdb”
HOSTNAME=`hostname`
VCHKPW=”/home/vpopmail/bin/vchkpw”
SMTPS=1
export SMTPS
exec /usr/bin/softlimit -m 12000000 \
/usr/bin/tcpserver -v -R -H -l $HOSTNAME -x $TCP_CDB -c “$MAXSMTPD” \
-u “$QMAILDUID” -g “$NOFILESGID” 0 465 \
$SMTPD $VCHKPW /bin/true 2>&1
3. Edit /var/qmail/supervise/smtp-ssl/log/run :
change /var/log/qmail/smtp to /var/log/qmail/smtp-ssl
Now file should look like this:
#!/bin/sh
LOGSIZE=`cat /var/qmail/control/logsize`
LOGCOUNT=`cat /var/qmail/control/logcount`
exec /usr/bin/setuidgid qmaill /usr/bin/multilog t s$LOGSIZE n$LOGCOUNT /var/log/qmail/smtp-ssl 2>&1
4. start qmail : “qmailct start”
5. verify that port 465 is open: “netstat -natp|grep 465” , output should be:
tcp 0 0 0.0.0.0:465 0.0.0.0:* LISTEN 29448/tcpserver
6. test your settings in your mail client using ssl connection with outgoing server.
One Ping to “QmailToaster: How to configure SMTP with SSL”
2 Responses to “QmailToaster: How to configure SMTP with SSL”
-
1. Dominic Watson Says:
May 28th, 2010 at 7:03 pmSaved my life… how else would anyone know to use port 465 when buying a new server? No application set it to that as default after choosing SSL either
-
2. giorgio Says:
February 26th, 2013 at 5:47 amHallo,
Following your guide I get only a partial result:
I can send email by client to the port 465 without encription.
I can’t send email by client to the port 465 with encription
……So I think about having a certificate problem….
Any ideas??????Details:
The cert that i used for TLS on port 25 is located here /var/qmail/control/clientcert.pem.
(I used qmail-toaster-0.9.1.patch.bz2 )my qmail-ssl/run file is
#!/bin/sh
QMAILDUID=`id -u vpopmail`
NOFILESGID=`id -g vpopmail`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
SMTPS=1
export SMTPS
exec /usr/local/bin/softlimit -m 80000000 \
/usr/local/bin/tcpserver -v -H -R -l 0 -s 5 \
-x /home/vpopmail/etc/tcp.smtp.cdb -c “$MAXSMTPD” \
-u “$QMAILDUID” -g “$NOFILESGID” 0 465 \
/var/qmail/bin/fixcrio \
/var/qmail/bin/qmail-smtpd \
/home/vpopmail/bin/vchkpw /bin/true 2>&1Any ideas??????
thank you!
March 28th, 2010 at 12:05 am
[…] dari: http://mugurel.sumanariu.ro/ No […]