mutt SMTP TLS错误发送邮件


16

当我尝试发送邮件时,出现以下错误:

gnutls_handshake:收到意外的TLS数据包。

这是我的.muttrc(myname,myaddress和mymail是占位符):

# Automatically log in to this mailbox at startup
set imap_user="myname"
set imap_pass=""
set spoolfile="imaps://imap.myaddress/Inbox"
set folder="imaps://imap.myaddress/Inbox"
set record="=Sent"
set postponed="=Drafts"

# define how to send mails
set smtp_url="smtps://$imap_user:$imap_pass@smtp.myaddress:587"

# activate TLS if available on the server
set ssl_starttls=yes

# always use SSL when connecting to a server
set ssl_force_tls=yes

# wait to enter mailbox manually
set imap_passive

# Automatically poll subscribed mailboxes for new mail (new in 1.5.11)
set imap_check_subscribed

# Reduce polling frequency to a sane level
set mail_check=60

# And poll the current mailbox more often (not needed with IDLE in post 1.5.11)
#set timeout=10

# keep a cache of headers for faster loading (1.5.9+?)
#set header_cache=~/.hcache

# Display download progress every 5K
set net_inc=5

# Cancel a message when subject is blank
set abort_nosubject=yes

# Set default editor
set editor="gvim -v"

# Asks to include message when replying
set include=ask-yes

# Asks to postpone a message when not sent
set postpone=ask-yes

# Ask before printing
set print=ask-yes

# set from to ensure mutt doesn't put user@localhost.localhost 
set from="myemail"
set use_from=yes
set envelope_from="yes"

可能与服务器不兼容。如果不了解服务器,将很难回答。您可以尝试使用其他提供商的帐户(例如创建一次性的Gmail地址)吗?
吉尔(Gilles)'所以

我也有这个问题,由于某种原因,它似乎工作确定在端口465

Answers:


24

在端口587上使用smtp提交时,的值smtp_url应以开头"smtp://",即不以开头"smtps://"。确保已将ssl_starttls设置为也是很重要的"yes",就像在上面的配置中正确完成的一样。

在设置我自己的服务器时,我遇到了完全相同的问题。可以同时访问客户端和服务器端的日志,很明显这肯定是客户端问题。

以开头的配置选项smtps告诉mutt打开与服务器的ssl加密连接。但是,服务器期望明文的smtp会话,一旦客户端和服务器进行了一些协商,该会话就会变得加密。


2
如果我对此是正确的(刚刚经过测试),则该set folder="imaps://条目同样适用。应该是set folder="imap:。例如:set folder = "imap://mail.domain.ext:143/"
Nikos Alexandris

@NikosAlexandris请注意:imap(143),imaps(993),smtp(25),smtps(465)。虽然可以对某些imap服务器运行starttls,但imap通常没有与smtp提交相对应的内容(587)。
sampi
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.