Skip to content

Create a option to ratelimit outgoing email #3

Description

@madeITBelgium

https://www.digitalocean.com/community/questions/restricting-outgoing-smtp-with-exim

http://www.exim.org/exim-html-current/doc/html/spec_html/ch-access_control_lists.html#useratlim

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

Slow down fast senders; note the need to truncate $sender_rate

at the decimal point.

warn ratelimit = 100 / 1h / per_rcpt / strict
delay = ${eval: ${sg{$sender_rate}{[.].*}{}} -
$sender_rate_limit }s

Keep authenticated users under control

deny authenticated = *
ratelimit = 100 / 1d / strict / $authenticated_id

System-wide rate limit

defer message = Sorry, too busy. Try again later.
ratelimit = 10 / 1s / $primary_hostname

Restrict incoming rate from each host, with a default

set using a macro and special cases looked up in a table.

defer message = Sender rate exceeds $sender_rate_limit
messages per $sender_rate_period
ratelimit = ${lookup {$sender_host_address}
cdb {DB/ratelimits.cdb}
{$value} {RATELIMIT} }

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions