[exim-dev] [Bug 1212] Individual recipients_max per sender h…

Top Page
Delete this message
Reply to this message
Author: Jan van den Berg
Date:  
To: exim-dev
Old-Topics: [exim-dev] [Bug 1212] New: Individual recipients_max per sender host IPrecipients_max
Subject: [exim-dev] [Bug 1212] Individual recipients_max per sender host IP
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1212

Jan van den Berg <jan.vandenberg@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jan.vandenberg@???





--- Comment #2 from Jan van den Berg <jan.vandenberg@???> 2012-02-22 18:41:53 ---
Hi,

fwiw. I decided to try and look at the problem myself and threw together a
patch.
The principal works (exactly) like how smtp_accept_max_per_host works. So my
code is also heavily 'borrowed' from that part (in daemon.c).

This means that with this patch there is a new exim.conf variable available:
recipients_max_exception_hosts. This variable points to a file on disk with a
bunch of host IPs and every IP has a value next to it (the number of maximum
recipients allowed for that host). So in exim.conf it would look like this:

recipients_max_exception_hosts =
${lookup{$sender_host_address}iplsearch{/usr/local/exim/etc/rcpt.hosts}}

And rcpt.hosts look like:
12.34.2.254 1000
23.45.54.250 1250
etc.

This way it is possible to have a global recipients_max value AND have
exceptions for it (what we need!).
So far this seems to work pretty good for non-local, non-batched, "smtp in"
connections (because I only focused on that part).
But I am not familiar with all the exim functions or variables for that matter
so maybe this is a completely wrong way of doing this (or a memory/resource
hog), or maybe I am missing something else.
So I'd love to hear some feedback or ways this 'feature' can be improved.

Thanks,
Jan van den Berg


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email