On Fri, 26 Feb 2010 15:31:32 +0000
Andrew Hearn <[email protected]> wrote:

> However, is there a way to ratelimit or deny hosts based on how many
> messages they've sent that have been rejected/deferred by the recipients MX?
> 
> Eg, if we've tried to relay messages for a host, and 100 in the past
> hour have been denied or deferred by the recipients MX, then we can
> block the sender from sending more. (as well as log it and contact the
> customer)
You could try to tail the exim/mainlog and analyze it for corresponding 
records. I didnt find simple way to achive this.

I'd do this in perl:
* prepare a hash with msg id as a key and so called fail-counter as value
* collect all receive records ("<=" with P=esmtp) to hash with msg id as a key 
and content of "H=" as value.
* check every fail ("**") or defer ("==") record for msg id and increase 
corresponding fail-counter; if the counter runs out of limit - do some action 
for host
* if the date has changed, reset all counters

Please write to this list if you find a proper solution for your task.

----
--
Anthony G. Nickolayev
email services
system administrator
JSC "AC Mobiltelecom"
+7-(3012)-29-70-21
[email protected]

-- 
## List details at http://lists.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to