centos7 阿里云ECS环境,使用465端口发送邮件报错:
1、配置文件如下:
[root@vrbp-task-pre woasis]# cat /etc/mail.rc
set smtp="smtps://smtp.163.com:465"
set smtp-auth-user="wuxxxx@163.com"
set smtp-auth-password="yuxxxx"
set smtp-auth=login
2、执行发送报错:
[root@vrbp-task-pre woasis]# echo message4 | mail -v -r "wuxxxxxx@163.com" -s "This is the subject" 47xxxxxx@qq.com
Resolving host smtp.163.com . . . done.
Connecting to 220.181.12.13:465 . . . connected.
Missing "nss-config-dir" variable.
"/root/dead.letter" 11/310
. . . message not sent.
[root@vrbp-task-pre woasis]#
求阿里云大神或者BBS大神,遇到过的帮助帮助!!!!!!!!!!!!
题主您好,
或许您可以参考一下这个问答:http://stackoverflow.com/questions/16799407/mailx-and-gmail-nss-config-dir
即可能要设置 nss-config-dir
的值。
您好,
为您写了这个帖子,希望对您有用:
《在CentOS 7系统里使用465端口发送邮件》 - https://bbs.aliyun.com/read/316576.html
1、根据上面的错误更改配置:
set smtp="smtps://smtp.163.com:465"
set smtp-auth-user="wuxxxxx@163.com"
set smtp-auth-password="yuxxxxx"
set smtp-auth=login
set ssl-verify=ignore
set nss-config-dir=/etc/pki/nssdb/
2、继续报错:
[root@vrbp-task-pre etc]# echo message4 | mail -v -r "wuxxxxx@163.com" -s "This is the subject" 47xxxxxx@qq.com
Resolving host smtp.163.com . . . done.
Connecting to 220.181.12.13:465 . . . connected.
Error in certificate: Peer's certificate issuer is not recognized.
Comparing DNS name: "*.163.com"
SSL parameters: cipher=missing, keysize=256, secretkeysize=256,
issuer=CN=GeoTrust SSL CA - G3,O=GeoTrust Inc.,C=US
subject=CN=*.163.com,OU=MAIL Dept.,O="NetEase (Hangzhou) Network Co., Ltd",L=Hangzhou,ST=Zhejiang,C=CN
220 163.com Anti-spam GT for Coremail System (163com[20141201])
EHLO vrbp-task-pre.woasis.com
250-mail
250-PIPELINING
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-coremail 1Uxr2xKj7kG0xkI17xGrU7I0s8FY2U3Uj8Cz28x1UUUUU7Ic2I0Y2UFPkoPMUCa0xDrUUUUj
250-STARTTLS
250 8BITMIME
AUTH LOGIN
334 dXNlcm5hbWU6
d3Vrb25nZm9AMTYzLmNvbQ==
334 UGFzc3dvcmQ6
eXUxOTkzQUo=
235 Authentication successful
MAIL FROM:wuxxxxx@163.com
250 Mail OK
RCPT TO:47xxxxx@qq.com
250 Mail OK
DATA
354 End data with .
.
250 Mail OK queued as smtp9,DcCowADnhlJdOyBZ0EIpFQ--.56836S2 1495284573
QUIT
221 Bye
[root@vrbp-task-pre etc]#
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。