My .muttrc file looks something like this one or see below a glimpse. I am hesitant with the password. How should I store my password to use it with Mutt?

set imap_user = "username@gmail.com"
set imap_pass = "password"

set smtp_url = "smtp://username@smtp.gmail.com:587/"
set smtp_pass = "password"
set from = "username@gmail.com"
set realname = "Your Real Name"
link|improve this question

63% accept rate
3  
In the post you linked, I already wrote "Make sure your ~/.muttrc isn’t world-readable; it contains your password. (Alternatively, you can leave them out and mutt will prompt you for the password each time.)" :-) – ShreevatsaR Jul 18 '10 at 16:36
feedback

migrated from superuser.com Sep 12 '11 at 22:28

This question came from our site for computer enthusiasts and power users.

1 Answer

up vote 19 down vote accepted

This tweak should get rid of your problem. Use gpg as suggested, or

set imap_pass=`getpassword email_id`

where you use pwsafe or passwords to fetch the passwords.

Edit: If mutt is built with IMAP support (--enable-imap), then mutt should prompt you for the password if you do not set it in the config file. From the manual:

imap_pass

Type: string Default: ""

Specifies the password for your IMAP account. If unset, Mutt will prompt you for your password when you invoke the fetch-mail function. Warning: you should only use this option when you are on a fairly secure machine, because the superuser can read your muttrc even if you are the only one who can read the file.

link|improve this answer
7  
+1 have mutt ask you for it. You should only have to enter it once per session. – David Mackintosh Aug 28 '09 at 14:08
feedback

Your Answer

 
or
required, but never shown

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