- const char *from;
- int parendepth, state, has_host_part;
- char mycopy[MSGBUFSIZE+1];
-
- if (strncmp("From: ", buf, 6)
- && strncmp("To: ", buf, 4)
- && strncmp("Reply-", buf, 6)
- && strncmp("Cc: ", buf, 4)
- && strncmp("Bcc: ", buf, 5)) {
- return;
+ char *from, *cp, last_nws = '\0', *parens_from = NULL;
+ int parendepth, state, has_bare_name_part, has_host_part;
+#ifndef MAIN
+ int addresscount = 1;
+#endif /* MAIN */
+
+ if (strncasecmp("From:", buf, 5)
+ && strncasecmp("To:", buf, 3)
+ && strncasecmp("Reply-To:", buf, 9)
+ && strncasecmp("Return-Path:", buf, 12)
+ && strncasecmp("Cc:", buf, 3)
+ && strncasecmp("Bcc:", buf, 4)
+ && strncasecmp("Resent-From:", buf, 12)
+ && strncasecmp("Resent-To:", buf, 10)
+ && strncasecmp("Resent-Cc:", buf, 10)
+ && strncasecmp("Resent-Bcc:", buf, 11)
+ && strncasecmp("Apparently-From:", buf, 16)
+ && strncasecmp("Apparently-To:", buf, 14)
+ && strncasecmp("Sender:", buf, 7)
+ && strncasecmp("Resent-Sender:", buf, 14)
+ ) {
+ return(buf);
+ }
+
+#ifndef MAIN
+ if (outlevel >= O_DEBUG) {
+ report_build(stdout, GT_("About to rewrite %s...\n"), (cp = sdump(buf, BEFORE_EOL(buf))));
+ xfree(cp);