diff options
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)) |