Hacker News new | ask | show | jobs
by cubesnooper 29 days ago
I self-host my email, in part because I wanted to enforce encryption whenever I send. My server does verify the certificate of the target MX, whether it uses MTA-STS or not. Delivery fails if the certificate is invalid, and also fails if the destination (or a man in the middle) downgrades or strips STARTTLS.

In eight years, I’ve seen zero servers that refused STARTTLS, and only two invalid certificates. In both cases, the certificates were from a valid CA and weren’t expired, but the hostname was wrong. Both were due to outdated DNS records, one of which was fixed as soon as I reported it, and the other resolved itself after a few months.

3 comments

> My server does verify the certificate of the target MX

But how do you know if the target MX is correct, and not controlled by an attacker? You can't really know for sure unless the receiver has secured their domain name with DNSSEC or published an MTA-STS policy.

I am self-hosted: minimal smtp server, no TLS, only direct and basic delivery of emails. I don't even pay the DNS mob, namely I use IP literals (mailbox@[x.x.x.x] and more mailbox@[ipv6:...], see smtp RFC, yeah the email guys were smart enough not to make their protocol hard dependent on DNS neither on any crypto).

I do not trust the CA system. If I ever crypt the content of an email, it would be because a guy I saw gave me its public key in some way (QR code?) face to face. For really serious stuff, I would not use smtp anyway and with some modified-standard-cipher pre-shared key anyways.

> I don't even pay the DNS mob

But you do pay someone to delegate your IP, right? Or do you have your own ASN and do your own BGP?

Nope, in my "first world" country, some consumer IAPs does offer a static IPv4 with a non-filtered SMTP port and a static IPv6 prefix (usually a /64 which is very convenient to change email address/hosting IPs when compromised, well if you use an address email with an IPv6 literal). But I don't really use IPv4 anymore for my self-hosting, IPv6 has been around _here_ for a very, very long time for nearly everybody if not everybody (even mobile internet).

Yes, I know my IPv4 is the target of distributed port scans, by IPs known as compromised by the "security" community. I guess my IAP "security" team knows, and they may probably be 'in the process of doing something to deal with them'... (which would more than IP blocking and would involve authorities...).

FTTH(8GB), static IPv6, static IPv4 plus opened SMTP port, ~30 bucks a month (for millions).

OK, so now you can't move or change ISP without having to change your email. That seems incredibly inconvenient. Also your ISP could change their plan at any time.

Also, you are still paying your ISP to delegate the IP, it's just bundled into your ISP plan.

Changing ISP is rare, then does matter less than being self-hosted.

Giving a IPv4 and IPv6 prefix is what an ISP do...

Mine is doing even more: you have access to some of its sub-domains at no additional charge. But I don't use them because they are gated by whatwg web engines (a mistake or they should be ashamed of themselves).

How often do you see self-signed certificates that are valid due to DNSSEC/DANE configuration versus certificates were issued by a trusted CA? When I checked two years ago I found that 99.3% of the top 1,000 domains supported STARTTLS and 94.1% used a TLS certificate issued by a CA. I suspect the numbers keep improving, but I don't think we're quite at 100% yet.