I recently installed neomutt on my fresh Arch installation. I setup my .muttrc as follows:

# Receive mail
set imap_user   = [email protected]
set folder           = imap://imap.example.org/
set spoolfile      = +INBOX

# Send mail
set realname    = 'name'
set from            = [email protected]
set use_from    = yes
set smtp_url     = smtp://$imap_user:[email protected]
set ssl_starttls  = yes
set editor          = nano
set record         = +Sent

mailboxes =INBOX

# Store message headers locally to speed things up.
# If hcache is a folder, Mutt will create sub cache folders for each account which may speeds things up even more.
set header_cache = ~/.cache/mutt

# Allow Mutt to open a new IMAP connection automatically.
unset imap_passive

# Keep the IMAP connection alive by polling intermittently (time in seconds).
set imap_keepalive = 300

# How often to check for new mail (time in seconds).
set mail_check = 120

Note: according to neomutt's documentation, the rc file can be called .muttrc, so that's not an issue

I can receive emails without any issues. The problem comes when I try to send an email. I get the following error message:

Could not connect to smtp.example.org (No route to host).

When I do ping smtp.example.org I get:

PING example.org ( 56(84) bytes of data.
64 bytes from vn.example.org ( icmp_seq=1 ttl=52 time=92.7 ms
64 bytes from vn.example.org ( icmp_seq=2 ttl=52 time=93.4 ms
64 bytes from vn.example.org ( icmp_seq=3 ttl=52 time=94.6 ms
64 bytes from vn.example.org ( icmp_seq=4 ttl=52 time=95.1 ms
64 bytes from vn.example.org ( icmp_seq=5 ttl=52 time=92.9 ms
64 bytes from vn.example.org ( icmp_seq=6 ttl=52 time=93.3 ms
64 bytes from vn.example.org ( icmp_seq=7 ttl=52 time=91.8 ms

Which tells me this must be a problem on my side, not from the server. I have already tried to change my configuration, check for any invisible characters on the smtp url, reseting my PC and my router, but the problem persists.

Can someone tell me why is this happening and how can I fix it in order to send emails?

Thank you very much!

  • Chances are that the problem is not on your machine, but a firewall somewhere. It could be on your router, at your ISP or on the server side. Are you sure you have the right port and protocol settings (STARTTLS, not SMTPS)? What happens if you try to connect to port 25 with telnet smtp.example.org 25 and tcptraceroute smtp.example.org 25? And with port 465 (SMTPS)? Aug 27, 2019 at 6:56

1 Answer 1


"Which tells me this must be a problem on my side, not from the server."

Nope. That tells you that a machine named smtp.example.org exists, it has, and about 91ms average roundtrip latency. Nothing more than that.

Once you try to do something more complex than sending an icmp echo request, some security trigger on example.org firewall might tell your machine that smtp.example.org doesn't exist, hence the error message you get from mutt.

But it's more likely the syntax you've used is wrong

set smtp_url     = smtp://$imap_user:[email protected]

From neomutt's manual:

NeoMutt can then attempt to encrypt communication with remote servers if these protocols are suffixed with “s” for “secure communication”.

Try adding a "s" to the url. This will attempt a connection using ssl/tls.

set smtp_url     = smtps://$imap_user:[email protected]

But first check if both smtp (optional feature!) and ssl support (optional feature!) are compiled in

neomutt -v

If it doesn't work you should be looking at your provider's info. Does it support SASL? If the auth is via SASL, you must configure the SASL part.


  • The configuration in the question enables STARTTLS. That's on the regular SMTP port, not on the SMTPS port. Aug 27, 2019 at 6:53
  • @Gilles agreed. But we don't have enough info. We don't know what the provider supports (ssl, tls or sasl?). We are betting here... so... we can just guess and bet.
    – Anichang
    Aug 27, 2019 at 7:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .