Auteur: Charlie Elgholm Date: À: exim-users Sujet: [exim] Fwd: Rate-limit queue-processing per domain
2017-10-18 16:41 GMT+02:00 Jeremy Harris <jgh@???>: > On 18/10/17 11:42, Charlie Elgholm wrote:
> > Is there some way to have Exim rate-limit the queue runners, so they only
> > process - let's say 10 messages per minute - for a domain (like
> > outlook.com/live.com) - _regardless_ of how the message was put in the
> > queue.
>
> No. The queue-runners just don't do that.
>
> You'd need to DIY; something like "take the first 10 id's from the
> spooldir, once a minute, and run 'exim -M'". Possibly using
> a named-spool for each class of such mails you wanted to keep separate.
Ok, that's sad.
The infrastructure for it all is already on the code base:
1. There's something returning true/false if a mail should be
processed in the queue (since frozen-messages is skipped).
2. There's a rate-limit command already, highly configurable.
3. There's a "rule-system" (executed for the ACLs).
Since I've never been in the codebase for Exim before, and haven't
done anything in C/C++ for the last 20 years I shouldn't put my nose
in there, but I can't really see why it would be hard - or for that
sake a bad idea. =)
Why not have an "ACL" run each time a mail gets picked up by a queue
runner? Then one can implement whatever rules one want there, and have
it return true/false (accept/deny) if the mail should be processed
(delivered), and easily utilize the already powerful rate-limit
command (ie. based on a time and the recipient domain). That would be
extremely useful and powerful.
Everyone that uses Exim nowadays, year 2017, with large queues will
get blocked/blacklisted by the big email providers - since they all
have implemented some kind of rate-limit for incoming mail (both from
a single-ip and for a sender-domain).
I'll see if I can find the place in the code where Exim decides if it
should deliver a mail or skip in and move on, and then search for how
the rate-limiter gets called. Then it's just a matter of putting them
together....