title: Mutt - Could not connect to smtp.gmail.com (Interrupted system call)
body: <p>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.</p>
  
  <pre><code>Could not connect to smtp.gmail.com (Interrupted system call).
  </code></pre>
  
  <p>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 <code>~/.mutt</code> and <code>~/.mutt/cache/</code> folders are created. I don't think there's an issue with msmtp because it's not adding anything to the log file.</p>
  
  <p>here's my <code>.muttrc</code> without my passwords of course:</p>
  
  <pre><code>set imap_user = "&lt;my_email&gt;@gmail.com"
  set imap_pass = "&lt;my_password&gt;"
  set smtp_url = "smtp://&lt;my_email&gt;@smtp.gmail.com:587/"
  set smtp_pass = "&lt;my_password&gt;"
  set from = "&lt;my_email&gt;@gmail.com"
  set realname = "&lt;my_name&gt;"
  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
  </code></pre>
  
  <p>and my <code>.msmtprc</code></p>
  
  <pre><code>account default
  host smtp.gmail.com
  port 587
  from "&lt;my_email&gt;@gmail.com"
  tls on
  tls_starttls on
  tls_trust_file /etc/ssl/certs/ca-certificates.crt
  auth on
  user "&lt;my_email&gt;@gmail.com"
  password "&lt;my_password&gt;"
  logfile ~/.msmtp.log
  </code></pre>
  
  <p>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.</p>