Much of the info on the Internet about setting up an email with a custom domain is outdated. So I’m doing a little update on the various ways of implementing email for a personal website. Then I’ll show how I did it.
My requirements are:
- Custom domain,
- Being notified in a mail client / app, or forwarding to my Gmail.
There are many services for setting up email these days:
Self-hosted (usually Postfix and Dovecot):
Home setup: This is clearly the best solution for control and privacy. The sad truth is that it is too difficult these days to setup email for most. You would likely need to setup several daemons (SMTP, IMAP/POP, DKIM) as well as SPF rules and a spam filter. And these parts interconnect heavily, may go down, etc. So you’ll probably want to look elsewhere. Unless you deal with sensitive information, but not ones that justify using end-to-end encryption such as PGP. See more info here.
Dedicated or VPS: You keep the control of your own server for a fraction of the time and cost investment, but lose most of the privacy advantage. Even less worth it in my opinion.
Paid (Google’s G Suite, Office 365 Business Email, Outlook Premium, Protonmail, Rackspace, 1and1 and thousands of others): Here you start to have various degrees of service, with storage, features and privacy options being the most significant. 1and1 is the cheapest at $1/month, Protonmail claims to be the most secure,and G Suite and Office throw in an online productivity suite.
Free (Yandex, Migadu): I would have once included Zoho here. Unfortunately they have started paywalling the forwarding, POP and IMAP features, forcing users to use their webmail or mobile apps, making the platform useless to most. The remaining options are Migadu and Yandex. Yandex is what you’d expect from a huge Russian company, heavier, and you’ll probably expect to leave all expectation of privacy at the door. Migadu is minimalistic, efficient and seems to care about privacy, but they insert “Sent by Migadu“ at the end of each message and are quite limited.
As usual, I care about getting things done first and foremost.
And since I intend to use my mailbox either for non-sensitive content or for encrypted email and I consider hosted options to be equivalent, I care about money and reliability more than privacy.
- I don’t have the means to get a self-hosted server at this time, so that’s out.
- Since top-notch privacy was out, paid hosted webmail looked equivalent to free.
- I quickly invalidated the forwarding services as you can see above. There’s a way to mix Mailgun for receiving and SendGrip (a mailing list service) but that’s overkill and not as reliable in my opinion.
- What’s left is free hosted webmail. With Migadu out, Yandex is the last candidate standing.
Here’s how I connected Yandex to my domain, as well as set it up with Gmail to send and receive emails:
Sign up for Yandex Mail and open a normal free webmail
Verify your domain here by either putting some HTML file on your server or setting up a CNAME record. I recommend doing the former because Yandex does not detect DNS changes quickly for some reason.
After that you’ll be told to set up an MX record. I would also setup SPF and DKIM record, you can see those by pressing “DNS editor” after having verified your domain and seeing the TXT records that Yandex delegated DNS would have created. I also created a CNAME from
domain.mail.yandex.net.so that my mail subdomain redirects to my Yandex webmail. This is my resulting setup with Namecheap DNS:
Complete the process on the page by setting a username. By now, the email should work with your custom domain.
In general, you can use Yandex’s IMAP and SMTP info to configure desktop or mobile clients. I use Gmail so my setup will be a little different.
Let’s start with the way to setup forwarding from Yandex to another address.
Head to Yandex’s webmail, click on the gear on the top right and then on message filtering.
Setup a new filter that forwards all mail to your second mailbox.
Make sure it looks something like this:
Now with the other direction. I use Gmail so this is how you set it up to send mail with through another SMTP server, specifically Yandex’s.
Head to Gmail’s settings > Accounts & Import, focus on “Send mail as”, click on “Add another email address”.
Provide the user you use on Yandex, then Yandex’s SMTP server and your login info. Make sure to uncheck using this address as an alias.
That should be it. Test your setup and you’re done.