DEV Community

Cover image for Best Way to Avoid E-mail Spam
Simon Egersand 🎈
Simon Egersand 🎈

Posted on • Updated on • Originally published at prplcode.dev

Best Way to Avoid E-mail Spam

The best way to avoid e-mail spam messages is not as difficult as you may think. E-mail service providers such as Gmail, Outlook, and Yandex do a good job of identifying and filtering out spam for you. But there’s one trick you can use to completely avoid it.

But first, let’s talk about what makes a valid e-mail address.

The E-mail Address Format πŸ“§

The first e-mail was sent in 1971 and since then billions of e-mails have been sent, with roughly 85% (!) of them being spam e-mails. Thirty years later in 2001, RFC 2822 (Request For Comments) was agreed upon. This led to the legality of plus (+) signs in e-mail addresses.

Best Way to Avoid E-mail Spam πŸš€

Now, why does the RFC matter? It matters because it states an e-mail that contains a plus (+) sign is a valid e-mail address. And large e-mail provider services treat whatever follows the plus sign as a tag, and still send the e-mail to your address.

Let me give you a real-life example. Let’s say I have an e-mail, simon@gmail.com, and I want to sign up for Amazon. I input simon+amazon@gmail.com as my e-mail address. If the e-mail parsing logic follows the standard, this will be accepted and I will receive the verification e-mail shortly after.

Now let’s say Amazon’s customer e-mail database leaks. Some naughty person gets ahold of them and sends spam messages to them all. My messages are sent to simon+amazon@gmail.com. When I notice this I create a filter to forward any e-mails sent to simon+amazon@gmail.com to the trash can. Or even some custom category where I can do with them as I please.

Conclusion

Using a plus (+) sign in your e-mail address lets you control e-mails coming from specific websites and services. Use a tag in your e-mail address to control unwanted spam messages. You can identify and control what you do with them using the settings for your e-mail. Easy as pie!


Follow me on Twitter @prplcode

Originally published at https://prplcode.dev

Top comments (1)

Collapse
 
rmcampos profile image
Ricardo Campos

Interesting! It would be nice to know who does and who doesn't follow the RFC.