Philippe Meunier writes:
> Hello,
> 
> I use an IMAPS server for reading email and an STMPS server for sending
> email.  Both servers use the same password, which I think is a fairly
> common setup.
> 
> I know about imap_pass and smtp_pass but I don't want to write my password
> in my .muttrc for security reasons (my $HOME is on an NFS partition, among
> other things).
> 
> So is there a way to tell mutt something along the lines of: "prompt me
> interactively for imap_pass when needed, but once you know imap_pass then
> just re-use the same password for smtp_pass; and vice versa"?

source "gpg -q -d ~/.mutt/bla.gpg |"
set folder="imaps://imap.bla.com:993"
set from="u...@bla.com"
set imap_user="$from"
set smtp_url="smtp://$imap_u...@smtp.bla.com:587"

$ gpg -dq bla.gpg
set imap_pass="theH0lyGrail"
set smtp_pass="$imap_pass"
$ 

The prompting is done by pinentry, and the storage is provided by gpg-agent. 
How long the password is stored is controlled by 
gpg-agent.conf:default-cache-ttl.

Reply via email to