Custom Search

Tuesday, May 27, 2014

How to Configure MUTT Email Client With Gmail

* .muttrc is the file where you will usually place your commands to configure Mutt.

a)
#sudo apt-get install mutt



b)
Create .muttrc file
#vim ~/.muttrc
----------------------------
set from = "sajuptpm@gmail.com"
set realname = "Saju"
set imap_user = "sajuptpm@gmail.com"
set imap_pass = "xxxxxx"

##REMOTE GMAIL FOLDERS
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set postponed ="+[Google Mail]/Drafts"
set trash = "+[Google Mail]/Trash"

##SMTP Settings to sent email
set smtp_url = "smtp://sajuptpm@smtp.gmail.com:587/"
set smtp_pass = "xxxxxx"

##LOCAL FOLDERS FOR CACHED HEADERS AND CERTIFICATES
set header_cache =~/.mutt/cache/headers
set message_cachedir =~/.mutt/cache/bodies
set certificate_file =~/.mutt/certificates

##SECURING
set move = no  #Stop asking to "move read messages to mbox"!
set imap_keepalive = 900

##Sort by newest conversation first.
set sort = reverse-threads
set sort_aux = last-date-received

##Set editor to create new email
set editor='vim'

c)
Consolify your Gmail with MUTT

http://www.bartbania.com/index.php/consolify-your-gmail-with-mutt/

https://gist.github.com/kaleb/1289741

http://jlime.com/wiki/documentation/user/general/howtos/gmail_mutt

http://dgiakoumakis.wordpress.com/2010/04/02/how-to-configure-mutt-with-you-google-apps-account-using-imap/

http://dev.mutt.org/trac/wiki/MuttGuide/UseIMAP






d)
Mailing lists

http://www.mutt.org/doc/manual/manual.html#toc3.9

e)
Handling Mailing Lists

http://www.mutt.org/doc/manual/manual.html#toc4.8

f)
.muttrc

http://www.davep.org/mutt/muttrc/
http://phdru.name/Software/dotfiles/muttrc.html

g)
https://wiki.archlinux.org/index.php/mutt
https://wiki.debian.org/Mutt

h)
http://lugatgt.org/content/mutt/downloads/presentation.pdf

8 comments:

  1. Thank you for this simple effective tutorial. I really wanted to use Mutt and tried several different tutorials. This is the only one that got it up and running. Worked the first time, Go Mutt. Go Vim.
    N00b

    ReplyDelete
  2. Thanks for this great tutorial. It saved me lot of trouble.

    ReplyDelete
  3. Hello when I am sending an mail I am getting the follwoing error :

    Invalid SMTP URL: smtp://myname@smtp.gmail.com:587­/

    ReplyDelete
    Replies
    1. you forgot to edit that line on .muttrtc, you need to change "myname" to your email

      Delete
  4. >LANG=en_EN.UTF-8 mutt
    Error in /home//.muttrc, line 10: trash: unknown variable
    source: errors in /home//.muttrc
    Press any key to continue...

    version of mutt is

    LANG=en_EN.UTF-8 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: Linux 3.16.7-24-desktop (x86_64)
    ncurses: ncurses 5.9.20140831 (compiled with 5.9)
    libidn: 1.31 (compiled with 1.28)
    hcache backend: GDBM version 1.11. 25/12/2013
    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 +COMPRESSED +HAVE_WC_FUNCS +HAVE_LANGINFO_CODESET +HAVE_LANGINFO_YESEXPR
    +HAVE_ICONV -ICONV_NONTRANS +HAVE_LIBIDN +HAVE_GETSID +USE_HCACHE
    ISPELL="/usr/bin/ispell"
    SENDMAIL="/usr/sbin/sendmail"
    MAILPATH="/var/mail"
    PKGDATADIR="/usr/share/mutt"
    SYSCONFDIR="/etc"
    EXECSHELL="/bin/sh"
    -MIXMASTER
    To contact the developers, please mail to .
    To report a bug, please visit http://bugs.mutt.org/.

    patch-1.5.3.vk.pgp_verbose_mime
    patch-1.5.9.aw.listreply.1
    patch-1.5.21.sidebar.20120829.txt
    patch-1.5.19.rr.compressed.1
    patch-1.5.5.1.nt.xtitles.3.ab.1

    ReplyDelete
  5. hello i use this tutorial but i get this error
    Could not connect to imap.gmail.com (Interrupted system call).
    can you help me?

    ReplyDelete
  6. Hi: Great Tutorial.. thanks for sharing. Add please that you have to enable on Google account settiings "enable access to less secure apps" (https://support.google.com/accounts/answer/6010255?hl=en). If you don't do it.. will not work.

    ReplyDelete
  7. Also.. add set smtp_authenticators = 'gssapi:login' on the config... :-)

    ReplyDelete