Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a option to ratelimit outgoing email #3

Open
madeITBelgium opened this issue Nov 24, 2017 · 1 comment
Open

Create a option to ratelimit outgoing email #3

madeITBelgium opened this issue Nov 24, 2017 · 1 comment
Milestone

Comments

@madeITBelgium
Copy link
Owner

madeITBelgium commented Nov 24, 2017

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} }

madeITBelgium pushed a commit that referenced this issue Dec 28, 2017
@madeITBelgium madeITBelgium modified the milestones: 0.0.8, 0.0.9 Jan 17, 2018
@madeITBelgium madeITBelgium modified the milestones: 0.0.9, 0.0.10 Feb 17, 2018
@madeITBelgium madeITBelgium removed this from the 0.0.10 milestone May 14, 2018
@madeITBelgium madeITBelgium added this to the 0.0.38 milestone Feb 9, 2023
@madeITBelgium
Copy link
Owner Author

Added, only add APIs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant