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

Bug#2369: MH's msgchk command does not work with POP

When using Post Office Protocol (POP) to access mail across a network
from a POP server, the "-norpop" option causes the inc and msgchk
commands to get the password needed to access the POP server from the
"~/.netrc" file.  However, while inc is able to do this, msgchk

For example, "inc -norpop -host hostname -user username" retrieves
mail normally, but the following command gives an error:

$ msgchk -norpop -host hostname -user username
msgchk: -ERR Password supplied for "username" is incorrect.

The password is extracted from "~/.netrc" file by the "ruserpass(host,
aname, apass)" function in "ruserpass.c".  Since this function will
store the password in the location pointed to by the "apass" parameter
only if this parameter points to a NULL pointer, the bug can be fixed
by initializing "pass" in the "remotemail" function in "msgchk.c" to
NULL.  This patch fixes the problem:

--- uip/msgchk.c.orig	Tue Nov 30 23:01:36 1993
+++ uip/msgchk.c	Mon Feb 19 18:13:49 1996
@@ -389,7 +389,7 @@
     int     nmsgs,
-    char   *pass;
+    char   *pass = NULL;

     if (user == NULL)
 	user = getusr ();

Brian Mays

Reply to: