2 ms·
Self hosting is fun and fulfilling. It's simple and cheap. The problem of course is replicating the services you already use. Web hosting is painless but email
by fiatpandas 14y ago
Self hosting is fun and fulfilling. It's simple and cheap. The problem of course is replicating the services you already use. Web hosting is painless but email is absurdly involved if you want to make sure that gmail etc. accept your messages as non-spam. The rules are not made clear and there doesn't seem to be a universally accepted way of setting up email where you can say "this message I'm about to send will 100% be accepted by the recipient's mail server"
- reidrac 14y agoI've never had problems to get my email accepted by gmail, but well... I don't think Google gets a 100% either. There must be a checklist somewhere, but off the top of my head: - Your server's IP must be static and must have a reverse map (IP -> name); check your IP is "clean" and not in a blacklist, specially when you get it from your ISP range (may be someone used it before you and it has a poor reputation). - Setup your DNS correctly using MX records. - Use SPF or DKIM so other servers can detect forged emails not coming from your server(s); besides this is nice to filter backscatter spam. - Obviously don't configure your mail server as an open relay, use SMTP with SSL or TLS, always with user authentication. I've been using this setup for years and most of my problems are receiving mail and never sending it (ie. misconfigured servers not playing nice with graylisting, Google servers blacklisted by my DNSRBL, etc). EDIT: formatting
- fiatpandas 14y agoThanks for sharing the tips. Will give email another attempt soon, and maybe write something up
- tquai 14y agoemail is absurdly involved if you want to make sure that gmail etc. accept your messages as non-spam. I've self-hosted DNS, mail, web, etc. for years, and several people have posted the same kind of comment here, so here's what people will need to know/do to self-host their own mail. First, you'll almost surely need a non-end user IP address, as many/most of such address ranges are in the Spamhaus PBL list [0]. To see if your IP address is listed in PBL, for the example IP address 192.0.2.200, do dig 200.2.0.192.pbl.spamhaus.org Here, the octets are reversed and prepended to pbl. While you're doing this, you may as well also do dig 200.2.0.192.zen.spamhaus.org Again, replacing the above IP address with your own. This checks the Zen list [1]. For a non-end user IP address you'll most likely need a datacenter machine, a business line, a VPS, or a machine hosted at a large organization. A home Internet connection won't cut the mustard for mail. Second, you'll need FCrDNS [2], or at least rDNS. rDNS is just short for reverse DNS, which means having a PTR record in DNS for your IP address. It could be anything, but something non-generic is best, such as mail.example.com, or puffy.example.com. wireless-cust-0-200.example.com is generic and will score "bad" points on some remote systems. It's best if you can do FCrDNS, which is trivial. All that entails is matching PTR/A records. This is all you need for Gmail or any other serious mail provider to accept your mail. Unfortunately it makes self-hosting from home more difficult, but the upside is a huge reduction in spam. Last thing, you should check http://dnsbl.info http://dnsbl.info or a similar site to see if your mail server's IP address is listed in any DNSBLs. 0. http://www.spamhaus.org/pbl/ http://www.spamhaus.org/pbl/ 1. http://www.spamhaus.org/zen/ http://www.spamhaus.org/zen/ 2. https://en.wikipedia.org/wiki/Fcrdns https://en.wikipedia.org/wiki/Fcrdns
- fiatpandas 14y agoThanks for this.