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

Add support for pool_concurrency_max in version 3 #54

Open
leadbi opened this issue Dec 9, 2023 · 5 comments
Open

Add support for pool_concurrency_max in version 3 #54

leadbi opened this issue Dec 9, 2023 · 5 comments

Comments

@leadbi
Copy link
Contributor

leadbi commented Dec 9, 2023

Is your feature request related to a problem? Please describe.
We are having issues with delivering emails to some hosts that limit the number of connection that can be opened.
In the version 2 it was possible to limit the number of connections opened using pool_concurrency_max.

Example error:

421 smtp-19.iol.local smtp-19.iol.local Too many connections, slow down [smtp-19.iol.local; 

Will it be possible to add support for it in v3?

Describe the solution you'd like
Add the generic-pool implementation from version 2, with this added, the number of connections open to a host can be controlled from a plugin as well.

Also implemented a plugin to limit the delivery speed to some domains and that fixed error messages related to Too many messages, slow down error.

But for connections is not possible to control the number of connections open to a host from a plugin (without forking haraka).

Describe alternatives you've considered
Tried to fix the issue using concurrency_max setting, but lowering this value slows the delivery for all hosts and I want to be able to lower only for domains that don't support a higher number of connections.

Additional context
We are using haraka to send email campaigns and when we warmup new ips some email providers impose limitations regarding the number of emails sent and the number of connection opened.

Let me know if this is a good idea, maybe there was a good reason why it was removed.

@msimerson
Copy link
Member

See haraka/Haraka#3115

@msimerson
Copy link
Member

Adding back pooling support with generic-pool would not be welcome. However, adding support with nodemailer-smtp-pool might be worth investigating.

@msimerson
Copy link
Member

This may be a duplicate of #53

@leadbi
Copy link
Contributor Author

leadbi commented Dec 12, 2023

Ideally support for limiting outbound connections should be added so that the limit plugin can enforce them and make them configurable.

@msimerson msimerson transferred this issue from haraka/Haraka Dec 14, 2023
@msimerson
Copy link
Member

Did you try using outbound limits? It looks like it should work. Just add something like this to your limit.ini file:

[outbound]
iol.local=3

That should limit the number of outbound connections to the host iol.local to 3.

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

2 participants