On July 27, 1998 at 20:10, Earl Hood wrote:
I did modify inc.c to support
a -pass option. Hence, a user can do the following in his/her
.mh_profile:
inc: -user juser -pass somepass
I the user sets the file permission to 600 (or 400), then it provides
at least the same level of security (if you can call it that) as
the .netrc file. I have not modified msgchk.
I am curious if the .netrc method is the prefered method, or if there
is interest in the change I made. If so, I can post the patch.
I do find it odd that I can specify -user and -host, but not -pass.
Is the .netrc the only way to specify one's password currently?
Having not heard anything positive or negative about the -pass
options, I figure I will post my patch and the maintainer of nmh
can choose do with it as he sees fit. Note, I did not patch
msgchk, but it should be straight-forward to do. There is no patch
for the docs.
Patch is against nmh-0.27:
*** inc.c.org Sun Jul 26 12:23:18 1998
--- inc.c Mon Jul 27 22:47:02 1998
***************
*** 106,112 ****
{ "help", 4 },
#define SNOOPSW 22
{ "snoop", -5 },
! { NULL, 0 }
};
extern int errno;
--- 106,116 ----
{ "help", 4 },
#define SNOOPSW 22
{ "snoop", -5 },
! #define PASSSW 23
! { "pass password", POPminc (-4) },
!
! /* End list */
! { NULL, 0 },
};
extern int errno;
***************
*** 319,324 ****
--- 323,332 ----
if (!(user = *argp++) || *user == '-')
adios (NULL, "missing argument to %s", argp[-2]);
continue;
+ case PASSSW:
+ if (!(pass = *argp++) || *pass == '-')
+ adios (NULL, "missing argument to %s", argp[-2]);
+ continue;
case PACKSW:
#ifndef POP
***************
*** 396,405 ****
if (inc_type == INC_POP) {
if (user == NULL)
user = getusername ();
! if (rpop > 0)
! pass = getusername ();
! else
ruserpass (host, &user, &pass);
/*
* initialize POP connection
--- 404,414 ----
if (inc_type == INC_POP) {
if (user == NULL)
user = getusername ();
! if (rpop > 0) {
! if (pass == NULL) pass = getusername ();
! } else {
ruserpass (host, &user, &pass);
+ }
/*
* initialize POP connection