ze-filter  (ze-filter-0.8.0-develop-180218)
Filter : Oracle and other heuristics

Macros

#define SPAM_CONN_RESOLVE_FAIL   1
 
#define SPAM_CONN_RESOLVE_FORGED   2
 
#define SPAM_CONN_RESOLVE_TEMPFAIL   3
 
#define SPAM_CONN_FALSE_LOCALHOST   4
 
#define SPAM_CONN_BL_SPAMTRAP   5
 
#define SPAM_CONN_BAD_EHLO   6
 
#define SPAM_CONN_FORGED_EHLO   7
 
#define SPAM_CONN_RBL   8
 
#define SPAM_CONN_NB   9
 
#define SPAM_HTML_CLEAN_TOO_SHORT   3
 
#define SPAM_HTML_BASE64   4
 
#define SPAM_HTML_UNWANTED_TAGS   5
 
#define SPAM_HTML_TAGS_RATIO   6
 
#define SPAM_HTML_INVALID_TAGS   10
 
#define SPAM_HTML_NB   11
 
#define SPAM_PLAIN_EMPTY   1
 
#define SPAM_PLAIN_BASE64   2
 
#define SPAM_PLAIN_NO_CHARSET   3
 
#define SPAM_PLAIN_TOO_SHORT   4
 
#define SPAM_PLAIN_NB   5
 
#define SPAM_MSG_NO_TEXT_PART   1
 
#define SPAM_MSG_TOO_MUCH_HTML   2
 
#define SPAM_MSG_BAD_DATE   3
 
#define SPAM_MSG_FUTURE_DATE   4
 
#define SPAM_MSG_TOO_OLD_DATE   5
 
#define SPAM_MSG_UNWANTED_CHARSET   6
 
#define SPAM_MSG_BAD_EXPRESSIONS   8
 
#define SPAM_MSG_FORGED_POSTMASTER   9
 
#define SPAM_MSG_BAD_SENDER_ADDRESS   10
 
#define SPAM_MSG_BAD_DOMAIN_ADDRESS   11
 
#define SPAM_MSG_NO_SUBJECT   12
 
#define SPAM_MSG_RFC2822_HEADERS   13
 
#define SPAM_MSG_HEADERS_SYNTAX   14
 
#define SPAM_MSG_BASE64   15
 
#define SPAM_MSG_BASE64_SUBJECT   16
 
#define SPAM_MSG_UNWANTED_BOUNDARY   17
 
#define SPAM_MSG_HAS_BADRCPT   18
 
#define SPAM_MSG_MIME_ERRORS   19
 
#define SPAM_MSG_UNWANTED_MAILER   21
 
#define SPAM_MSG_MATCH_MIME_PARTS   22
 
#define SPAM_MSG_HAS_SPAMTRAP   23
 
#define SPAM_MSG_TOO_SHORT   24
 
#define SPAM_MSG_BAD_NULL_SENDER   25
 
#define SPAM_MSG_SUBJECT_HI_CAPS   26
 
#define SPAM_MSG_CONTENT_ID   27
 
#define SPAM_MSG_EMPTY_ATTACHMENT   28
 
#define SPAM_MSG_SUBJECT_NO_ALPHA   29
 
#define SPAM_MSG_SIZE_000_010   30
 
#define SPAM_MSG_SIZE_010_020   31
 
#define SPAM_MSG_SIZE_020_040   32
 
#define SPAM_MSG_SIZE_040_080   33
 
#define SPAM_MSG_SIZE_080_160   34
 
#define SPAM_MSG_SIZE_160_999   35
 
#define SPAM_MSG_NB   36
 
#define SPAM_MIME_CONTENT_ID   1
 
#define SPAM_GLOB_TAGGED   1
 
#define ORACLE_TYPE_CONN   1
 
#define ORACLE_TYPE_MSG   2
 
#define ORACLE_TYPE_HTML   3
 
#define ORACLE_TYPE_PLAIN   4
 
#define ORACLE_TYPE_NB   5
 
#define ORACLE_TYPE_GLOB   255
 

Functions

char * oracle_get_label (int, int)
 
double oracle_get_score (int, int)
 
bool oracle_set_score (int, int, double)
 
long oracle_get_count (int, int)
 
long oracle_set_count (int, int, long)
 
long oracle_inc_count (int, int)
 
void oracle_stats_update (int)
 
void oracle_stats_get (double *, double *, long *, double *, double *, long *)
 
bool oracle_dump_counters (int, bool)
 
bool oracle_read_counters ()
 
bool oracle_save_counters ()
 
bool oracle_read_scores ()
 
bool load_oracle_defs (char *cfdir, char *fname)
 
void dump_oracle_defs ()
 
bool oracle_check_enabled (int, int)
 
int oracle_compute_score (char *, char *, spamchk_T *)
 
bool load_oradata_table (char *, char *)
 
int count_oradata (char *, char *, char *, bool, double *)
 
void dump_oradata_table ()
 
double vector_compare (double *, double *, int)
 
char * realcleanup_text_buf (char *, size_t)
 

Detailed Description

Macro Definition Documentation

◆ ORACLE_TYPE_CONN

#define ORACLE_TYPE_CONN   1

Definition at line 95 of file ze-oracle-scores.h.

◆ ORACLE_TYPE_GLOB

#define ORACLE_TYPE_GLOB   255

Definition at line 101 of file ze-oracle-scores.h.

◆ ORACLE_TYPE_HTML

#define ORACLE_TYPE_HTML   3

Definition at line 97 of file ze-oracle-scores.h.

◆ ORACLE_TYPE_MSG

#define ORACLE_TYPE_MSG   2

Definition at line 96 of file ze-oracle-scores.h.

◆ ORACLE_TYPE_NB

#define ORACLE_TYPE_NB   5

Definition at line 99 of file ze-oracle-scores.h.

◆ ORACLE_TYPE_PLAIN

#define ORACLE_TYPE_PLAIN   4

Definition at line 98 of file ze-oracle-scores.h.

◆ SPAM_CONN_BAD_EHLO

#define SPAM_CONN_BAD_EHLO   6

Definition at line 38 of file ze-oracle-scores.h.

◆ SPAM_CONN_BL_SPAMTRAP

#define SPAM_CONN_BL_SPAMTRAP   5

Definition at line 37 of file ze-oracle-scores.h.

◆ SPAM_CONN_FALSE_LOCALHOST

#define SPAM_CONN_FALSE_LOCALHOST   4

Definition at line 36 of file ze-oracle-scores.h.

◆ SPAM_CONN_FORGED_EHLO

#define SPAM_CONN_FORGED_EHLO   7

Definition at line 39 of file ze-oracle-scores.h.

◆ SPAM_CONN_NB

#define SPAM_CONN_NB   9

Definition at line 41 of file ze-oracle-scores.h.

◆ SPAM_CONN_RBL

#define SPAM_CONN_RBL   8

Definition at line 40 of file ze-oracle-scores.h.

◆ SPAM_CONN_RESOLVE_FAIL

#define SPAM_CONN_RESOLVE_FAIL   1

Definition at line 33 of file ze-oracle-scores.h.

◆ SPAM_CONN_RESOLVE_FORGED

#define SPAM_CONN_RESOLVE_FORGED   2

Definition at line 34 of file ze-oracle-scores.h.

◆ SPAM_CONN_RESOLVE_TEMPFAIL

#define SPAM_CONN_RESOLVE_TEMPFAIL   3

Definition at line 35 of file ze-oracle-scores.h.

◆ SPAM_GLOB_TAGGED

#define SPAM_GLOB_TAGGED   1

Definition at line 93 of file ze-oracle-scores.h.

◆ SPAM_HTML_BASE64

#define SPAM_HTML_BASE64   4

Definition at line 44 of file ze-oracle-scores.h.

◆ SPAM_HTML_CLEAN_TOO_SHORT

#define SPAM_HTML_CLEAN_TOO_SHORT   3

Definition at line 43 of file ze-oracle-scores.h.

◆ SPAM_HTML_INVALID_TAGS

#define SPAM_HTML_INVALID_TAGS   10

Definition at line 47 of file ze-oracle-scores.h.

◆ SPAM_HTML_NB

#define SPAM_HTML_NB   11

Definition at line 48 of file ze-oracle-scores.h.

◆ SPAM_HTML_TAGS_RATIO

#define SPAM_HTML_TAGS_RATIO   6

Definition at line 46 of file ze-oracle-scores.h.

◆ SPAM_HTML_UNWANTED_TAGS

#define SPAM_HTML_UNWANTED_TAGS   5

Definition at line 45 of file ze-oracle-scores.h.

◆ SPAM_MIME_CONTENT_ID

#define SPAM_MIME_CONTENT_ID   1

Definition at line 91 of file ze-oracle-scores.h.

◆ SPAM_MSG_BAD_DATE

#define SPAM_MSG_BAD_DATE   3

Definition at line 58 of file ze-oracle-scores.h.

◆ SPAM_MSG_BAD_DOMAIN_ADDRESS

#define SPAM_MSG_BAD_DOMAIN_ADDRESS   11

Definition at line 65 of file ze-oracle-scores.h.

◆ SPAM_MSG_BAD_EXPRESSIONS

#define SPAM_MSG_BAD_EXPRESSIONS   8

Definition at line 62 of file ze-oracle-scores.h.

◆ SPAM_MSG_BAD_NULL_SENDER

#define SPAM_MSG_BAD_NULL_SENDER   25

Definition at line 78 of file ze-oracle-scores.h.

◆ SPAM_MSG_BAD_SENDER_ADDRESS

#define SPAM_MSG_BAD_SENDER_ADDRESS   10

Definition at line 64 of file ze-oracle-scores.h.

◆ SPAM_MSG_BASE64

#define SPAM_MSG_BASE64   15

Definition at line 69 of file ze-oracle-scores.h.

◆ SPAM_MSG_BASE64_SUBJECT

#define SPAM_MSG_BASE64_SUBJECT   16

Definition at line 70 of file ze-oracle-scores.h.

◆ SPAM_MSG_CONTENT_ID

#define SPAM_MSG_CONTENT_ID   27

Definition at line 80 of file ze-oracle-scores.h.

◆ SPAM_MSG_EMPTY_ATTACHMENT

#define SPAM_MSG_EMPTY_ATTACHMENT   28

Definition at line 81 of file ze-oracle-scores.h.

◆ SPAM_MSG_FORGED_POSTMASTER

#define SPAM_MSG_FORGED_POSTMASTER   9

Definition at line 63 of file ze-oracle-scores.h.

◆ SPAM_MSG_FUTURE_DATE

#define SPAM_MSG_FUTURE_DATE   4

Definition at line 59 of file ze-oracle-scores.h.

◆ SPAM_MSG_HAS_BADRCPT

#define SPAM_MSG_HAS_BADRCPT   18

Definition at line 72 of file ze-oracle-scores.h.

◆ SPAM_MSG_HAS_SPAMTRAP

#define SPAM_MSG_HAS_SPAMTRAP   23

Definition at line 76 of file ze-oracle-scores.h.

◆ SPAM_MSG_HEADERS_SYNTAX

#define SPAM_MSG_HEADERS_SYNTAX   14

Definition at line 68 of file ze-oracle-scores.h.

◆ SPAM_MSG_MATCH_MIME_PARTS

#define SPAM_MSG_MATCH_MIME_PARTS   22

Definition at line 75 of file ze-oracle-scores.h.

◆ SPAM_MSG_MIME_ERRORS

#define SPAM_MSG_MIME_ERRORS   19

Definition at line 73 of file ze-oracle-scores.h.

◆ SPAM_MSG_NB

#define SPAM_MSG_NB   36

Definition at line 89 of file ze-oracle-scores.h.

◆ SPAM_MSG_NO_SUBJECT

#define SPAM_MSG_NO_SUBJECT   12

Definition at line 66 of file ze-oracle-scores.h.

◆ SPAM_MSG_NO_TEXT_PART

#define SPAM_MSG_NO_TEXT_PART   1

Definition at line 56 of file ze-oracle-scores.h.

◆ SPAM_MSG_RFC2822_HEADERS

#define SPAM_MSG_RFC2822_HEADERS   13

Definition at line 67 of file ze-oracle-scores.h.

◆ SPAM_MSG_SIZE_000_010

#define SPAM_MSG_SIZE_000_010   30

Definition at line 83 of file ze-oracle-scores.h.

◆ SPAM_MSG_SIZE_010_020

#define SPAM_MSG_SIZE_010_020   31

Definition at line 84 of file ze-oracle-scores.h.

◆ SPAM_MSG_SIZE_020_040

#define SPAM_MSG_SIZE_020_040   32

Definition at line 85 of file ze-oracle-scores.h.

◆ SPAM_MSG_SIZE_040_080

#define SPAM_MSG_SIZE_040_080   33

Definition at line 86 of file ze-oracle-scores.h.

◆ SPAM_MSG_SIZE_080_160

#define SPAM_MSG_SIZE_080_160   34

Definition at line 87 of file ze-oracle-scores.h.

◆ SPAM_MSG_SIZE_160_999

#define SPAM_MSG_SIZE_160_999   35

Definition at line 88 of file ze-oracle-scores.h.

◆ SPAM_MSG_SUBJECT_HI_CAPS

#define SPAM_MSG_SUBJECT_HI_CAPS   26

Definition at line 79 of file ze-oracle-scores.h.

◆ SPAM_MSG_SUBJECT_NO_ALPHA

#define SPAM_MSG_SUBJECT_NO_ALPHA   29

Definition at line 82 of file ze-oracle-scores.h.

◆ SPAM_MSG_TOO_MUCH_HTML

#define SPAM_MSG_TOO_MUCH_HTML   2

Definition at line 57 of file ze-oracle-scores.h.

◆ SPAM_MSG_TOO_OLD_DATE

#define SPAM_MSG_TOO_OLD_DATE   5

Definition at line 60 of file ze-oracle-scores.h.

◆ SPAM_MSG_TOO_SHORT

#define SPAM_MSG_TOO_SHORT   24

Definition at line 77 of file ze-oracle-scores.h.

◆ SPAM_MSG_UNWANTED_BOUNDARY

#define SPAM_MSG_UNWANTED_BOUNDARY   17

Definition at line 71 of file ze-oracle-scores.h.

◆ SPAM_MSG_UNWANTED_CHARSET

#define SPAM_MSG_UNWANTED_CHARSET   6

Definition at line 61 of file ze-oracle-scores.h.

◆ SPAM_MSG_UNWANTED_MAILER

#define SPAM_MSG_UNWANTED_MAILER   21

Definition at line 74 of file ze-oracle-scores.h.

◆ SPAM_PLAIN_BASE64

#define SPAM_PLAIN_BASE64   2

Definition at line 51 of file ze-oracle-scores.h.

◆ SPAM_PLAIN_EMPTY

#define SPAM_PLAIN_EMPTY   1

Definition at line 50 of file ze-oracle-scores.h.

◆ SPAM_PLAIN_NB

#define SPAM_PLAIN_NB   5

Definition at line 54 of file ze-oracle-scores.h.

◆ SPAM_PLAIN_NO_CHARSET

#define SPAM_PLAIN_NO_CHARSET   3

Definition at line 52 of file ze-oracle-scores.h.

◆ SPAM_PLAIN_TOO_SHORT

#define SPAM_PLAIN_TOO_SHORT   4

Definition at line 53 of file ze-oracle-scores.h.

Function Documentation

◆ count_oradata()

int count_oradata ( char *  ,
char *  ,
char *  ,
bool  ,
double *   
)

Definition at line 253 of file ze-oracle.c.

◆ dump_oracle_defs()

void dump_oracle_defs ( )

Definition at line 986 of file ze-oracle-scores.c.

◆ dump_oradata_table()

void dump_oradata_table ( )

Definition at line 69 of file ze-oracle.c.

◆ load_oracle_defs()

bool load_oracle_defs ( char *  cfdir,
char *  fname 
)

Definition at line 967 of file ze-oracle-scores.c.

◆ load_oradata_table()

bool load_oradata_table ( char *  ,
char *   
)

Definition at line 211 of file ze-oracle.c.

◆ oracle_check_enabled()

bool oracle_check_enabled ( int  ,
int   
)

Definition at line 1022 of file ze-oracle-scores.c.

◆ oracle_compute_score()

int oracle_compute_score ( char *  ,
char *  ,
spamchk_T  
)

Definition at line 1051 of file ze-oracle-scores.c.

◆ oracle_dump_counters()

bool oracle_dump_counters ( int  ,
bool   
)

Definition at line 614 of file ze-oracle-scores.c.

◆ oracle_get_count()

long oracle_get_count ( int  ,
int   
)

Definition at line 536 of file ze-oracle-scores.c.

◆ oracle_get_label()

char* oracle_get_label ( int  ,
int   
)

Definition at line 360 of file ze-oracle-scores.c.

◆ oracle_get_score()

double oracle_get_score ( int  ,
int   
)

Definition at line 483 of file ze-oracle-scores.c.

◆ oracle_inc_count()

long oracle_inc_count ( int  ,
int   
)

Definition at line 587 of file ze-oracle-scores.c.

◆ oracle_read_counters()

bool oracle_read_counters ( )

Definition at line 763 of file ze-oracle-scores.c.

◆ oracle_read_scores()

bool oracle_read_scores ( )

Definition at line 801 of file ze-oracle-scores.c.

◆ oracle_save_counters()

bool oracle_save_counters ( )

Definition at line 782 of file ze-oracle-scores.c.

◆ oracle_set_count()

long oracle_set_count ( int  ,
int  ,
long   
)

Definition at line 561 of file ze-oracle-scores.c.

◆ oracle_set_score()

bool oracle_set_score ( int  ,
int  ,
double   
)

Definition at line 508 of file ze-oracle-scores.c.

◆ oracle_stats_get()

void oracle_stats_get ( double *  ,
double *  ,
long *  ,
double *  ,
double *  ,
long *   
)

Definition at line 328 of file ze-oracle-scores.c.

◆ oracle_stats_update()

void oracle_stats_update ( int  )

Definition at line 310 of file ze-oracle-scores.c.

◆ realcleanup_text_buf()

char* realcleanup_text_buf ( char *  ,
size_t   
)

Definition at line 408 of file ze-oracle.c.

◆ vector_compare()

double vector_compare ( double *  ,
double *  ,
int   
)

Definition at line 326 of file ze-oracle.c.