ze-filter  (ze-filter-0.8.0-develop-180218)
ze-chkcontent.h
Go to the documentation of this file.
1 /*
2  *
3  * ze-filter - Mail Server Filter for sendmail
4  *
5  * Copyright (c) 2001-2018 - Jose-Marcio Martins da Cruz
6  *
7  * Auteur : Jose Marcio Martins da Cruz
8  * jose.marcio.mc@gmail.org
9  *
10  * Historique :
11  * Creation : janvier 2002
12  *
13  * This program is free software, but with restricted license :
14  *
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19  *
20  * More details about ze-filter license can be found at ze-filter
21  * web site : http://foss.jose-marcio.org
22  */
23 
24 
25 #ifndef __ZE_CHKCONTENT_H
26 
27 typedef struct
28 {
29  size_t len_raw;
30  size_t len_clean;
32 } msgpart_T;
33 
34 typedef struct
35 {
42 } msg_flags_T;
43 
44 typedef struct
45 {
53 } msg_ksizes_T;
54 
55 struct spamchk_T
56 {
57  char *ip;
59 
60  size_t spool_size;
62 
63  int action;
64 
66 
67  /* message flags */
70 
71  /* message scores */
73 
74  /* measured data */
76  int nb_part;
77  int nb_text;
78  int nb_image;
79  int nb_audio;
80  int nb_video;
82  int nb_token;
85 
89 
92 
93  size_t size;
94  size_t sz_text_plain;
95  size_t sz_text_html;
96 
97  /* comparison html vs plain */
101 
103 
106 
107  /* results */
115 
117 };
118 
119 int scan_body_contents(char *, char *, char *, size_t,
120  spamchk_T *, msg_flags_T *,
121  msg_scores_T *);
122 
123 #define __ZE_CHKCONTENT_H
124 #endif
int msg_bad_expressions
kstats_T plain
Definition: ze-chkcontent.h:46
char * ip
Definition: ze-chkcontent.h:57
kstats_T html_clean
Definition: ze-chkcontent.h:49
msgpart_T plain
Definition: ze-chkcontent.h:99
int nb_text_simple
Definition: ze-chkcontent.h:88
int html_unwanted_tags
uint32_t ehlo
Definition: ze-chkcontent.h:37
int nb_text_html_base64
Definition: ze-chkcontent.h:91
int nb_text_plain_empty
uint32_t conn
Definition: ze-chkcontent.h:36
size_t max_spool_size
Definition: ze-chkcontent.h:61
int nb_application
Definition: ze-chkcontent.h:81
int content_max_score
Definition: ze-chkcontent.h:65
int html_high_tag_ratio
int headers_syntax_errors
size_t sz_text_html
Definition: ze-chkcontent.h:95
kstats_T plain_clean
Definition: ze-chkcontent.h:47
kstats_T other
Definition: ze-chkcontent.h:51
kstats_T simple
Definition: ze-chkcontent.h:50
int nb_text_plain
Definition: ze-chkcontent.h:86
msg_flags_T flags
Definition: ze-chkcontent.h:68
size_t sz_text_plain
Definition: ze-chkcontent.h:94
size_t len_raw
Definition: ze-chkcontent.h:29
int nb_text_html
Definition: ze-chkcontent.h:87
size_t size
Definition: ze-chkcontent.h:93
int nb_multipart
Definition: ze-chkcontent.h:84
size_t len_clean
Definition: ze-chkcontent.h:30
kstats_T attach
Definition: ze-chkcontent.h:52
uint32_t mime
Definition: ze-chkcontent.h:40
int nb_text_plain_base64
Definition: ze-chkcontent.h:90
header_T * hdrs
msg_ksizes_T mksize
kstats_T st_wlen
Definition: ze-chkcontent.h:31
uint32_t msg
Definition: ze-chkcontent.h:41
bestof_T best
Definition: ze-chkcontent.h:69
uint32_t html
Definition: ze-chkcontent.h:38
kstats_T html
Definition: ze-chkcontent.h:48
int html_invalid_tags
int nb_message
Definition: ze-chkcontent.h:83
CONNID_T id
Definition: ze-chkcontent.h:58
msg_scores_T scores
Definition: ze-chkcontent.h:72
int nb_badrcpt
Definition: ze-chkcontent.h:75
int nb_text_simple_empty
int nb_diff_html_plain
long uint32_t
Definition: ze-sys.h:489
int nb_rfc2822_hdrs_errors
int scan_body_contents(char *, char *, char *, size_t, spamchk_T *, msg_flags_T *, msg_scores_T *)
msgpart_T html
Definition: ze-chkcontent.h:98
uint32_t plain
Definition: ze-chkcontent.h:39
size_t spool_size
Definition: ze-chkcontent.h:60