ze-filter  (ze-filter-0.8.0-develop-180218)
ze-bcheck.h
Go to the documentation of this file.
1 
2 /*
3  *
4  * ze-filter - Mail Server Filter for sendmail
5  *
6  * Copyright (c) 2001-2018 - Jose-Marcio Martins da Cruz
7  *
8  * Auteur : Jose Marcio Martins da Cruz
9  * jose.marcio.mc@gmail.org
10  *
11  * Historique :
12  * Creation : Mon Jun 19 17:24:56 CEST 2006
13  *
14  * This program is free software, but with restricted license :
15  *
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20  *
21  * More details about ze-filter license can be found at ze-filter
22  * web site : http://foss.jose-marcio.org
23  */
24 
25 
26 #ifndef __ZE_BCHECK_H
27 
33 #define MAX_TOK 128
34 
35 typedef struct sfilter_vsm_T {
37  int nbt;
38  int nb;
40 
41 #define SFILTER_VSM_INIT(bc,nbt,prob) \
42  do { \
43  int i; \
44  memset(bc, 0, sizeof(sfilter_vsm_T)); \
45  for (i = 0; i < MAX_TOK; i++) \
46  bc->tok[i].prob = prob; \
47  bc->nbt = nbt; \
48  bc->nb = 0; \
49  } while (0)
50 
51 
55 typedef struct sfilter_cli_T {
56 
57  size_t maxSize;
58  bool check;
59  bool verbose;
60  bool progress;
61  char *dbname;
62  char *id;
63  bool spam;
64  char *timestr;
66  int histo[21];
67  bool histogram;
68  int nbt;
69  double uprob;
71 
72 bool sfilter_cli_handle_message(char *fname, int msgNb,
73  void *arg);
74 double sfilter_check_message(char *id, char *fname,
75  sfilter_vsm_T * bcheck);
76 
79 #define __ZE_BCHECK_H 1
80 #endif /* __ZE_BCHECK_H */
double uprob
Definition: ze-bcheck.h:69
double sfilter_check_message(char *id, char *fname, sfilter_vsm_T *bcheck)
Definition: ze-bcheck.c:328
size_t maxSize
Definition: ze-bcheck.h:57
bool progress
Definition: ze-bcheck.h:60
sfilter_vsm_T bcheck
Definition: ze-bcheck.h:65
char * id
Definition: ze-bcheck.h:62
bool histogram
Definition: ze-bcheck.h:67
bool sfilter_cli_handle_message(char *fname, int msgNb, void *arg)
Definition: ze-bcheck.c:252
bool verbose
Definition: ze-bcheck.h:59
sfilter_token_T tok[MAX_TOK]
Definition: ze-bcheck.h:36
struct sfilter_vsm_T sfilter_vsm_T
char * dbname
Definition: ze-bcheck.h:61
char * timestr
Definition: ze-bcheck.h:64
#define MAX_TOK
Definition: ze-bcheck.h:33
struct sfilter_cli_T sfilter_cli_T