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

Feature: onConnect handler (similar to smtp-server) #540

Closed
titanism opened this issue Oct 16, 2023 · 3 comments
Closed

Feature: onConnect handler (similar to smtp-server) #540

titanism opened this issue Oct 16, 2023 · 3 comments

Comments

@titanism
Copy link
Contributor

Right now when a new IMAP connection is created, init() is called, however there's no exposed handler for custom WildDuck servers to add a custom handler for onConnect (similar to smtp-server supporting an onConnect handler).

It would be great to have this supported, since you could then block connections programmatically from session.remoteAddress addresses, add global rate limits per IP, and more.

/**
* Initiates the connection. Checks connection limits and reverse resolves client hostname. The client
* is not allowed to send anything before init has finished otherwise 'You talk too soon' error is returned
*/
init() {

https://github.com/nodemailer/smtp-server/blob/ce14fcc60c3144d55c752e64287cb3c1cf1b8108/lib/smtp-connection.js#L178

https://github.com/search?q=repo%3Anodemailer%2Fsmtp-server%20onConnect&type=code

titanism added a commit to forwardemail/forwardemail.net that referenced this issue Oct 18, 2023
Copy link
Contributor

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 15 days.

Copy link
Contributor

github-actions bot commented Mar 2, 2024

This issue was closed because it has been stalled for 15 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 2, 2024
@titanism
Copy link
Contributor Author

@andris9 can you please re-open? Similar to #721

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