[mew-int 01837] Patch: keep Envelope Sender

Jonathan rise at example.com
Sun Jul 18 06:09:26 JST 2004


Below is a patch to incm.c to cause it to keep the Envelope Sender
("From " line) when incorporating mail.  The primary rationale for
this is that for Bayesian-style spam filters it's often a
statistically significant feature.  Procmail keeps it when delivering
mail and passes it to filters, so this also has the advantage of
greater consistency between mail retrieved by incm and mail delivered
by procmail.  I've just regenerated the patch against a fresh CVS
checkout, but I've been using it for more than six months with no
issues.

-- 
Jonathan Conway                                                rise at example.com


diff -urN mew/bin/incm.c mew-incm-patch/bin/incm.c
--- mew/bin/incm.c	2004-06-30 02:31:52.000000000 -0600
+++ mew-incm-patch/bin/incm.c	2004-07-17 14:47:27.249369153 -0600
@@ -676,6 +676,9 @@
 				dstfp = open_new_inbox_file(&seq, inboxfile);
 				if (dstfp == NULL)
 					goto rerr;
+				if (fputs(ln, dstfp) == EOF) {
+				  warning("fputs(%s)", inboxfile);  goto werr;
+				}
 				state = ST_HEADER;
 			}
 			break;
@@ -706,6 +709,9 @@
 				dstfp = open_new_inbox_file(&seq, inboxfile);
 				if (dstfp == NULL)
 					goto rerr;
+				if (fputs(ln, dstfp) == EOF) {
+				  warning("fputs(%s)", inboxfile);  goto werr;
+				}
 				state = ST_HEADER;
 				break;
 			}



More information about the Mew-int mailing list