Exim 4.52 / ratelimit

netmotiv8

Verified User
Joined
Sep 26, 2003
Messages
234
Location
UK
Hi,

We are running Exim 4.52 now, particularly as we want to use the mail limiting ACL, ratelimit. Is anyone doing the same, have you got the ratelimit working?


Neil :)
 
I think there is a daily rate limit set in the latest DA config but I am also interested in this new feature and would like to know if anyone is using it.
 
Hi,

I didnt realise DA had a limit option, how is that configured?

Is the per account or server wide?


Ratelimit in Exim seems very complex but if we can get it to work will be perfect for our requirements.

Neil :)
 
Its not really an option I think one is set in the exim.pl file somewhere.
 
We really want to make use of this new ratelimit function. We sketchy on using ACLs and the Exim forum has proved useless to get the information we need, so kind of hoping that our fellow DA users maybe able to offer help.

Neil :)
 
Revisiting an old subject.

The option in the exim/virtual/limit is nice, but it really only logs the number... after the predefined threshold.


Once the limit file has a number greater than 0, the exim.pl will start to count the number of emails sent by a user. In the /etc/virtual/usage directory, there will be 2 types of files. 'username' and 'username.bytes'. The bytes file will store how large each email was. The total sum of the bytes in that files will give the amount of outgoing smtp bandwidth used that day (this is always enabled). The other file ('username') is used to count the number of emails sent. Each email sent will add another byte to the file, so the exact size of the file is the number of emails sent.

When looking for a spammer, check the /etc/virtual/usage/username files to see a larger file, and also check /etc/virtual/usage/username.bytes, to look for a repeated size. Large number of same-sized emails generally indicates spam.

Exim can handle rate limiting via ACL's directly, but when I attempt to add any actual limiter it's spewing:


Starting exim: 2006-09-27 08:44:17 Exim configuration error in line 374 of /etc/exim.conf:
error in ACL: unknown ACL condition/modifier in "ratelimit = 300 / 1h / per_rcpt / strict"


According to a google search, these ACL rules should be valid - but as noted above in the error, they're not working.

Anyone successfully using ratelimit in their exim.conf ? I'd sure appreciate seeing your default configurations.



# Log all senders' rates
warn
ratelimit = 0 / 1h / strict
log_message = \
Sender rate $sender_rate > $sender_rate_limit / $sender_rate_period

# Slow down fast senders
warn
ratelimit = 100 / 1h / per_rcpt / strict
delay = ${eval: 10 * ($sender_rate - $sender_rate_limit) }

# Keep authenticated users under control
deny
ratelimit = 100 / 1d / strict / $authenticated_id

# System-wide rate limit
defer
message = Sorry, too busy. Try again later.
ratelimit = 10 / 1s / $primary_hostname



Thanks!

Joe
 
Hi Joe,

Did you get the above acl's to work or are you using something else for limiting emails sent by a user on hourly / daily bases?

Thanks

Rohit
 
Hi
It should be working well

i set the line as below:

deny message = sorry, you are senting too much emails to me
ratelimit = 180 / 5m /strict
 
Taking a fresh look today, a few years later, it appears that the ratelimit you can create in an ACL works on outgoing email, while the one in DirectAdmin works on incoming email.

Am i seeing it wrong?

Jeff
 
Delay emails with lot of recipients and atachments

Jeff, I´ve been looking for an ACL condition to delay delivery of mails with lot of recipients and heavy attachments. The idea is not to reject them but to delay delivery, for example 30seconds between each recipient. An example would be a sender that sends 3 emails with 100 recipients each and an attachment of 2000K. There is no way to explain them how to manage a mailing list, they do it that way and will not change.

This particular scenario is not solved through ratelimit nor recipients_max_reject because the idea is that they can send it but not at the same time.

I found an aCL in this link http://atmail.com/kb/category/exim/page/3/ in the section "Pushing large messages into queue" that says:

acl_check_content:
warn condition = ${if > {$message_size}{2000k} }
control = queue_only
message = X-Queue-Header: Filesize exceeded limit queued

But gives me an error 2010-07-28 01:10:47 Exim configuration error in line 491 of /etc/exim.conf:
error in ACL: unknown ACL verb in "condition = ${if > {$message_size}{1000k} }"

Do you have any clue how to solve it? I am using SpamBlocker 2.1.1
 
I've never attempted to do this and so I haven't come across the problem. Make sure you're using the latest version of Exim. Note that I personally support only my later versions; others can help you with the SpamBlocker version 2 included with DirectAdmin.

Are you sure the ACL is in the right place in the chain of ACLs? Check your example; I don't recall anything about acl_check_content and I've never used it.

Of course we can work on this for you as a commercial service, but my first steps would be to update to the latest RC of SpamBlocker version 3, and update to the latest version of Exim.

You don't need to pay me to do that.

Jeff
 
Re-living this thread... ;]
Any setup with the new version to limit the number of outgoing messages with a calculation of how many per minute ?

Thanks!
 
Back
Top