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.).
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.
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.
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.
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.
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.
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.
25 comments
[ 2.9 ms ] story [ 54.7 ms ] threadMost 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.
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.).
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
They've done a horrible job of communicating these changes so perhaps I'm mistaken.
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