Path: utzoo!attcan!uunet!cs.utexas.edu!sun-barr!ccut!wnoc-tyo-news!astemgw!ohm From: ohm@astem.or.jp (MORISHIMA Akitoshi) Newsgroups: comp.mail.mh Subject: Re: question about mh/pop Message-ID: Date: 20 Oct 90 21:11:54 GMT References: <1990Oct17.185845.12113@engin.umich.edu> Sender: news@astem.or.jp Organization: ASTEM Research Institute, Kyoto, Japan. Lines: 103 In-reply-to: paul@caen.engin.umich.edu's message of 17 Oct 90 18:58:45 GMT >>>>> 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; } ======================================================================