if (first) {
first = 0;
if (strncmp(buffer, "From ", i)==0) {
- char *fp, *cp, *hp, *ep;
+ char *fp, *cp;
/*
** get copy of envelope information
** ("From " line)
** Now create a "Return-Path:" line
** from the "From " line.
*/
- hp = cp = strchr(fp = envelope + i, ' ');
- while ((hp = strchr(++hp, 'r'))) {
- if (uprf(hp, "remote from")) {
- hp = strrchr(hp, ' ');
- break;
- }
- }
- if (hp) {
- /*
- ** return path for UUCP style
- ** addressing
- */
- ep = strchr(++hp, '\n');
- snprintf(buffer, sizeof(buffer), "Return-Path: %.*s!%.*s\n", (int)(ep - hp), hp, (int)(cp - fp), fp);
- } else {
- /*
- ** return path for standard domain
- ** addressing
- */
- snprintf(buffer, sizeof(buffer), "Return-Path: %.*s\n", (int)(cp - fp), fp);
- }
+ cp = strchr(fp = envelope + i, ' ');
+ snprintf(buffer, sizeof(buffer),
+ "Return-Path: %.*s\n",
+ (int)(cp - fp), fp);
/* Add Return-Path header to message */
fputs(buffer, ffp);