paul@caen.engin.umich.edu (Paul Killey) (10/18/90)
I notice that when one "incs" from their mailbox, the From line will be written as Return-Path, assuming #ifdef RPATHS is true. When one "incs" from a pop-server, the From line is not rewritten, even if RPATHS is true. This happens as a side effect of scan() being called with an outnum of 0 when popping, instead of msgnum or msgnum + 1, as is the case when not using pop. Is there a short answer as to why From -> Return-Path is turned off when inc is a pop client, and not otherwise? Thanks for any tips. --paul
ohm@astem.or.jp (MORISHIMA Akitoshi) (10/21/90)
>>>>> On 17 Oct 90 18:58:45 GMT, paul@caen.engin.umich.edu (Paul >>>>> Killey) said: paul> When one "incs" from a pop-server, the From line is not paul> rewritten, even if RPATHS is true. paul> Is there a short answer as to why From -> Return-Path is turned paul> off when inc is a pop client, and not otherwise? I think it's simply a bug that happened during merging the POP staff into inc, or the implementer didn't the rewriting very important comared to the amount of things to do so... I've fixed this in a not so smart fashion, but it SURE works. Below are the patches. -- Akitoshi ====================================================================== diff -rc mh-6.7/sbr/m_getfld.c mh-6.7.install/sbr/m_getfld.c *** mh-6.7/sbr/m_getfld.c Fri Apr 13 05:29:01 1990 --- mh-6.7.install/sbr/m_getfld.c Tue Apr 17 23:52:37 1990 *************** *** 421,427 **** --- 421,434 ---- /* */ #ifdef RPATHS + /* patch for POP on Apr. 17th '90 by ohm@astem.or.jp static char unixbuf[BUFSIZ] = ""; + */ + #ifndef POP + static + #endif + char unixbuf[BUFSIZ] = ""; + /* end of patch */ #endif RPATHS void diff -rc mh-6.7/uip/inc.c mh-6.7.install/uip/inc.c *** mh-6.7/uip/inc.c Fri Apr 13 05:29:28 1990 --- mh-6.7.install/uip/inc.c Wed Apr 18 16:02:26 1990 *************** *** 118,123 **** --- 118,130 ---- static long pos; static long start; static long stop; + /* patch for RPATHS on Apr. 17th '90 by ohm@astem.or.jp */ + static int unixchecked = 0; + #ifdef RPATHS + extern char unixbuf[]; + extern char *unixline(); + #endif RPATHS + /* end of patch */ static int pd = NOTOK; static FILE *pf = NULL; *************** *** 510,515 **** --- 517,525 ---- adios (cp, "unable to write"); (void) chmod (cp, m_gmprot ()); start = stop = 0L; + /* patch for RPATHS on Apr. 17th. '90 by ohm@astem.or.jp */ + unixchecked = 0; + /* end of patch */ if (pop_retr (i, pop_action) == NOTOK) adios (NULLCP, "%s", response); *************** *** 793,798 **** --- 803,829 ---- static int pop_action (s) register char *s; { + /* patch for RPATHS on Apr. 17th '90 by ohm@astem.or.jp */ + register char *cp; + #ifdef RPATHS + char rpathbuf[BUFSIZ]; + #endif RPATHS + + if (!unixchecked) { + unixchecked = 1; + if (strncmp (s, "From ", 5) == 0) { + #ifdef RPATHS + strcpy (unixbuf, s + 5); + if ((cp = unixline()) && *cp != '\n') { + sprintf (rpathbuf, "Return-Path: %s", cp); + fprintf (pf, "%s", rpathbuf); + stop += strlen (s); + } + #endif RPATHS + return; + } + } + /* end of patch */ fprintf (pf, "%s\n", s); stop += strlen (s) + 1; } ======================================================================