On 10/01/14 13:27, xMANIGHTx wrote:
I saw that exim has a ratelimit functionality for outgoing mails: <http://www.exim.org/exim-html-current/doc/html/spec_html/ch-access_control_ lists.html#SECTratelimiting> http://www.exim.org/exim-html-current/doc/html/spec_html/ch-access_control_l ists.html#SECTratelimiting
It's simpler to use it to limit (or alert on) the rate of acceptance of mails, but since every mail must be accepted before it is sent outbound this amounts to the same thing.
I was wondering if and how to set a domain wide limit for example that will block (and eventually send an alert to admins) emails if the daily (or hourly or whatever interval) number exceed the set limit and then be able to configure a different limit on a email account basis. I'm talking about authenticated senders of course.
Read the manual chapters on ACLs. You probably want to place this in the MAIL ACL, but possibly elsewhere depending on your existing config. Read also the list of expansion variables.
For example: limit all email accounts sending from @mydomain.com to 100 emails/day (per each email account on this domain) and then set special rules for [email protected] and [email protected] so that each of them can send 500 emails/day instead.
The ratelimit can depend on just about anything; a string depending on the account but looked up in a database, to give different per-account values, is perfectly feasible. Likewise, so is a per-domain ratelimit. -- Cheers, Jeremy -- ## List details at https://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/
