ze-filter  (ze-filter-0.8.0-develop-180218)
Filter : SMTP Rate Limit

Macros

#define USE_SMTPRATE   1
 
#define RATE_CONN   0
 
#define RATE_RCPT   1
 
#define RATE_BOUNCE   2
 
#define RATE_MSGS   3
 
#define RATE_HAM   4
 
#define RATE_SPAM   5
 
#define RATE_SCORE   6
 
#define RATE_XFILES   7
 
#define RATE_VOLUME   8
 
#define RATE_SVCTIME   9
 
#define RATE_FROM_CONN   10
 
#define RATE_FROM_MSGS   11
 
#define RATE_FROM_RCPT   12
 
#define RATE_AUTH_CONN   13
 
#define RATE_AUTH_MSGS   14
 
#define RATE_AUTH_RCPT   15
 
#define RATE_DIM   20
 
#define DEFAULT_WINDOW   -1
 

Functions

void connopen_reset ()
 
int connopen_check_host (char *, char *, int)
 
bool connopen_clean_table ()
 
void connopen_print_table (int)
 
bool smtprate_init (size_t, size_t)
 
void smtprate_free ()
 
bool smtprate_resize (size_t, size_t)
 
bool smtprate_cleanup_table (time_t now, time_t win)
 
int smtprate_update_table (time_t)
 
void smtprate_log_table ()
 
void smtprate_print_table (int, int, int, int, time_t, uint32_t, int)
 
void smtprate_save_table (char *)
 
int smtprate_read_table (char *)
 
uint32_t smtprate_str2flags (char *)
 
int smtprate_add_entry (int, char *, char *, int, time_t)
 
int smtprate_check (int, char *, time_t)
 

Variables

unsigned int smtprate_interval
 
unsigned int smtprate_window
 

Detailed Description

Control and limit various rates during SMTP session

Macro Definition Documentation

◆ DEFAULT_WINDOW

#define DEFAULT_WINDOW   -1

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

◆ RATE_AUTH_CONN

#define RATE_AUTH_CONN   13

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

◆ RATE_AUTH_MSGS

#define RATE_AUTH_MSGS   14

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

◆ RATE_AUTH_RCPT

#define RATE_AUTH_RCPT   15

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

◆ RATE_BOUNCE

#define RATE_BOUNCE   2

Definition at line 53 of file ze-smtprate.h.

◆ RATE_CONN

#define RATE_CONN   0

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

◆ RATE_DIM

#define RATE_DIM   20

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

◆ RATE_FROM_CONN

#define RATE_FROM_CONN   10

Definition at line 62 of file ze-smtprate.h.

◆ RATE_FROM_MSGS

#define RATE_FROM_MSGS   11

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

◆ RATE_FROM_RCPT

#define RATE_FROM_RCPT   12

Definition at line 64 of file ze-smtprate.h.

◆ RATE_HAM

#define RATE_HAM   4

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

◆ RATE_MSGS

#define RATE_MSGS   3

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

◆ RATE_RCPT

#define RATE_RCPT   1

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

◆ RATE_SCORE

#define RATE_SCORE   6

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

◆ RATE_SPAM

#define RATE_SPAM   5

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

◆ RATE_SVCTIME

#define RATE_SVCTIME   9

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

◆ RATE_VOLUME

#define RATE_VOLUME   8

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

◆ RATE_XFILES

#define RATE_XFILES   7

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

◆ USE_SMTPRATE

#define USE_SMTPRATE   1

Definition at line 33 of file ze-smtprate.h.

Function Documentation

◆ connopen_check_host()

int connopen_check_host ( char *  ,
char *  ,
int   
)

Definition at line 151 of file ze-connopen.c.

◆ connopen_clean_table()

bool connopen_clean_table ( )

Definition at line 247 of file ze-connopen.c.

◆ connopen_print_table()

void connopen_print_table ( int  )

Definition at line 313 of file ze-connopen.c.

◆ connopen_reset()

void connopen_reset ( )

Definition at line 136 of file ze-connopen.c.

◆ smtprate_add_entry()

int smtprate_add_entry ( int  ,
char *  ,
char *  ,
int  ,
time_t   
)

Definition at line 363 of file ze-smtprate.c.

◆ smtprate_check()

int smtprate_check ( int  ,
char *  ,
time_t   
)

Definition at line 479 of file ze-smtprate.c.

◆ smtprate_cleanup_table()

bool smtprate_cleanup_table ( time_t  now,
time_t  win 
)

Definition at line 552 of file ze-smtprate.c.

◆ smtprate_free()

void smtprate_free ( )

Definition at line 326 of file ze-smtprate.c.

◆ smtprate_init()

bool smtprate_init ( size_t  ,
size_t   
)

Definition at line 263 of file ze-smtprate.c.

◆ smtprate_log_table()

void smtprate_log_table ( )

Definition at line 860 of file ze-smtprate.c.

◆ smtprate_print_table()

void smtprate_print_table ( int  ,
int  ,
int  ,
int  ,
time_t  ,
uint32_t  ,
int   
)

◆ smtprate_read_table()

int smtprate_read_table ( char *  )

Definition at line 784 of file ze-smtprate.c.

◆ smtprate_resize()

bool smtprate_resize ( size_t  ,
size_t   
)

Definition at line 349 of file ze-smtprate.c.

◆ smtprate_save_table()

void smtprate_save_table ( char *  )

Definition at line 737 of file ze-smtprate.c.

◆ smtprate_str2flags()

uint32_t smtprate_str2flags ( char *  )

Definition at line 1150 of file ze-smtprate.c.

◆ smtprate_update_table()

int smtprate_update_table ( time_t  )

Definition at line 598 of file ze-smtprate.c.

Variable Documentation

◆ smtprate_interval

unsigned int smtprate_interval

Definition at line 118 of file ze-smtprate.c.

◆ smtprate_window

unsigned int smtprate_window

Definition at line 119 of file ze-smtprate.c.