diff --git a/etc/exim4/exim4.conf b/etc/exim4/exim4.conf index 4e1dc0c..9351fba 100644 --- a/etc/exim4/exim4.conf +++ b/etc/exim4/exim4.conf @@ -373,11 +373,12 @@ acl_rcpt_to: # Hourly rate limit is extracted from db, multiplied by 10 to get daily rate limit. # The idea being that the hourly rate limit should be a maximum, peak rate, not a sustained rate. # The default ratelimit of 100000 is meant to be so high as to never be reached (no limit). + # A second default of 10 is set for lookup failures. This shouldn't happen unless there is a misconfiguration somewhere or a database issue. # The primary purpose of rate limiting is fighting spam, either by an abusive user or a # compromised account, not to restrict legitimate users. Set your defaults & limits accordignly. warn authenticated = * - set acl_m_ratelimit_hourly = ${lookup mysql{SELECT IFNULL(vm_mboxes.ratelimit, 100000) FROM vm_domains, vm_mboxes WHERE vm_domains.domain="$sender_address_domain" AND vm_mboxes.mbox="$sender_address_local_part" AND vm_domains.id = vm_mboxes.domain_id}} + set acl_m_ratelimit_hourly = ${lookup mysql{SELECT IFNULL(vm_mboxes.ratelimit, 100000) FROM vm_domains, vm_mboxes WHERE vm_domains.domain="$sender_address_domain" AND vm_mboxes.mbox="$sender_address_local_part" AND vm_domains.id = vm_mboxes.domain_id}{$value}{10}} set acl_m_ratelimit_daily = ${eval: (10 * $acl_m_ratelimit_hourly) } ratelimit = 0 / 1h / per_mail / strict / $authenticated_id log_message = Sender rate is $sender_rate/$sender_rate_period for $authenticated_id