Linux 板


LINE

请教各位大大,因工作需求,smtp需有SASL验证以及ss/tls加密,於VM环境将一切设定搞 妥之後,先用telnet试试有无问题: -------------------------------------------------- [root@test-smtp postfix]# telnet localhost 25 Trying ::1... Connected to localhost. Escape character is '^]'. 220 smtp1.twcc.ai ESMTP ehlo localhost 250-smtp1.twcc.ai 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-STARTTLS 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN starttls 220 2.0.0 Ready to start TLS quit quit Connection closed by foreign host. -------------------------------------------------- 结果显示都是OK的,但如果此时看maillog,会出现error讯息,此讯息会导致465 port无 作用: -------------------------------------------------- May 12 10:44:10 test-smtp postfix/smtpd[17030]: connect from localhost[::1] May 12 10:44:21 test-smtp postfix/smtpd[17030]: SSL_accept error from localhost[::1]: -1 May 12 10:44:21 test-smtp postfix/smtpd[17030]: warning: TLS library problem: 17030:error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol:s23_srvr.c:640: May 12 10:44:21 test-smtp postfix/smtpd[17030]: lost connection after STARTTLS from localhost[::1] May 12 10:44:21 test-smtp postfix/smtpd[17030]: disconnect from localhost[::1] -------------------------------------------------- 请问有人遇过这种问题吗,能否给小弟建议呢,感谢。 我的main.cf: -------------------------------------------------- [root@test-smtp ~]# postconf -n alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases broken_sasl_auth_clients = yes command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix data_directory = /var/lib/postfix debug_peer_level = 2 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5 html_directory = no inet_interfaces = all inet_protocols = all mail_owner = postfix mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain mydomain = twcc.ai myhostname = smtp1.twcc.ai mynetworks = 192.168.10.0/24, 127.0.0.0/8 mynetworks_style = subnet myorigin = $myhostname newaliases_path = /usr/bin/newaliases.postfix queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES relay_domains = $mydestination sample_directory = /usr/share/doc/postfix-2.10.1/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop smtp_tls_mandatory_protocols = !SSLv2,!SSLv3,!TLSv1 smtp_tls_note_starttls_offer = yes smtp_tls_protocols = !SSLv2,!SSLv3,!TLSv1 smtp_use_tls = yes smtpd_banner = $myhostname ESMTP smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_destination, reject_rbl_client cbl.abuseat.org, reject_rbl_client bl.spamcop.net, reject_rbl_client cblless.anti-spam.org.cn, reject_rbl_client sbl-xbl.spamhaus.org, check_policy_service unix:/var/spool/postfix/postgrey/socket smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous smtpd_tls_CAfile = /etc/postfix/rootca.crt smtpd_tls_cert_file = /etc/postfix/smtp1.twcc.ai.crt smtpd_tls_key_file = /etc/postfix/smtp1.twcc.ai.key smtpd_tls_loglevel = 1 smtpd_tls_mandatory_protocols = !SSLv2,!SSLv3,!TLSv1 smtpd_tls_protocols = !SSLv2,!SSLv3,!TLSv1 smtpd_tls_received_header = yes smtpd_tls_session_cache_timeout = 3600s smtpd_use_tls = yes tls_random_source = dev:/dev/urandom unknown_local_recipient_reject_code = 550 -------------------------------------------------- 我的master.cf仅修改一小部分: -------------------------------------------------- smtps inet n - n - - smtpd -o syslog_name=postfix/smtps -o smtpd_tls_wrappermode=yes -------------------------------------------------- firewall及selinux已关闭。 --



※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 114.37.149.152
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Linux/M.1557629966.A.1E0.html
1F:→ kenwufederer: 你telnet 25 port 然後问465? 05/12 18:16
2F:→ coodie: 重点是telnet之後的starttls指令,以及/var/log/maillog 05/12 22:56
3F:→ coodie: 我的问题点是在於凭证问题,不是哪一port的问题 05/12 22:57
4F:→ coodie: 而且telnet不支援ssl 05/12 23:00
※ 编辑: coodie (114.37.149.152), 05/12/2019 23:01:12
5F:→ coodie: telnet不支援ssl,所以无法telnet 465port 05/12 23:02
6F:→ a07051226: smtpd_tls_wrappermode=yes 是SMTPs 用的 05/13 16:57
7F:→ a07051226: starttls 不需要设定这个 05/13 16:57
8F:→ a07051226: 如果你要用 starttls 而不是 TLS 的话可以参考这里 05/13 16:59
9F:→ a07051226: https://wiki.archlinux.org/index.php/Postfix#TLS 05/13 16:59
10F:→ a07051226: 然後 starttls 用的是 587 ,SMTPs 才是465 05/13 17:00
11F:→ a07051226: 你要嘛一开始25或587,要嘛465,应该是不能跳过去 05/13 17:22
12F:→ coodie: 感谢大大,我马上来试试 05/13 17:57







like.gif 您可能会有兴趣的文章
icon.png[问题/行为] 猫晚上进房间会不会有憋尿问题
icon.pngRe: [闲聊] 选了错误的女孩成为魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一张
icon.png[心得] EMS高领长版毛衣.墨小楼MC1002
icon.png[分享] 丹龙隔热纸GE55+33+22
icon.png[问题] 清洗洗衣机
icon.png[寻物] 窗台下的空间
icon.png[闲聊] 双极の女神1 木魔爵
icon.png[售车] 新竹 1997 march 1297cc 白色 四门
icon.png[讨论] 能从照片感受到摄影者心情吗
icon.png[狂贺] 贺贺贺贺 贺!岛村卯月!总选举NO.1
icon.png[难过] 羡慕白皮肤的女生
icon.png阅读文章
icon.png[黑特]
icon.png[问题] SBK S1安装於安全帽位置
icon.png[分享] 旧woo100绝版开箱!!
icon.pngRe: [无言] 关於小包卫生纸
icon.png[开箱] E5-2683V3 RX480Strix 快睿C1 简单测试
icon.png[心得] 苍の海贼龙 地狱 执行者16PT
icon.png[售车] 1999年Virage iO 1.8EXi
icon.png[心得] 挑战33 LV10 狮子座pt solo
icon.png[闲聊] 手把手教你不被桶之新手主购教学
icon.png[分享] Civic Type R 量产版官方照无预警流出
icon.png[售车] Golf 4 2.0 银色 自排
icon.png[出售] Graco提篮汽座(有底座)2000元诚可议
icon.png[问题] 请问补牙材质掉了还能再补吗?(台中半年内
icon.png[问题] 44th 单曲 生写竟然都给重复的啊啊!
icon.png[心得] 华南红卡/icash 核卡
icon.png[问题] 拔牙矫正这样正常吗
icon.png[赠送] 老莫高业 初业 102年版
icon.png[情报] 三大行动支付 本季掀战火
icon.png[宝宝] 博客来Amos水蜡笔5/1特价五折
icon.pngRe: [心得] 新鲜人一些面试分享
icon.png[心得] 苍の海贼龙 地狱 麒麟25PT
icon.pngRe: [闲聊] (君の名は。雷慎入) 君名二创漫画翻译
icon.pngRe: [闲聊] OGN中场影片:失踪人口局 (英文字幕)
icon.png[问题] 台湾大哥大4G讯号差
icon.png[出售] [全国]全新千寻侘草LED灯, 水草

请输入看板名称,例如:Boy-Girl站内搜寻

TOP