Ask HN: What is cheapest way to just receive (not send) email to a domain I own?

7 points by andrewfromx ↗ HN
No $12 a month, I want 0 if possible. I just need to be able to use it as "work email" to sign up for stuff and get the code sent.

25 comments

[ 2.9 ms ] story [ 54.7 ms ] thread
Assuming that you already have an internet connection at home and assuming your ISP allows port 25 inbound and assuming you are not behind CG-NAT, then the cheapest option would be opening port 25 on your home router and forwarding it to a machine running postfix or a mail server of your choice would be the cheapest.

Most ISP's block outbound port 25 now, but many still allow 25 inbound which works fine for receiving email as per your requirements assuming you can DNAT port 25.

If your home IP is not static then you can use dynamic DNS to update the IP for your home. Use a Dynamic DNS client to update "somename" whatever name you choose for your home IP. This assumes your DNS provider supports dynamic DNS or has an API that works with a dynamic DNS client. You will not likely be able to update the PTR record unless you are on a tiny and very cool ISP but this is fine as FRrDNS is not required for receiving emails.

    somename     1h in a your.home.ip.address
    @            1d in mx somename.yourdomain.tld.
yeah but setting up postfix is not simple. Is there an easier thing to install that just listens on 25 and prints out the text of all incoming messages to stdout?
Setting up postfix to be a receiver is actually quite straightforward.

Most of the defaults can be left alone, and you'd just need to edit one config file (main.cf) and the comments provided in main.cf all but guide you through the process. What you'd need to edit relates to the aspects that are unique to your server (domain name, domains it should receive email for, etc.).

You could do as LinuxBender suggests but roll out a simple Python SMTP server (there's a standard module) instead of Postfix.
I agree with pwg that postfix is fairly straight forward but to answer your question there are debugging programs that capture email such as mailpit [1] but I don't know if you would consider that to be easier. I have not tried it out yet as I have always used smtp-sink for debugging part of postfix tools. Mailpit has a nifty web UI and claims to process 70 to 100 emails per second.

The reason I suggested Postfix is due to the nature of it being on many internet facing servers and being battle-hardened over the decades and having started off very secure. Anything else should probably be confined behind bubblewrap and AppArmor or SELinux.

Regardless of what tool you end up using consider adding firewall rules to explicitly block outbound SMTP in the event someone finds a way to relay through whatever tool you end up using as a bumper-guard against configuration mistakes and bugs.

[1] - https://github.com/axllent/mailpit

Cloudflare has free email routing.
I use a $5 VPS and a couple of Python scripts, one for SMTP and one for POP3. I use the latter with GMail so it can collect the mails. But before I wrote that POP3 server I would just log in and cat the files the SMTP server wrote for each inbound email.
Is it possible to "own" an ICANN domain name. In the past, one had to keep paying ICANN and an ICANN registrar every month/year or else the domain would be rented/leased to someone else, often the registrar itself.
That's what own means in this context. Nothing has changed.
I have been using Gandi for this, even with their pricing change, email aliases (just for receiving email, to any other email address (e.g. gmail)) are still free. I use them extensively.
Be aware. Gandi is changing that https://www.gandi.net/en/domain/email . It's not free anymore. Right now I own a few domains with Gandi, but I use iCloud+ for emails.
My understanding is that the aliases are still free, no? There's no mailbox, the mail is just forwarded to whatever address you provide.

They've done a horrible job of communicating these changes so perhaps I'm mistaken.

Do you have anything running on the domain? Like if you have a webhost already, that changes the answer

Cheapest option is to have a self-hosting friend like me and I just create a login for you on my email server and you point the MX records there

Surprising that no one said this but receiving email is as easy as setting up mail forwarding in the DNS records with the domain registrar. Just Google how to do it with your registrar and you are set. Shouldn’t have any cost at all.
zoho.com gives 5 emails for free FOREVER. setup the mx records and that's set.
Cloudflare sell domain registration "at cost", and offer free Email Routing. So that's quite possibly as cheap as it gets in the long term.
iCloud+ is $0.99/month and you have the possibility to setup custom email domains. I setup my custom email domain (the domain is hosted on Gandi) like a month ago, it was straightforward. Also, the "hide my email" feature is handy.
Cloudflare's service works well for this
Buy a super cheap email domain for ~3$ a year and set the domain to forward all email it receives (wildcard) to a predefined email address you control. Namecheap will forward emails for free.
I do this. Namecheap. Just do $10/y for the domain then forward everything to gmail using the free forwarders.
Cloudflare does this for free