Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to set up mutt for gmail. I am following instructions at, however, after putting

set from = ""
set realname = "Your Real Name"

set imap_user = ""
set imap_pass = "yourpassword"

(with my details, of course), I get

$ mutt
Error in $HOME/.muttrc, line 12: imap_user: unknown variable
Error in $HOME/.muttrc, line 13: imap_pass: unknown variable
source: errors in $HOME/.muttrc
Press any key to continue...

If I try to send an email, it doesn't work because instead of IMAP, it tries to send email directly from my localhost's mail system. Mutt says it is version Mutt


So I downloaded mutt-devel on Macports, which is 1.5:

$ mutt -v
Mutt 1.5.21 (2010-09-15)
Copyright (C) 1996-2009 Michael R. Elkins and others.
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
Mutt is free software, and you are welcome to redistribute it
under certain conditions; type `mutt -vv' for details.

System: Darwin 11.3.0 (x86_64)
ncurses: ncurses 5.9.20110404 (compiled with 5.9)
libiconv: 1.14
libidn: 1.22 (compiled with 1.22)
Compile options:
To contact the developers, please mail to <>.
To report a bug, please visit

As it stands, it is not configured to use smtp, but imap should be enabled. However, just starting mutt hangs on

Connecting to

Is there a way to check the logs or something to see if, say it can't find the server or the password is being rejected or something else?


After installing for ssl, imap, and smtp support, I still get these warnings/errors, even though it can connect to gmail.

Error in $HOME/.muttrc line 9: trash: unknown variable
Error in $HOME/.muttrc, line 11: header_cache: unknown variable
share|improve this question

migrated from Mar 22 '12 at 17:17

This question came from our site for professional and enthusiast programmers.

Everything worked following that guide with mutt 1.5.21, which is from 2010-09-15. The #! guide shows that setup because it's debian based, and the debian stable repo has 1.5.20 – Rob Mar 22 '12 at 17:51
Thanks, @Rob! I have updated to 1.5.21, and it seems I can't connect to gmail yet. – highBandWidth Mar 22 '12 at 22:21
Did you set the rest of the file up? Here's my file (sans passwords) – Rob Mar 22 '12 at 22:53
@Rob, thanks! However, it doesn't recognise some of the parameters like trash and header_cache. – highBandWidth Mar 30 '12 at 18:56
up vote 4 down vote accepted

First you can check is you mutt support IMAP and SMTP by exec
mutt -v


if you want use IMAP ,in your muttrc must have

set imap_user = ""
set imap_pass = "PASSWORD" 
set folder = "imaps://"
set spoolfile = "+INBOX" 

If I try to send an email, it doesn't work because instead of IMAP, it tries to send email directly from my localhost's mail system

Maybe you wanted is SMTP

set smtp_url = "smtp://"
set smtp_pass = "yourpassword"

or you can install external programs like esmtp or msmtp

share|improve this answer

You must log in to answer this question.

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