diff options
author | Ian C <ianc@noddybox.co.uk> | 2004-08-22 19:03:21 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2004-08-22 19:03:21 +0000 |
commit | 79ebb3ff33dbcf841194bbc0932c070b055b1907 (patch) | |
tree | 9361056b960eb485d334b0faa14628ac833207d2 /src | |
parent | 718b54c985aa2fe7146df39176796ce4d6580504 (diff) |
Diffstat (limited to 'src')
-rw-r--r-- | src/config.c | 7 | ||||
-rw-r--r-- | src/config.h | 3 | ||||
-rw-r--r-- | src/kbs.c | 16 |
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 @@ -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++; |