summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2004-08-22 19:03:21 +0000
committerIan C <ianc@noddybox.co.uk>2004-08-22 19:03:21 +0000
commit79ebb3ff33dbcf841194bbc0932c070b055b1907 (patch)
tree9361056b960eb485d334b0faa14628ac833207d2 /src
parent718b54c985aa2fe7146df39176796ce4d6580504 (diff)
Added dumpheaders variableHEADmaster
Diffstat (limited to 'src')
-rw-r--r--src/config.c7
-rw-r--r--src/config.h3
-rw-r--r--src/kbs.c16
3 files changed, 25 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c
index 66ea944..cf1a751 100644
--- a/src/config.c
+++ b/src/config.c
@@ -71,6 +71,7 @@ typedef enum {
TOK_VarBlockHTML,
TOK_VarVerbose,
TOK_VarShowmatch,
+ TOK_VarDumpHeaders,
TOK_ConstOn,
TOK_ConstOff,
TOK_ConstBlock,
@@ -107,6 +108,7 @@ static int testmode=FALSE;
static int blockhtml=FALSE;
static int verbose=TRUE;
static int show_match=TRUE;
+static int dump_headers=FALSE;
static int no_macro=0;
static Macro *macro=NULL;
@@ -147,6 +149,7 @@ static const Command cmd_table[]=
{"blockhtml", TOK_VarBlockHTML},
{"verbose", TOK_VarVerbose},
{"showmatch", TOK_VarShowmatch},
+ {"dumpheaders", TOK_VarDumpHeaders},
/* Constants
*/
@@ -236,6 +239,7 @@ static int DoSet(FILE *fp)
{TOK_VarBlockHTML, TYPE_ONOFF, (void *)&blockhtml},
{TOK_VarVerbose, TYPE_ONOFF, (void *)&verbose},
{TOK_VarShowmatch, TYPE_ONOFF, (void *)&show_match},
+ {TOK_VarDumpHeaders, TYPE_ONOFF, (void *)&dump_headers},
{TOK_EOF,0,NULL}
};
@@ -939,6 +943,9 @@ int ConfigInt(ConfigIntVar var)
case CONFIG_SHOWMATCH:
return show_match;
+ case CONFIG_DUMPHEADERS:
+ return dump_headers;
+
default:
return 0;
}
diff --git a/src/config.h b/src/config.h
index d545531..d9641e7 100644
--- a/src/config.h
+++ b/src/config.h
@@ -55,7 +55,8 @@ typedef enum
CONFIG_TESTMODE,
CONFIG_BLOCKHTML,
CONFIG_VERBOSE,
- CONFIG_SHOWMATCH
+ CONFIG_SHOWMATCH,
+ CONFIG_DUMPHEADERS
} ConfigIntVar;
/* ---------------------------------------- INTERFACES
diff --git a/src/kbs.c b/src/kbs.c
index ef6ab1e..168793c 100644
--- a/src/kbs.c
+++ b/src/kbs.c
@@ -133,6 +133,22 @@ int main(int argc, char *argv[])
int tot=0;
int del=0;
+ if (ConfigInt(CONFIG_DUMPHEADERS))
+ {
+ Log(fp,"---- MESSAGE DUMP ----\n");
+
+ for(f=0;msg[f].to;f++)
+ {
+ Log(fp,"Message %d\n",f+1);
+ Log(fp,"From %s <%s@%s>\n",msg[f].from,
+ msg[f].from_uname,
+ msg[f].from_domain);
+ Log(fp,"Subject %.40s\n",msg[f].subject);
+ }
+
+ Log(fp,"---- END MESSAGE DUMP ----\n");
+ }
+
for(f=0;msg[f].to;f++)
{
tot++;