diff options
author | Ian C <ianc@noddybox.co.uk> | 2003-12-08 02:20:14 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2003-12-08 02:20:14 +0000 |
commit | 1c161a8cbe16aa59cc8bf4d60d5fa64fdcbc6aa5 (patch) | |
tree | 355d3a053199f03f5e13d8fa25b05723bf1da720 /src/dbase.c | |
parent | 787bb7625c9abc6b09efbc6bbe004a19d4b96166 (diff) |
Added subject_macro; Tweaked check order; Fixed some warnings
Diffstat (limited to 'src/dbase.c')
-rw-r--r-- | src/dbase.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/src/dbase.c b/src/dbase.c index aed142d..43fe0b5 100644 --- a/src/dbase.c +++ b/src/dbase.c @@ -236,7 +236,8 @@ int DBBlockMessage(const POP3Message *msg) return FALSE; if (ConfigInt(CONFIG_BLOCKHTML) && - strncmp(msg->content_type,html,strlen(html))==0) + (strncmp(msg->content_type,html,strlen(html))==0 || + strcmp(msg->content_type,"UNKNOWN")==0)) { reason="HTML message"; return TRUE; @@ -245,22 +246,6 @@ int DBBlockMessage(const POP3Message *msg) if (!(dom=GetDomain(msg->from_domain))) return FALSE; - for(f=0;f<dom->no_user;f++) - { - int res; - - if (ConfigInt(CONFIG_CASESENSE)) - res=strcmp(dom->user[f],msg->from_uname); - else - res=strcasecmp(dom->user[f],msg->from_uname); - - if (res==0) - { - reason="disallowed name"; - return TRUE; - } - } - ds=DSInit(); if (ConfigInt(CONFIG_DEJUNK)) @@ -277,6 +262,23 @@ int DBBlockMessage(const POP3Message *msg) } } + for(f=0;f<dom->no_user;f++) + { + int res; + + if (ConfigInt(CONFIG_CASESENSE)) + res=strcmp(dom->user[f],msg->from_uname); + else + res=strcasecmp(dom->user[f],msg->from_uname); + + if (res==0) + { + DSFree(ds); + reason="disallowed name"; + return TRUE; + } + } + for(f=0;f<dom->no_block;f++) { if (RESearch(dom->block[f],ds->text)) |