wildduck
wildduck copied to clipboard
Add message inbox event
Please, add inbox message event on webhooks
See https://github.com/nodemailer/wildduck/issues/274#issuecomment-713747499
@louis-lau what's the appropriate way to do it for now?
For example, if I want to pass every new message to some other service, how should I do it without a webhook? Fetching API endpoint every second?
What's the best way?
@scofield-ua If you don't need something global, you can subscribe to the eventstream of any specific user. That will notify you when a new message arrives.
If you do need something global, I'm pretty sure you can connect to mongodb from your application an watch the db for changes.
@louis-lau thanks for a quick response, by global do you mean something with a high load? I'm currently looking for a solution that will deal with a high load :)
I'm not very familiar with mongodb, by watch the db for changes
do you mean this - https://docs.mongodb.com/manual/changeStreams/
By global in this context I mean "all messages of all users".
do you mean this
Yes!
Keep in mind if you need events for a specific user (so non global), just use this api endpoint: https://docs.wildduck.email/api/#operation/getUpdates
Yeah I'm looking into something global, currently I'm not sure how to just catch all emails for a specific domain(s), so I created a user with *@domaim.com
address and trying to work it.
While that may be global in the context of a domain, that's still a single user ;).
I'm not sure how
Seems you're managing fine, or am I misunderstanding? :)
Using user for global stuff it's the only method I found so far. Maybe there is some better solution for it which you can recommend? Because as far I know users has some limitation which is bad in terms of the system where I want to collect any email for a set of domains.
I'm not sure what your usecase is, but if you want a single inbox for all mail of multiple domains, a single user is indeed the solution.
Because as far I know users has some limitation
What limitation is that?
Do you actually need IMAP access to the account? If you only need to feed the mail to your application you don't really need wildduck, you can just write a plugin for haraka that stores the email to your application.
All I need it's accept the mail and pass it next to the application.
but if you want a single inbox for all mail of multiple domains, a single user is indeed the solution
Okay, great.
Thank you for the answers.
What limitation is that?
for example this one: https://github.com/nodemailer/wildduck/issues/319
That's not really intended behaviour. The original poster didn't really elaborate on his specific issue or what could have cause it, but reate limits should only be applied after you've actually reached a set limit. If it didn't work that way it would be a bug :)
But again, I don't think you need wildduck for your usecase ;)
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.
This issue was closed because it has been stalled for 15 days with no activity.