0
set ssl_starttls=yes
set ssl_force_tls=yes

set imap_user = 'name@gmail.com'
set imap_pass = 'password'

set from='name@gmail.com'
set realname='name@gmail.com'

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

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

set smtp_url = 'smtp://name@gmail.com:password@smtp.gmail.com:465/'

set move = no
set imap_keepalive = 900

set smtp_pass="secrets"

When sending a mail got that error. Firewall also off on server and port 465 open on Security group. Is it required to install postfix with mutt?

Connection to smtp.gmail.com closed SMTP session failed: read error Could not send the message.

I can read the mails on my inbox but can't send emails. This is on my maillog,

Mar  1 10:20:01 appsvr2 postfix/qmgr[6075]: 9703F3F7974: from=<root@appsvr2.localdomain>, size=768, nrcpt=1 (queue active)
Mar  1 10:20:01 appsvr2 postfix/local[5970]: 9427E3F796E: to=<root@appsvr2.localdomain>, orig_to=<root>, relay=local, delay=0.04, delays=0.03/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Mar  1 10:20:01 appsvr2 postfix/qmgr[6075]: 9427E3F796E: removed
Mar  1 10:20:01 appsvr2 postfix/local[5970]: 9703F3F7974: to=<root@appsvr2.localdomain>, orig_to=<root>, relay=local, delay=0.04, delays=0.03/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Mar  1 10:20:01 appsvr2 postfix/qmgr[6075]: 9703F3F7974: removed
Mar  1 10:30:01 appsvr2 postfix/pickup[5945]: A43FB3E643: uid=0 from=<root>
Mar  1 10:30:01 appsvr2 postfix/cleanup[5980]: A43FB3E643: message-id=<20190301050001.A43FB3E643@appsvr2.localdomain>
Mar  1 10:30:01 appsvr2 postfix/qmgr[6075]: A43FB3E643: from=<root@appsvr2.localdomain>, size=827, nrcpt=1 (queue active)
Mar  1 10:30:01 appsvr2 postfix/local[5983]: A43FB3E643: to=<root@appsvr2.localdomain>, orig_to=<root>, relay=local, delay=0.04, delays=0.03/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Mar  1 10:30:01 appsvr2 postfix/qmgr[6075]: A43FB3E643: removed
  • 1
    try changing smtp_url protocol to smtps set smtp_url = 'smtps://name@gmail.com:password@smtp.gmail.com:465/' – Jakub Jindra Feb 20 at 9:28
  • Now getting this error message, SMTP session failed: 501 5.5.4 support.google.com/mail/?p=helo e63sm18078854pfa.116 - gsmtp – nomad Feb 26 at 3:56
  • according to message HELO/EHLO argument invalid, can you provide the output of :set ?hostname. Or even better send link to pastebin with output of command neomutt -D -S (shows censored configuration without sensitive variables) in case of mutt just mutt -D but please check you're not sharing your secrets. ---- not related to your issue: I see password in smtp_url and value of smtp_pass… it's not necessary to have both. – Jakub Jindra Feb 26 at 7:50
  • @ Jakub Jindra My host name is appsvr2. From smtp_url removed the password.And tried with zohomail. Same error. – nomad Feb 27 at 10:06
  • This is on my maullog, – nomad Mar 1 at 5:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.