Configurable 'X-Bogosity' message
David Relson
relson at osagesoftware.com
Sun Oct 6 21:11:45 CEST 2002
Adrian,
So, the default has changed from "X-Spam-Status" to "X-Bogosity". I'll
update lexer.l which handles the task of removing
SPAM_HEADER_LINES. Although the old lexer.l removed lines beginning with
"X-Spam-*:", I think that the new version will be slightly more limited.
David
Below is the code that will do the task:
Index: lexer.l
===================================================================
RCS file: /cvsroot/bogofilter/bogofilter/lexer.l,v
retrieving revision 1.6
diff -u -r1.6 lexer.l
--- lexer.l 6 Oct 2002 01:44:17 -0000 1.6
+++ lexer.l 6 Oct 2002 19:10:15 -0000
@@ -11,6 +11,7 @@
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
+#include "config.h"
#include "lexer.h"
// Our lexical analysis is different from Paul Graham's rules:
@@ -55,9 +56,13 @@
{
char *returned;
+ static int hdrlen = 0;
+ if (hdrlen==0)
+ hdrlen=strlen(SPAM_HEADER_NAME);
+
returned = fgets(buf, max_size, yyin);
- while (returned != NULL && memcmp(buf,"X-Spam-",6) == 0)
+ while (returned != NULL && memcmp(buf,SPAM_HEADER_NAME,hdrlen) == 0)
{
do {
returned = fgets(buf, max_size, yyin);
More information about the bogofilter-dev
mailing list