ze-filter  (ze-filter-0.8.0-develop-180218)
ze-dbbl.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 #ifndef __ZE_DBBL_H
25 
26 #define BL_ORACLE 1
27 #define BL_PATMATCH 2
28 #define BL_BADRCPT 3
29 #define BL_THROTTLE 4
30 
31 
32 bool db_open_blacklist();
33 bool db_check_blacklist(char *ip);
34 bool db_close_blacklist();
35 
36 /* dynamic or static blacklist */
37 
38 typedef struct db_map_T
39 {
40  char why[32];
41  char key[32];
42 
43  int weight;
44  time_t date;
45  char ipres[24];
46  char msg[64];
47 } db_map_T;
48 
49 
50 bool db_blackliste_check(char *why, char *key, db_map_T *r);
51 
52 bool db_map_check(char *, char *, char *, char *, size_t);
53 bool db_map_add(char *, char *, char *, char *);
54 
55 bool db_map_open(char *bl);
56 bool db_map_close(char *bl);
57 bool db_map_close_all(void);
58 
59 #define __ZE_DBBL_H
60 #endif
bool db_map_check(char *, char *, char *, char *, size_t)
Definition: ze-dbbl.c:454
time_t date
Definition: ze-dbbl.h:44
char ipres[24]
Definition: ze-dbbl.h:45
int weight
Definition: ze-dbbl.h:43
bool db_blackliste_check(char *why, char *key, db_map_T *r)
Definition: ze-dbbl.c:190
bool db_map_open(char *bl)
Definition: ze-dbbl.c:317
bool db_check_blacklist(char *ip)
Definition: ze-dbbl.c:103
bool db_map_close(char *bl)
Definition: ze-dbbl.c:379
char key[32]
Definition: ze-dbbl.h:41
bool db_open_blacklist()
Definition: ze-dbbl.c:56
bool db_map_add(char *, char *, char *, char *)
Definition: ze-dbbl.c:521
bool db_close_blacklist()
Definition: ze-dbbl.c:83
char msg[64]
Definition: ze-dbbl.h:46
struct db_map_T db_map_T
char why[32]
Definition: ze-dbbl.h:40
bool db_map_close_all(void)
Definition: ze-dbbl.c:424