-------------------------------------------------------
IceWarp Flood Blocker
Author: IceWarp Italia - (2012 - 2020)
-------------------------------------------------------

=== What's this? ===

IceWarp Flood Blocker is a tool meant to prevent IceWarp Server's SMTP from being used for malicious activities like sending lots of junk messages to remote recipients. It does so by disabling all the accounts that have sent out more than a specified amount of messages in a specified range of days.
The tool works on both Windows and Linux-based OS.


=== How can I install it? ===

Put the whole "floodblocker" folder in your IceWarp Server's WebRoot 

<IceWarp_path>\html

Modify the $from, $to and $limit parameters to set the time range and message amount limit. Default setting is a maximum of 100 messages in one day.

Modify the parameters that control the warning message that is sent each time an account gets disabled:

$com1->RemoteHost	Sending SMTP
$com1->Helo			Helo Command Hostname

$com1->MailFrom		Sender Email Address

$rcpt_name			Recipient Name
$rcpt_address			Recipient Email Address

$com1->IsHTML		HTML Support
$com1->FromName		Sender Header Name 
$com1->FromAddress	Sender Header Address
$com1->Subject		Message Subject
$msg_body			Message Body

Create a scheduled task [System > Tools > Tasks & Events], of the URL type, that executes http://<serverhostname>/html/floodblocker/

Every execution is logged into the log.txt file which has 3 logging levels controlled by the $log_level variable

0 - Disabled
1 - Summary (Default)
2 - Complete