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/m.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燈, 水草

請輸入看板名稱,例如:BabyMother站內搜尋

TOP