大网数据广告活动
服务器运维问答

TLS connect failed: error:140943FC:SSL routines:SSL3_READ_BYTES:sslv3 alert bad record mac while sending mail via Qmail

· 52CE 我爱测

I'm trying to send e-mail to one of the biggest polish hosting companies and their servers are refusing to receive it with message: TLS connect failed: error:140943FC:SSL routines:SSL3_READ_BYTES:sslv3 alert bad record mac; conne…

问题原文

原帖链接 · Spacedust · CC BY-SA 3.0

I'm trying to send e-mail to one of the biggest polish hosting companies and their servers are refusing to receive it with message:

TLS connect failed: error:140943FC:SSL routines:SSL3_READ_BYTES:sslv3 alert bad record mac; connected to 89.161.199.168.
I'm not going to try again; this message has been in the queue too long.

I've contacted this company and got reply:

"Our verification showed that server mail.domainhere.pl is trying to connect to our server via SSL/TLS protocol. Such form of connection is not supported by our server, but I would like to note that our servers are configured properly and match current RFC standards. The following method of establishing connection is non-standard for communication between the servers."

I'm using Qmailtoaster on CentOS 6.5 64-bit. It happens even if I don't use SSL in my mail client !

Example of my SMTP config:

    #!/bin/sh

QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
BLACKLIST=`cat /var/qmail/control/blacklists`
SMTPD="/var/qmail/bin/qmail-smtpd"
TCP_CDB="/etc/tcprules.d/tcp.smtp.cdb"
RBLSMTPD="/usr/bin/rblsmtpd"
HOSTNAME=`hostname`
VCHKPW="/home/vpopmail/bin/vchkpw"
RECORDIO="/usr/bin/recordio"

### MR -- incresing SOFTLIMITVAR if not enough (example: because 'login fail')
if [ `uname -m` = 'x86_64' ] ; then
        SOFTLIMITVAR="72000000"
else
        SOFTLIMITVAR="18000000"
fi

IP=0
PORT=25

### MR -- SSL must using SMTPS=1 and SSL=1 but non-SSL only SSL=0 (without SMTPS=0)
export SMTPAUTH="!" \
        SSL=0 \
        REQUIRE_AUTH=0 \
        FORCE_TLS=0 \
        DENY_TLS=0 \
        AUTH=1 \
        REQUIRE_AUTH=0 \
        ALLOW_INSECURE_AUTH=1

### MR -- spamhaus.org recommended for not using $RBLSMTPD $BLACKLIST entry before $SMTPD
exec /usr/bin/softlimit -m $SOFTLIMITVAR \
        /usr/bin/tcpserver -v -R -H -l $HOSTNAME -x $TCP_CDB -c "$MAXSMTPD" \
        -u "$QMAILDUID" -g "$NOFILESGID" $IP $PORT $RECORDIO \
        $SMTPD $VCHKPW /bin/true 2>&1

How to correct this ?

已采纳解答

原帖链接 · Spacedust · CC BY-SA 3.0

Solution is very simple:

mkdir /var/qmail/control/tlshosts/exhaustivelist

This will turn off TLS for all domains:

   tlshosts/exhaustivelist
        if this file exists no TLS will  be  tried  on  hosts
        other than those for which a file tlshosts/<FQDN>.pem
        exists.

There is no even need to restart qmail ;)

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2013-12-05)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。