Re: imap_pass == smtp_pass ?

2020-12-14 Thread Will Yardley
On Mon, Dec 14, 2020 at 09:29:26PM +, markol...@danwin1210.me wrote:
> On 201119-07:42-0500, Philippe Meunier wrote:
> > 
> > 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"?

> I'm not sure about the other replies you got, they are probably not as
> good as the following.
> 
> set imap_pass = "`gpg --batch -q --decrypt
> /home/$USER/.mutt/file_with_my_encrypted_pass`" ; 
> 
> in your .muttrc

Definitely +1ing the original post - would love to see this feature.
When I used Mutt with imap, I did not save my password in a file
(encrypted or not), and, especially when using a long app password for
gmail, would often have to enter it once when opening up mutt, and then
enter it again when sending mail.

Since it's very common for the two passwords to be the same for a given
account, it would be nice to be able to have mutt use a cleartext
password that it already has in memory.

I'm not sure how easy it would be at a nuts and bolts level to
implement, though, since one could have multiple imap / smtp servers
defined via hooks - there would have to be some kind of glue to tell
mutt "use the same password as this IMAP host for this SMTP host", so
this may be why a feature like this does not currently exist.

w



Re: imap_pass == smtp_pass ?

2020-12-14 Thread markolind
On 201119-07:42-0500, Philippe Meunier wrote:
> 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"?
> 
> Thanks,
> 
> Philippe
> 
Hi Philippe!

I'm not sure about the other replies you got, they are probably not as good as 
the following.

set imap_pass = "`gpg --batch -q --decrypt 
/home/$USER/.mutt/file_with_my_encrypted_pass`" ; 

in your .muttrc

Pls. find it all in the Mutt manual.

Mark Olind


signature.asc
Description: PGP signature


Re: imap_pass == smtp_pass ?

2020-11-19 Thread Hokan
> set smtp_pass="$imap_pass"

This is the core of what you need however $imap_pass gets filled in (even 
interactively).

-- 
Hokan
Bicyclist
Sysadmin


Re: imap_pass == smtp_pass ?

2020-11-19 Thread isdtor
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.



imap_pass == smtp_pass ?

2020-11-19 Thread Philippe Meunier
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"?

Thanks,

Philippe