简体   繁体   English

Mutt - 无法连接到smtp.gmail.com(系统调用中断)

[英]Mutt - Could not connect to smtp.gmail.com (Interrupted system call)

Thought I would try out Mutt on Ubuntu and after trying to get it to work for a couple days now I'm stuck on this error. 以为我会尝试在Ubuntu上使用Mutt,并且在尝试让它工作几天之后我现在仍然坚持这个错误。

Could not connect to smtp.gmail.com (Interrupted system call).

I've looked all over the internet trying to figure out how to fix it but I can't find anything that will fix it. 我看了整个互联网试图找出如何解决它,但我找不到任何能解决它的东西。 The ~/.mutt and ~/.mutt/cache/ folders are created. 创建~/.mutt~/.mutt/cache/文件夹。 I don't think there's an issue with msmtp because it's not adding anything to the log file. 我不认为msmtp存在问题,因为它没有向日志文件添加任何内容。

here's my .muttrc without my passwords of course: 这是我的.muttrc当然没有我的密码:

set imap_user = "<my_email>@gmail.com"
set imap_pass = "<my_password>"
set smtp_url = "smtp://<my_email>@smtp.gmail.com:587/"
set smtp_pass = "<my_password>"
set from = "<my_email>@gmail.com"
set realname = "<my_name>"
set sendmail="/usr/bin/msmtp"

set header_cache =~/.mutt/cache/headers
set message_cachedir =~/.mutt/cache/bodies
set certificate_file =~/.mutt/certificates

set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set postponed = "+[Gmail]/Drafts"
set trash = "imaps://imap.gmail.com[Gmail]/Trash"

#======================================================#
# Order of headers and what to show
hdr_order Date: From: User-Agent: X-Mailer \
          To: Cc: Reply-To: Subject:
ignore *
unignore Date: From: User-Agent: X-Mailer  \
         To: Cc: Reply-To: Subject:

#======================================================#
# which editor do you want to use? 
# vim of course!
set editor="vim -c 'set tw=70 et' '+/^$' "
set edit_headers          # See the headers when editing

and my .msmtprc 和我的.msmtprc

account default
host smtp.gmail.com
port 587
from "<my_email>@gmail.com"
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
auth on
user "<my_email>@gmail.com"
password "<my_password>"
logfile ~/.msmtp.log

now here's the really weird stuff... mutt is able to get new emails as well as when I postpone an email it saves it as a draft in gmail and uploads it to the gmail server. 现在这里是非常奇怪的东西...... mutt能够获得新的电子邮件,以及当我推迟发送电子邮件时,它将其保存为gmail中的草稿并将其上传到gmail服务器。 Thanks. 谢谢。

After many more days of searching I found the solution. 经过多天的搜索,我找到了解决方案。 I needed to change the smtp url to: 我需要将smtp网址更改为:

set smtp_url="smtps://<username>@smtp.gmail.com:465/"

emails send just fine now! 电子邮件发送就好了!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法连接到SMTP主机:smtp.gmail.com,端口:465 - could not connect to smtp host:smtp.gmail.com, port:465 无法连接到smtp.gmail.com:587 - Failed to connect to smtp.gmail.com:587 Jenkins:“ javax.mail.MessagingException:无法连接到SMTP主机:smtp.gmail.com,端口:465;” - Jenkins: “javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465;” Jenkins 电子邮件插件:无法连接到 SMTP 主机:smtp.gmail.com,端口:465; - Jenkins Email Plugin : Could not connect to SMTP host: smtp.gmail.com, port: 465; 无法连接到SMTP主机:smtp.gmail.com,端口:465,响应:-1(JSP) - Could not connect to SMTP host: smtp.gmail.com, port: 465, response: -1 (JSP) Spring Boot - 无法连接到 SMTP 主机:smtp.gmail.com,端口:25,响应:421 - Spring Boot - Could not connect to SMTP host: smtp.gmail.com, port: 25, response: 421 无法连接到 SMTP 主机:smtp.gmail.com,端口:Windows Server 2016 上的 587 - Could not connect to SMTP host: smtp.gmail.com, port: 587 on windows server 2016 无法连接到SMTP主机:smtp.gmail.com,port:587; 嵌套异常是:java.net.ConnectException:连接超时:连接 - Could not connect to SMTP host: smtp.gmail.com, port: 587; nested exception is: java.net.ConnectException: Connection timed out: connect 无法与主机smtp.gmail.com建立连接 - Connection could not be established with host smtp.gmail.com Laravel Laravel 8:无法与主机 smtp.gmail.com 建立连接 - Laravel 8: Connection could not be established with host smtp.gmail.com
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM