Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to set up mutt for gmail. I am following instructions at http://crunchbanglinux.org/wiki/howto/howto_setup_mutt_with_gmail_imap, however, after putting

set from = "yourusername@gmail.com"
set realname = "Your Real Name"

set imap_user = "yourusername@gmail.com"
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 1.4.2.3i.

Update:

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:
-DOMAIN
-DEBUG
-HOMESPOOL  +USE_SETGID  +USE_DOTLOCK  +DL_STANDALONE  +USE_FCNTL  -USE_FLOCK   
+USE_POP  +USE_IMAP  -USE_SMTP  
-USE_SSL_OPENSSL  -USE_SSL_GNUTLS  -USE_SASL  -USE_GSS  +HAVE_GETADDRINFO  
+HAVE_REGCOMP  -USE_GNU_REGEX  
+HAVE_COLOR  +HAVE_START_COLOR  +HAVE_TYPEAHEAD  +HAVE_BKGDSET  
+HAVE_CURS_SET  +HAVE_META  +HAVE_RESIZETERM  
+CRYPT_BACKEND_CLASSIC_PGP  +CRYPT_BACKEND_CLASSIC_SMIME  -CRYPT_BACKEND_GPGME  
-EXACT_ADDRESS  -SUN_ATTACHMENT  
+ENABLE_NLS  -LOCALES_HACK  +HAVE_WC_FUNCS  +HAVE_LANGINFO_CODESET  +HAVE_LANGINFO_YESEXPR  
+HAVE_ICONV  -ICONV_NONTRANS  +HAVE_LIBIDN  +HAVE_GETSID  -USE_HCACHE  
-ISPELL
SENDMAIL="/usr/sbin/sendmail"
MAILPATH="/var/mail"
PKGDATADIR="/opt/local/share/mutt"
SYSCONFDIR="/opt/local/etc"
EXECSHELL="/bin/sh"
-MIXMASTER
To contact the developers, please mail to <mutt-dev@mutt.org>.
To report a bug, please visit http://bugs.mutt.org/.

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

Connecting to gmail.com...

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?

Update:

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 stackoverflow.com 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
1  
Did you set the rest of the file up? Here's my file (sans passwords) sprunge.us/RKdW –  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

1 Answer 1

up vote 3 down vote accepted

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

FLAG like +USE_IMAP and +USE_SMTP

if you want use IMAP ,in your muttrc must have

set imap_user = "YOUR.EMAIL@gmail.com"
set imap_pass = "PASSWORD" 
set folder = "imaps://imap.gmail.com:993"
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

IMAP?
Maybe you wanted is SMTP

set smtp_url = "smtp://yourusername@smtp.gmail.com:587/"
set smtp_pass = "yourpassword"

or you can install external programs like esmtp or msmtp

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.