The posts have started to slow down recently, but not for lack of ideas on my part! I’ve been moving house over the last week or two, and it’s tough to find 30 minutes free to type all this out what with the packing, unpacking, transporting and so on. But I’m right now waiting for the carpet cleaners to come and clean the old place out, so what better time than now to talk about my Validating Email protocol!
The protocol, which I’ve called Validating Email for now, is basically just a method for the receiver to validate the identity of the server. I’m going to describe a brief overview of the structure of the protocol in the post, along with a few pros and cons. I’ll get into the meat of things in a later post.
Basically, the idea in this protocol is that we want to verify that the person named in the “From:” field of the email is an “actual” entity and that emails sent to the “From:” will actually arrive in a valid mailbox (whether an actual human will read it is another matter).
Now, I could implement this as extensions to the SMTP protcol. But I’m not going to. I believe that in order to encourage people to make a whole-hearted switch to this new protocol, “existing” SMTP should be completely dissabled. The easiest way to do that is with a whole new protocol.
The basic steps in the protocol are as follows:
- Sender “signs” the message with two certificates. One for the domain itself, and one for the mailbox that the message will be coming “from”. The domain certificate is the same for all message originating from that domain, the mailbox certificate is different for each mailbox, but must stay the same for the lifetime of the mailbox.
- Sender connects to mail exchange of recipient’s domain.
- Sender sends message “envelope” (including “From” and “To” and so on) along with the actual message itself. Like SMTP, the message itself is separate to the envelope data with the exception that the From: in the message must be exactly the same as the From in the envelope. In fact, you can leave out the From in the message if you like.
- Recipient looks up the mail exchange listed in the sender’s From address, connects to it and asks the server for the certificate for the domain and mailbox. Recipient verifies the signatures in the recieved message.
- Recipient responds to the sender with an “OK” if the signature verified.
That’s the basic steps. Step 4 could be done “offline” and an “OK” is always sent. So when there is a lot of traffic to your server, you might do step 4 as a separate step and batch up the requests to the same domain, for example.
Also, the responses can be cached for long periods of time, because they’re not going to change (unless a certificate is revoked, or something like that).
Note that when I say “certificate,” I’m not suggesting something like what VeriSign provides – self-certified certificates would be fine. All we are doing with this step is ensuring that the person sending the email is able to receive them on the domain specified. This system is actually a lot like the Sender-ID system that Microsoft invented. However, I believe that the problem with Sender-ID was that is was implemented on top of SMTP, meaning that it was too easy to ignore. And as long as people were ignoring it, it could not be used as a 100% effective indicator of spam. With Validating Email, if you fail the validation test, the email can be immediately dropped as spam – no further testing is required.
One problem with this system is that it doesn’t quite have the flexibility of regular SMTP. For example, if you look at the headers of any email message, you’ll see lots of “Recieved:” headers, which indicates that the message went through multiple “hops” to get to you. With Validating Email, there are no “hops” – just one message sent from sender to receiver.
However, I don’t think that’s a huge problem. Validating Email is only meant to be used between “untrusted” hosts. So if you’re simply routing mail through the servers on example.com, you don’t need to use Validating Email. You only need to use it on the hop from example.com to hotmail.com (or whatever). Once its in hotmail.com, you can again use whatever protocol you like between the hosts there.
You also don’t need to use Validating Email between the client (e.g. outlook) and the server – regular SMTP (with passwords, SSL, etc) or a webmail interface would still suffice. This is only a server-server protocol.
Anyway, that should give a basic idea of the protocol itself. The protocol itself is not going to stop all spam, but on top of the protocol, we can build further “defences” that will – but I’ll get into that another day.