[exim] Throttle mail per source IP

Top Page
Delete this message
Reply to this message
Author: 3YSTech Services
Date:  
To: Exim-users
Subject: [exim] Throttle mail per source IP
Hello,

I am trying to throttle incoming email submissions per source IP.

The following limits inbound mail according to rate limit per host , then
rejects/drops any emails from source IP exceeded limits.

My questions is how to receive all inbound emails and use rate limit on
outbound mail processing to only send the rate of emails approved per
source IP.

Thanks


*Working exim.conf section *


acl_check_rcpt:

defer ratelimit = ${lookup {$sender_host_address} iplsearch
{/etc/exim/hosts_ratelimit} {$value} }
message = Sender rate exceeds $sender_rate_limit messages per
$sender_rate_period
log_message = Local sender rate limit $sender_rate / $sender_rate_period

*Format of /etc/exim/hosts_ratelimit*

10.10.10.1: 100 / 1h
10.10.10.2: 50 / 1h
10.10.10.3: 150 / 1h
*                1000 / 1h