This is a Discourse plugin that checks if a user is using a so-called “disposable email” when signing up via email/password. It leverages the free API provided by https://open.kickbox.com/
If a disposable email is detected, the user is notified in the signup form and is being asked to use another email.
Kickbox provides a free, open API endpoint for checking a domain or email address against a frequently-updated list of disposable domains. CORS is enabled for all originating domains, so you can call the API directly from your client-side code.
Disposable email addresses are one-time use addresses. Sometimes they are forwarded to a real address to track sites that send other unsolicited mail.
This is my first plugin and I am completely new to Ruby. So any feedback and PR, if you see any errors or room for improvement is welcome.
Furthermore, it only checks the email on the signup form, not the one that is used to change your email once you’re an approved user in the preferences. This is beyond my knowledge of how to do this for now, but PR welcome.
In addition, you can change the URL to the API endpoint e.g. to one you control and developed on your own. As long as the endpoint responds with JSON {“disposable”: true | false} it should work.
We do it like that and double-check results from Kickbox via a paid service called Debounce. That being said Kickbox catches quite a lot of bogus email addresses out-of-the-box.
Anyways, this should help to make Discourse communities even more secure and spam free.