-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstore.h
50 lines (41 loc) · 961 Bytes
/
store.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef _STORE_H_
#define _STORE_H_
/* XXXmanu license ? */
struct tuple_fields {
struct sockaddr *sa;
socklen_t salen;
char *from;
char *rcpt;
time_t *remaining; /* report back remaining
time before activation */
time_t *elapsed; /* report back elapsed time
since first encounter */
char *queueid; /* for logging purposes */
time_t gldelay; /* delay time for new greylist entry */
time_t autowhite; /* time-out for autowhite entry */
};
/*
* initialize storage backend
*/
void mg_init();
/*
* start storage background threads
*/
void mg_start();
/*
* check tuple status, add and update if necessary
*/
tuple_t mg_tuple_check(struct tuple_fields);
/*
* in case backend needs cleaning up
*/
int mg_tuple_vacuum();
/*
* stop storage background threads
*/
void mg_tuple_stop();
/*
* safely close storage backend
*/
void mg_tuple_close();
#endif /* _STORE_H_ */