[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [msmtp-users] Patch: retrieve password from /etc/netrc?
On Mon, Dec 01, 2008 at 09:21:30PM +0100, Martin Lambers wrote:
> On Sat, 29. Nov 2008, 05:09:03 -0500, Jim Pryor wrote:
> > msmtp already has the capacity to read passwords from a ~/.netrc file.
> > However, I'd prefer to keep the password in /etc/netrc, because I have a number
> > of system-level daemons and cron jobs emailing me. They won't know what
> > user to get the password from.
>
> So they are using /etc/msmtprc? Why not store the password there?
Yes, they use /etc/msmtprc. But I need to supply the password to a number of
utilities: at least msmtp, getmail, and offlineimap. (I use both getmail
and offlineimap for different parts of my mail flow.) If I store the
password in /etc/msmtprc, then I have to (1) resort to sed'ing the config
file to extract the password for the other utils to use, or (2) storing
the password in multiple config files.
(2) isn't that much of a pain, but I had gotten to the point of having
my mail password stored in five or six different locations. I'm trying
to cut that down, without needing anything as elaborate as
gnome-keyring.
> > I propose the following patch against msmtp 1.4.16, which tells msmtp
> > to check for a /etc/netrc file if it can't find one at ~/.netrc.
>
> As far as I know, other program only support ~/.netrc and not
> /etc/netrc, so this step would introduce a new system-level
> configuration file that only msmtp uses.
That may be. I haven't either come across other programs which support
system-level netrc. However, I have at this same time also submitted
patches to getmail and offlineimap to introduce the same functionality.
So I'll hope that between them, /etc/netrc might be recognized as useful and
catch on.
--
Jim Pryor
jim@...173...