ze-filter  (ze-filter-0.8.0-develop-180218)
Filter : Greylisting

Macros

#define GREY_OK   200
 
#define GREY_WAIT   400
 
#define GREY_REJECT   500
 
#define GREY_ERROR   700
 
#define GREY_DUNNO   100
 
#define GREY_EMAIL_NONE   0
 
#define GREY_EMAIL_FULL   1
 
#define GREY_EMAIL_USER   2
 
#define GREY_EMAIL_HOST   3
 
#define GREY_ADDR_NONE   0
 
#define GREY_ADDR_FULL   1
 
#define GREY_ADDR_NET   2
 
#define GREY_STANDALONE   0
 
#define GREY_CLIENT   1
 
#define GREY_SERVER   2
 
#define GREY_DW_NONE   0x00
 
#define GREY_DW_NULLSENDER   0x01
 
#define GREY_DW_BAD_RESOLVE   0x02
 
#define GREY_DW_DOMAIN_MISMATCH   0x04
 
#define GREY_DW_BAD_CLIENT   0x08
 
#define GREY_DW_SPAMTRAP   0x10
 
#define GREY_DW_BAD_RCPT   0x20
 
#define GREY_DW_BAD_MX   0x40
 
#define GREY_DW_ALL   0xFFFF
 
#define GDB_NONE   0
 
#define GDB_PENDING   1
 
#define GDB_VALID   2
 
#define GDB_WHITELIST   3
 
#define GDB_BLACKLIST   4
 
#define GDB_ALL   0xFF
 
#define GREY_ARGS   16
 
#define ARG_DATE_INIT   0
 
#define ARG_DATE_UPDT   1
 
#define ARG_IP   2
 
#define ARG_HOSTNAME   3
 
#define ARG_FROM   4
 
#define ARG_RESOLVE   5
 
#define ARG_COUNT   6
 
#define ARG_FLAGS   7
 

Typedefs

typedef bool(* greycleanup_F) (char *)
 

Functions

void set_grey_dewhitelist_threshold (double val)
 
bool grey_check_bad_smtp_client (char *ip, uint32_t flags)
 
int remote_grey_check (char *ip, char *from, char *to, char *hostname)
 
int remote_grey_validate (char *ip, char *from, char *to, char *hostname)
 
void remote_grey_quit ()
 
void grey_channel_error_clear ()
 
int grey_check (char *, char *, char *, char *, bool *, bool)
 
int grey_validate (char *, char *, char *, char *)
 
bool grey_init (char *, bool, int)
 
bool grey_reload ()
 
void grey_close ()
 
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 normal, int bounce)
 
bool grey_set_cleanup_interval (time_t tclean)
 
void grey_set_compat_domain_check (bool enable)
 
bool grey_list (int, int)
 
void grey_set_dewhite_flags (char *, bool)
 
int grey_dump (int fd, char *which, time_t dt)
 
int grey_upload (char *fname, char *which)
 
int grey_dbcount (int)
 
bool grey_remove_entry (char *where, char *key)
 
bool grey_remove_entries_from_file (char *where, char *fname)
 

Detailed Description

Greylisting Filtering

Macro Definition Documentation

◆ ARG_COUNT

#define ARG_COUNT   6

Definition at line 79 of file ze-grey.h.

◆ ARG_DATE_INIT

#define ARG_DATE_INIT   0

Definition at line 73 of file ze-grey.h.

◆ ARG_DATE_UPDT

#define ARG_DATE_UPDT   1

Definition at line 74 of file ze-grey.h.

◆ ARG_FLAGS

#define ARG_FLAGS   7

Definition at line 80 of file ze-grey.h.

◆ ARG_FROM

#define ARG_FROM   4

Definition at line 77 of file ze-grey.h.

◆ ARG_HOSTNAME

#define ARG_HOSTNAME   3

Definition at line 76 of file ze-grey.h.

◆ ARG_IP

#define ARG_IP   2

Definition at line 75 of file ze-grey.h.

◆ ARG_RESOLVE

#define ARG_RESOLVE   5

Definition at line 78 of file ze-grey.h.

◆ GDB_ALL

#define GDB_ALL   0xFF

Definition at line 70 of file ze-grey.h.

◆ GDB_BLACKLIST

#define GDB_BLACKLIST   4

Definition at line 69 of file ze-grey.h.

◆ GDB_NONE

#define GDB_NONE   0

Definition at line 65 of file ze-grey.h.

◆ GDB_PENDING

#define GDB_PENDING   1

Definition at line 66 of file ze-grey.h.

◆ GDB_VALID

#define GDB_VALID   2

Definition at line 67 of file ze-grey.h.

◆ GDB_WHITELIST

#define GDB_WHITELIST   3

Definition at line 68 of file ze-grey.h.

◆ GREY_ADDR_FULL

#define GREY_ADDR_FULL   1

Definition at line 47 of file ze-grey.h.

◆ GREY_ADDR_NET

#define GREY_ADDR_NET   2

Definition at line 48 of file ze-grey.h.

◆ GREY_ADDR_NONE

#define GREY_ADDR_NONE   0

Definition at line 46 of file ze-grey.h.

◆ GREY_ARGS

#define GREY_ARGS   16

Definition at line 72 of file ze-grey.h.

◆ GREY_CLIENT

#define GREY_CLIENT   1

Definition at line 51 of file ze-grey.h.

◆ GREY_DUNNO

#define GREY_DUNNO   100

Definition at line 39 of file ze-grey.h.

◆ GREY_DW_ALL

#define GREY_DW_ALL   0xFFFF

Definition at line 63 of file ze-grey.h.

◆ GREY_DW_BAD_CLIENT

#define GREY_DW_BAD_CLIENT   0x08

Definition at line 58 of file ze-grey.h.

◆ GREY_DW_BAD_MX

#define GREY_DW_BAD_MX   0x40

Definition at line 61 of file ze-grey.h.

◆ GREY_DW_BAD_RCPT

#define GREY_DW_BAD_RCPT   0x20

Definition at line 60 of file ze-grey.h.

◆ GREY_DW_BAD_RESOLVE

#define GREY_DW_BAD_RESOLVE   0x02

Definition at line 56 of file ze-grey.h.

◆ GREY_DW_DOMAIN_MISMATCH

#define GREY_DW_DOMAIN_MISMATCH   0x04

Definition at line 57 of file ze-grey.h.

◆ GREY_DW_NONE

#define GREY_DW_NONE   0x00

Definition at line 54 of file ze-grey.h.

◆ GREY_DW_NULLSENDER

#define GREY_DW_NULLSENDER   0x01

Definition at line 55 of file ze-grey.h.

◆ GREY_DW_SPAMTRAP

#define GREY_DW_SPAMTRAP   0x10

Definition at line 59 of file ze-grey.h.

◆ GREY_EMAIL_FULL

#define GREY_EMAIL_FULL   1

Definition at line 42 of file ze-grey.h.

◆ GREY_EMAIL_HOST

#define GREY_EMAIL_HOST   3

Definition at line 44 of file ze-grey.h.

◆ GREY_EMAIL_NONE

#define GREY_EMAIL_NONE   0

Definition at line 41 of file ze-grey.h.

◆ GREY_EMAIL_USER

#define GREY_EMAIL_USER   2

Definition at line 43 of file ze-grey.h.

◆ GREY_ERROR

#define GREY_ERROR   700

Definition at line 38 of file ze-grey.h.

◆ GREY_OK

#define GREY_OK   200

Definition at line 35 of file ze-grey.h.

◆ GREY_REJECT

#define GREY_REJECT   500

Definition at line 37 of file ze-grey.h.

◆ GREY_SERVER

#define GREY_SERVER   2

Definition at line 52 of file ze-grey.h.

◆ GREY_STANDALONE

#define GREY_STANDALONE   0

Definition at line 50 of file ze-grey.h.

◆ GREY_WAIT

#define GREY_WAIT   400

Definition at line 36 of file ze-grey.h.

Typedef Documentation

◆ greycleanup_F

typedef bool(* greycleanup_F) (char *)

Definition at line 85 of file ze-grey.h.

Function Documentation

◆ grey_channel_error_clear()

void grey_channel_error_clear ( )

Definition at line 148 of file ze-grey-client.c.

◆ grey_check()

int grey_check ( char *  ,
char *  ,
char *  ,
char *  ,
bool ,
bool   
)

Definition at line 491 of file ze-grey.c.

◆ grey_check_bad_smtp_client()

bool grey_check_bad_smtp_client ( char *  ip,
uint32_t  flags 
)

Definition at line 73 of file ze-grey-cleanup.c.

◆ grey_close()

void grey_close ( )

Definition at line 1381 of file ze-grey.c.

◆ grey_dbcount()

int grey_dbcount ( int  )

Definition at line 3046 of file ze-grey.c.

◆ grey_dump()

int grey_dump ( int  fd,
char *  which,
time_t  dt 
)

Definition at line 2685 of file ze-grey.c.

◆ grey_init()

bool grey_init ( char *  ,
bool  ,
int   
)

Definition at line 1326 of file ze-grey.c.

◆ grey_list()

bool grey_list ( int  ,
int   
)

◆ grey_reload()

bool grey_reload ( )

Definition at line 1393 of file ze-grey.c.

◆ grey_remove_entries_from_file()

bool grey_remove_entries_from_file ( char *  where,
char *  fname 
)

Definition at line 1031 of file ze-grey.c.

◆ grey_remove_entry()

bool grey_remove_entry ( char *  where,
char *  key 
)

Definition at line 1019 of file ze-grey.c.

◆ grey_set_cleanup_interval()

bool grey_set_cleanup_interval ( time_t  tclean)

Definition at line 459 of file ze-grey.c.

◆ grey_set_compat_domain_check()

void grey_set_compat_domain_check ( bool  enable)

Definition at line 473 of file ze-grey.c.

◆ grey_set_delays()

bool grey_set_delays ( time_t  tp_min_norm,
time_t  tp_max_norm,
time_t  tp_min_null,
time_t  tp_max_null 
)

Definition at line 399 of file ze-grey.c.

◆ grey_set_dewhite_flags()

void grey_set_dewhite_flags ( char *  ,
bool   
)

Definition at line 1772 of file ze-grey.c.

◆ grey_set_lifetime()

bool grey_set_lifetime ( time_t  tv,
time_t  tw,
time_t  tb 
)

Definition at line 422 of file ze-grey.c.

◆ grey_set_max_pending()

bool grey_set_max_pending ( int  normal,
int  bounce 
)

Definition at line 442 of file ze-grey.c.

◆ grey_set_tuples()

bool grey_set_tuples ( char *  ip,
char *  from,
char *  to 
)

Definition at line 355 of file ze-grey.c.

◆ grey_upload()

int grey_upload ( char *  fname,
char *  which 
)

Definition at line 2774 of file ze-grey.c.

◆ grey_validate()

int grey_validate ( char *  ,
char *  ,
char *  ,
char *   
)

Definition at line 825 of file ze-grey.c.

◆ remote_grey_check()

int remote_grey_check ( char *  ip,
char *  from,
char *  to,
char *  hostname 
)

Definition at line 495 of file ze-grey-client.c.

◆ remote_grey_quit()

void remote_grey_quit ( )

Definition at line 922 of file ze-grey-client.c.

◆ remote_grey_validate()

int remote_grey_validate ( char *  ip,
char *  from,
char *  to,
char *  hostname 
)

Definition at line 706 of file ze-grey-client.c.

◆ set_grey_dewhitelist_threshold()

void set_grey_dewhitelist_threshold ( double  val)

Definition at line 39 of file ze-grey-cleanup.c.