mirror of
https://github.com/decke/smtprelay.git
synced 2026-04-25 04:45:52 +03:00
[PR #168] [DONOTMERGE] Add the ability to keep mail delivery under a threshold (rate limit) and resend when the relay falls below the threshold again. #172
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/smtprelay#172
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/decke/smtprelay/pull/168
Author: @barais
Created: 11/25/2024
Status: 🔄 Open
Base:
master← Head:master📝 Commits (1)
fb4e3efintroduce a way to remain below a threshold for the mail throughput📊 Changes
10 files changed (+202 additions, -28 deletions)
View changed files
➕
Dockerfile(+25 -0)📝
README.md(+2 -1)📝
go.mod(+7 -3)📝
go.sum(+20 -0)📝
main.go(+10 -12)➕
ratelimiter.go(+67 -0)📝
remotes.go(+31 -7)➕
send4mail.sh(+6 -0)📝
smtp.go(+25 -0)📝
smtprelay.ini(+9 -5)📄 Description
When you have a huge amount of mail to deliver, you can't release the queue at once and let the server maximize the outgoing mail throughput ! The result will be: you'll get blacklisted from a lot of MX servers.
That's why you should take care of it and do traffic shaping
Many smtp providers (even those from universities) impose threshold values in terms of the number of messages sent per (message/mins or per message/hour) and the number of recipients...
As a result, it is sometimes required to stay below these thresholds. Particularly when emails are sent by applications. This PR provides a small extension to this great smtprelay project to add this feature. I don't think this PR should be merged because it goes against the original spirit of keeping the code very small without too many dependencies. The idea of the PR is undoubtedly to keep a history of this addition, which is so useful to others, but it can be closed without comment.
[1] #155
[2] Dependencies to otter and go-limiter
[3] Close to https://wiki.deimos.fr/Postfix:_limit_outgoing_mail_throttling
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.