> These patches were made against nmh-0.27, so they might need to be
> tweaked to work with nmh-1.x.
Thanks! I think the patch below is the minimal set of diffs between
1.0 and 1.0 with RPOP. I do not know that RPOP works; at the moment I
am behind a firewall. My old copy of mh coredumps on 'inc -file',
which is what prompted the upgrade in the first place. When I know
more I will report it here.
Another member of the League for Programming Freedom (LPF) http://www.lpf.org
-------------------------------------------------------------------------------
Brian Bartholomew - [EMAIL PROTECTED] - www.wv.com - Working Version, Cambridge, MA
diff -cr nmh-1.0-nopop/acconfig.h nmh-1.0/acconfig.h
*** nmh-1.0-nopop/acconfig.h Sat Jan 23 21:27:41 1999
--- nmh-1.0/acconfig.h Fri Apr 30 13:47:22 1999
***************
*** 192,197 ****
--- 192,205 ----
#undef POP
/*
+ * Define this to compile client-side support for RPOP into
+ * inc and msgchk. Do not change this value manually. You
+ * must run configure with the '--enable-nmh-rpop' option
+ * to correctly build the rpop client support.
+ */
+ #undef RPOP
+
+ /*
* Define this to compile client-side support for kpop
* (kerberized pop) into inc and msgchk. Do not change this
* value manually. You must run configure with the option
diff -cr nmh-1.0-nopop/config.h.in nmh-1.0/config.h.in
*** nmh-1.0-nopop/config.h.in Sat Jan 23 21:27:49 1999
--- nmh-1.0/config.h.in Fri Apr 30 13:47:22 1999
***************
*** 237,242 ****
--- 237,250 ----
#undef POP
/*
+ * Define this to compile client-side support for RPOP into
+ * inc and msgchk. Do not change this value manually. You
+ * must run configure with the '--enable-nmh-rpop' option
+ * to correctly build the rpop client support.
+ */
+ #undef RPOP
+
+ /*
* Define this to compile client-side support for kpop
* (kerberized pop) into inc and msgchk. Do not change this
* value manually. You must run configure with the option
diff -cr nmh-1.0-nopop/configure.in nmh-1.0/configure.in
*** nmh-1.0-nopop/configure.in Thu Aug 27 00:59:39 1998
--- nmh-1.0/configure.in Fri Apr 30 13:47:22 1999
***************
*** 95,100 ****
--- 95,108 ----
AC_DEFINE(HESIOD)dnl
fi
+ dnl Do you want client-side support for RPOP
+ undefine([nmh-rpop])dnl
+ AC_ARG_ENABLE(nmh-rpop,
+ [ --enable-nmh-rpop enable client-side support for pop])
+ if test x$enable_nmh_rpop = xyes; then
+ AC_DEFINE(RPOP)dnl
+ fi
+
dnl Do you want to debug nmh?
undefine([nmh-debug])dnl
AC_ARG_ENABLE(nmh-debug,
diff -cr nmh-1.0-nopop/uip/Makefile.in nmh-1.0/uip/Makefile.in
*** nmh-1.0-nopop/uip/Makefile.in Sat Feb 6 16:44:09 1999
--- nmh-1.0/uip/Makefile.in Fri Apr 30 13:47:52 1999
***************
*** 257,262 ****
--- 257,264 ----
$(LN) $(bindir)/folder $(bindir)/folders
$(LN) $(bindir)/show $(bindir)/prev
$(LN) $(bindir)/show $(bindir)/next
+ chown root.root $(bindir)/msgchk $(bindir)/inc
+ chmod a+rx,u+s $(bindir)/msgchk $(bindir)/inc
# install misc support binaries
install-misc:
diff -cr nmh-1.0-nopop/uip/inc.c nmh-1.0/uip/inc.c
*** nmh-1.0-nopop/uip/inc.c Wed Aug 26 14:17:29 1998
--- nmh-1.0/uip/inc.c Fri Apr 30 13:47:52 1999
***************
*** 102,107 ****
--- 102,109 ----
{ "help", 4 },
#define SNOOPSW 22
{ "snoop", -5 },
+ #define NPOPSW 23
+ { "nopop", 0 },
{ NULL, 0 }
};
***************
*** 156,162 ****
{
int chgflag = 1, trnflag = 1;
int noisy = 1, width = 0, locked = 0;
! int rpop, i, hghnum, msgnum;
char *cp, *maildir, *folder = NULL;
char *format = NULL, *form = NULL;
char *newmail, *host = NULL, *user = NULL;
--- 158,170 ----
{
int chgflag = 1, trnflag = 1;
int noisy = 1, width = 0, locked = 0;
! #ifdef RPOP
! int rpop = 1;
! #else
! int rpop = 0;
! #endif RPOP
! int nopop = 0;
! int i, hghnum, msgnum;
char *cp, *maildir, *folder = NULL;
char *format = NULL, *form = NULL;
char *newmail, *host = NULL, *user = NULL;
***************
*** 309,318 ****
--- 317,328 ----
continue;
case HOSTSW:
+ nopop = 0;
if (!(host = *argp++) || *host == '-')
adios (NULL, "missing argument to %s", argp[-2]);
continue;
case USERSW:
+ nopop = 0;
if (!(user = *argp++) || *user == '-')
adios (NULL, "missing argument to %s", argp[-2]);
continue;
***************
*** 333,338 ****
--- 343,349 ----
continue;
case APOPSW:
+ nopop = 0;
rpop = -1;
continue;
case NAPOPSW:
***************
*** 349,354 ****
--- 360,369 ----
case SNOOPSW:
snoop++;
continue;
+
+ case NPOPSW:
+ nopop++;
+ continue;
}
}
if (*cp == '+' || *cp == '@') {
***************
*** 367,373 ****
#endif /* MAILGROUP */
#ifdef POP
! if (host && !*host)
host = NULL;
if (from || !host || rpop <= 0)
setuid (getuid ());
--- 382,388 ----
#endif /* MAILGROUP */
#ifdef POP
! if (host && !*host || nopop)
host = NULL;
if (from || !host || rpop <= 0)
setuid (getuid ());
diff -cr nmh-1.0-nopop/uip/msgchk.c nmh-1.0/uip/msgchk.c
*** nmh-1.0-nopop/uip/msgchk.c Wed Aug 26 14:19:47 1998
--- nmh-1.0/uip/msgchk.c Fri Apr 30 13:47:52 1999
***************
*** 63,69 ****
--- 63,72 ----
{ "help", 4 },
#define SNOOPSW 12
{ "snoop", -5 },
+ #define NPOPSW 13
+ { "nopop", 0 },
{ NULL, 0 }
+
};
/*
***************
*** 101,107 ****
main (int argc, char **argv)
{
int datesw = 1, notifysw = NT_ALL;
! int rpop, status = 0;
int snoop = 0, vecp = 0;
uid_t uid;
char *cp, *host = NULL, *user, buf[BUFSIZ];
--- 104,116 ----
main (int argc, char **argv)
{
int datesw = 1, notifysw = NT_ALL;
! int nopop = 0;
! #ifdef RPOP
! int rpop = 1;
! #else
! int rpop = 0;
! #endif RPOP
! int status = 0;
int snoop = 0, vecp = 0;
uid_t uid;
char *cp, *host = NULL, *user, buf[BUFSIZ];
***************
*** 176,185 ****
--- 185,196 ----
continue;
case HOSTSW:
+ nopop = 0;
if (!(host = *argp++) || *host == '-')
adios (NULL, "missing argument to %s", argp[-2]);
continue;
case USERSW:
+ nopop = 0;
if (!(cp = *argp++) || *cp == '-')
adios (NULL, "missing argument to %s", argp[-2]);
if (vecp >= MAXVEC-1)
***************
*** 189,194 ****
--- 200,206 ----
continue;
case APOPSW:
+ nopop = 0;
rpop = -1;
continue;
case NAPOPSW:
***************
*** 197,210 ****
case RPOPSW:
rpop = 1;
continue;
case NRPOPSW:
rpop = 0;
continue;
-
case SNOOPSW:
snoop++;
continue;
}
}
if (vecp >= MAXVEC-1)
--- 209,226 ----
case RPOPSW:
rpop = 1;
+ nopop = 0;
continue;
case NRPOPSW:
rpop = 0;
+ nopop = 0;
continue;
case SNOOPSW:
snoop++;
continue;
+ case NPOPSW:
+ nopop++;
+ continue;
}
}
if (vecp >= MAXVEC-1)
***************
*** 239,245 ****
if (pophost && *pophost)
host = pophost;
}
! if (!host || !*host)
host = NULL;
if (!host || rpop <= 0)
setuid (uid);
--- 255,261 ----
if (pophost && *pophost)
host = pophost;
}
! if (!host || !*host || nopop)
host = NULL;
if (!host || rpop <= 0)
setuid (uid);
***************
*** 386,391 ****
--- 402,408 ----
ruserpass (host, &user, &pass);
/* open the POP connection */
+ /* fprintf(stderr, "msgchk: opening POP connection; RPOP=%d\n", rpop); */
if (pop_init (host, user, pass, snoop, rpop) == NOTOK
|| pop_stat (&nmsgs, &nbytes) == NOTOK /* check for messages */
|| pop_quit () == NOTOK) { /* quit POP connection */