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.
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. I don't think there's an issue with msmtp because it's not adding anything to the log file.
here's my .muttrc
without my passwords of course:
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
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. Thanks.
After many more days of searching I found the solution. I needed to change the smtp url to:
set smtp_url="smtps://<username>@smtp.gmail.com:465/"
emails send just fine now!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With