*/
#define FIX_NON_Y2K_COMPLIANT_MUA_DATES 1
-/*
- * Directs inc/slocal to extract the envelope sender from "From "
- * line. If inc/slocal is saving message to folder, then this
- * sender information is then used to create a Return-Path
- * header which is then added to the message.
- */
-#define RPATHS 1
-
/***** END USER CONFIGURATION SECTION *****/
@TOP@
int uprf(char *, char *);
int vfgets(FILE *, char **);
char *write_charset_8bit(void);
-
-#ifdef RPATHS
int get_returnpath(char *, int, char *, int);
-#endif
/*
** prototypes for compatibility functions in library
return (state);
}
-
-#ifdef RPATHS
static char unixbuf[BUFSIZ] = "";
-#endif /* RPATHS */
void
m_unknown(FILE *iob)
&& strncmp(text, "From ", 5) == 0) {
msg_style = MS_MBOX;
delimstr = "\nFrom ";
-#ifndef RPATHS
- while ((c = getc(iob)) != '\n' && c >= 0)
- ;
-#else /* RPATHS */
cp = unixbuf;
while ((c = getc(iob)) != '\n' && cp - unixbuf < BUFSIZ - 1)
*cp++ = c;
*cp = 0;
-#endif /* RPATHS */
} else {
/* not a Unix style maildrop */
adios(NULL, "No Unix style (mbox) maildrop.");
register long pos = 0L;
register int i;
char text[10];
-#ifdef RPATHS
register char *cp;
-#endif /* RPATHS */
pos = ftell(iob);
if ((i = fread(text, sizeof *text, edelimlen, iob)) != edelimlen
}
if (msg_style == MS_MBOX) {
-#ifndef RPATHS
- while ((c = getc(iob)) != '\n')
- if (c < 0)
- break;
-#else /* RPATHS */
cp = unixbuf;
while ((c = getc(iob)) != '\n' && c >= 0 && cp - unixbuf < BUFSIZ - 1)
*cp++ = c;
*cp = 0;
-#endif /* RPATHS */
}
return 1;
}
-#ifdef RPATHS
/*
** Return the Return-Path and Delivery-Date
** header information.
unixbuf[0] = 0;
return 1;
}
-#endif /* RPATHS */
static unsigned char *
FILE *scnout = NULL;
char name[NAMESZ];
static int rlwidth, slwidth;
-
-#ifdef RPATHS
char returnpath[BUFSIZ];
char deliverydate[BUFSIZ];
-#endif
/* first-time only initialization */
if (!scanl) {
}
if ((scnout = fopen(scnmsg, "w")) == NULL)
adios(scnmsg, "unable to write");
-#ifdef RPATHS
/*
** Add the Return-Path and Delivery-Date
** header fields to message.
FPUTS("Delivery-Date: ");
FPUTS(deliverydate);
}
-#endif /* RPATHS */
}
/* scan - main loop */
if (first) {
first = 0;
if (strncmp(buffer, "From ", i)==0) {
-#ifdef RPATHS
char *fp, *cp, *hp, *ep;
-#endif
/*
** get copy of envelope information
** ("From " line)
*/
envelope = getcpy(buffer);
-#ifdef RPATHS
/*
** Now create a "Return-Path:" line
** from the "From " line.
if (ferror(ffp)) {
goto fputs_error;
}
-#endif
/* Put the delivery date in message */
fputs(ddate, ffp);
if (ferror(ffp)) {