When trying to send emails, if you get “rejected by local scanning code” error:
A message that you sent was rejected by the local scanning code that
checks incoming messages on this system. The following error was given:
Website of user admin is sending too many emails - rate overlimit = 200.2 /
1h
Solution:
Edit /etc/exim4/exim4.conf.template
# Limit per user for PHP scripts
acl_not_smtp:
deny message = Website of user $authenticated_id is sending too many emails - rate overlimit = $sender_rate / $sender_rate_period
ratelimit = 200 / 1h / $authenticated_id
warn ratelimit = 100 / 1h / strict / $authenticated_id
log_message = Sender rate [limitlog]: log / account / $authenticated_id / $sender_rate / $sender_rate_period