From e794e4d837437df372816590670a8b613e4c7cd4 Mon Sep 17 00:00:00 2001 From: Matthew Saunders Brown Date: Tue, 3 Dec 2024 12:41:19 -0800 Subject: [PATCH] proper quote sql query for rate limit --- etc/exim4/exim4-bookworm.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/exim4/exim4-bookworm.conf b/etc/exim4/exim4-bookworm.conf index 2b63924..7303950 100644 --- a/etc/exim4/exim4-bookworm.conf +++ b/etc/exim4/exim4-bookworm.conf @@ -370,7 +370,7 @@ acl_rcpt_to: # 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_mboxes WHERE vm_mboxes.mbox="$sender_address_local_part" AND vm_mboxes.domain='$sender_address_domain'}{$value}{10}} + set acl_m_ratelimit_hourly = ${lookup mysql{SELECT IFNULL(vm_mboxes.ratelimit, 100000) FROM vm_mboxes WHERE vm_mboxes.mbox="${quote_mysql:$sender_address_local_part}" AND vm_mboxes.domain="${quote_mysql:$sender_address_domain}"}{$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