[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[msmtp-users] Not specifying password in .msptprc breaks sendmail-mode behavior



Hi,

I've recently hit following problem -- if one omits password
field in .msmtprc and doesn't have .netrc nor keychain then
msmtp tries to read password from stdin.  Problem is, that
usually stdin might (and usually does) contain mail itself.

Here's where fun begins:
 - if msmtp is run from terminal, getpass() opens /dev/tty
   and reads password from there,
 - otherwise password is read from stdin, namely first line
   of mail message is used as password.
(At least this is what I've been able to understand from short
look at the code.)

IMHO "ideal" would be if msmtp would ask for the password
after reading mail from stdin, but that's not as simple as I hoped.
msmtp starts smtp session before reading mail from stdin, which
is great as it doesn't need to keep entire mail in memory, but
gives us problem just as decribed.

Of course I might be completly wrong and/or missing something,
feel free to correct me.

Thanks for your work on msmtp!