#include <ze-sys.h>
#include <libze.h>
#include <ze-filter.h>
#include <ze-grey.h>
#include <ze-log-grey.h>
Go to the source code of this file.
|
#define | BF_SZ 512 |
|
#define | DT_GREY_SLEEP 10 |
|
#define | DT_GREY_INTERVAL (6 HOURS) |
|
#define | MIN_CNT_PER_DOMAIN 5 |
|
#define | GREY_TP_MIN_NORM 10 MINUTES |
|
#define | GREY_TP_MIN_NULL 10 MINUTES |
|
#define | GREY_TP_MAX_NORM 3 DAYS |
|
#define | GREY_TP_MAX_NULL 4 HOURS |
|
#define | GREY_TV_MAX 7 DAYS |
|
#define | GREY_TW_MAX 21 DAYS |
|
#define | GREY_TB_MAX 7 DAYS |
|
#define | T_EXPIRE_BAD_MIN 6 HOURS |
|
#define | T_EXPIRE_PENDING_BAD_MAX 24 HOURS |
|
#define | T_EXPIRE_VALID_BAD_MAX 5 DAYS |
|
#define | GREY_CRIT_LOCK() MUTEX_LOCK(&grey_crit) |
|
#define | GREY_CRIT_UNLOCK() MUTEX_UNLOCK(&grey_crit) |
|
#define | DBG_LEVEL 12 |
|
#define | GREY_ENTRY_INITIALIZER |
|
#define | ISNULLSENDER(x) |
|
#define | SIGTID ((pthread_t ) 23021957) |
|
#define | TIMER_INIT(t) |
|
#define | TIMER_NOW(t) (zeTime_ms() - t) |
|
#define | TIMER_LOG(s, t) |
|
#define | ST_IDLE 0 |
|
#define | ST_PENDING 1 |
|
#define | ST_VALID 2 |
|
#define | ST_WHITE 3 |
|
#define | ST_BLACK 4 |
|
#define | ST_DONE 5 |
|
#define | CHECK_DELAY() |
|
#define | DOM_DIM 32 |
|
#define | SECLEVDOMAINS {"com","org","co","asso","net","gov","edu",NULL} |
|
#define | DOM_DIM 32 |
|
#define | SECLEVDOMAINS {"com","org","co","asso","net","gov","edu",NULL} |
|
|
void | grey_launch_thread () |
|
bool | grey_set_tuples (char *ip, char *from, char *to) |
|
bool | grey_set_delays (time_t tp_min_norm, time_t tp_max_norm, time_t tp_min_null, time_t tp_max_null) |
|
bool | grey_set_lifetime (time_t tv, time_t tw, time_t tb) |
|
bool | grey_set_max_pending (int nbnormal, int nbnull) |
|
bool | grey_set_cleanup_interval (time_t tclean) |
|
void | grey_set_compat_domain_check (bool enable) |
|
int | grey_check (char *kAddr, char *kFrom, char *kRcpt, char *kName, bool *new, bool can_validate) |
|
int | grey_validate (char *kAddr, char *kFrom, char *kRcpt, char *kName) |
|
bool | grey_remove_entry (char *which, char *key) |
|
bool | grey_remove_entries_from_file (char *which, char *fname) |
|
bool | grey_init (char *workdir, bool rd, int mode) |
|
void | grey_close () |
|
bool | grey_reload () |
|
void | grey_set_dewhite_flags (char *s, bool reset) |
|
int | grey_dump (int fd, char *which, time_t dt) |
|
int | grey_upload (char *fname, char *which) |
|
bool | grey_remove (int where, char *key) |
|
int | grey_dbcount (int which) |
|
◆ BF_SZ
◆ CHECK_DELAY
◆ DBG_LEVEL
◆ DOM_DIM [1/2]
◆ DOM_DIM [2/2]
◆ DT_GREY_INTERVAL
#define DT_GREY_INTERVAL (6 HOURS) |
◆ DT_GREY_SLEEP
◆ GREY_CRIT_LOCK
◆ GREY_CRIT_UNLOCK
◆ GREY_ENTRY_INITIALIZER
#define GREY_ENTRY_INITIALIZER |
Value:{0, 0, NULL, NULL, NULL, NULL, \
NULL, NULL, NULL, NULL, 0,
FALSE, NULL, NULL, NULL}
Definition at line 328 of file ze-grey.c.
◆ GREY_TB_MAX
#define GREY_TB_MAX 7 DAYS |
◆ GREY_TP_MAX_NORM
#define GREY_TP_MAX_NORM 3 DAYS |
◆ GREY_TP_MAX_NULL
#define GREY_TP_MAX_NULL 4 HOURS |
◆ GREY_TP_MIN_NORM
#define GREY_TP_MIN_NORM 10 MINUTES |
◆ GREY_TP_MIN_NULL
#define GREY_TP_MIN_NULL 10 MINUTES |
◆ GREY_TV_MAX
#define GREY_TV_MAX 7 DAYS |
◆ GREY_TW_MAX
#define GREY_TW_MAX 21 DAYS |
◆ ISNULLSENDER
#define ISNULLSENDER |
( |
|
x | ) |
|
Value:(((x) == NULL) || \
(strstr((x), "<>") != NULL) || \
(strlen((x)) == 0) || \
(strcasecmp((x), "nullsender") == 0) || \
(strncasecmp((x), "postmaster", 10) == 0) || \
(strncasecmp((x), "mailer-daemon", 13) == 0))
Definition at line 341 of file ze-grey.c.
◆ MIN_CNT_PER_DOMAIN
#define MIN_CNT_PER_DOMAIN 5 |
◆ SECLEVDOMAINS [1/2]
#define SECLEVDOMAINS {"com","org","co","asso","net","gov","edu",NULL} |
◆ SECLEVDOMAINS [2/2]
#define SECLEVDOMAINS {"com","org","co","asso","net","gov","edu",NULL} |
◆ SIGTID
#define SIGTID ((pthread_t ) 23021957) |
◆ ST_BLACK
◆ ST_DONE
◆ ST_IDLE
◆ ST_PENDING
◆ ST_VALID
◆ ST_WHITE
◆ T_EXPIRE_BAD_MIN
#define T_EXPIRE_BAD_MIN 6 HOURS |
◆ T_EXPIRE_PENDING_BAD_MAX
#define T_EXPIRE_PENDING_BAD_MAX 24 HOURS |
◆ T_EXPIRE_VALID_BAD_MAX
#define T_EXPIRE_VALID_BAD_MAX 5 DAYS |
◆ TIMER_INIT
◆ TIMER_LOG
#define TIMER_LOG |
( |
|
s, |
|
|
|
t |
|
) |
| |
Value:do { \
ZE_MessageInfo(0, "%-12s : Elapsed time %ld ms",s, (long ) (dt)); \
} while (0)
Definition at line 1860 of file ze-grey.c.
◆ TIMER_NOW
◆ expire_st_T
◆ grey_entry_T
◆ grey_filter_T
◆ tuple_T
◆ grey_launch_thread()
void grey_launch_thread |
( |
| ) |
|
◆ grey_remove()
bool grey_remove |
( |
int |
where, |
|
|
char * |
key |
|
) |
| |