Why would anyone like Edward Snowden rely on 3rd party services like Lavabit or Hushmail to host his email?

I mean it's very easy to set up a self-hosted email server. What you need:

  • Rent VPS (even better: home server) & Domain (May take up to 2 days, who cares..)
  • Set up Firewall (20 min)
  • Secure SSH (10 min)
  • Install and set up Postfix & Dovecot (1 hour)
  • DKIM, SPF, DMARC, DNSSEC, DANE & co if you want. (1 hour - 2 hours)
  • Secure everything again and test (30 minutes - 2 hours)

Isn't such a setup "more secure" than relying on a 3rd party email service?
Why do so many security experts (i.e. cryptologists & co.) not host their own email?

  • 41
    If you follow all your steps, then you also create a single point of failure, and shout to the world exactly where your email is hosted.
    – schroeder
    Commented Jul 2, 2015 at 21:48
  • 32
    Emails servers are also a pain to administer. It would be trivial to DoS the server with mild traffic.
    – schroeder
    Commented Jul 2, 2015 at 21:50
  • 7
    Two hours for DKIM and pals??? That's like running a marathon in two hours! Very, very few people do that and those that do have trained for years.
    – bishop
    Commented Jul 4, 2015 at 23:52
  • 3
    By the way: why you need an domain for it? you could also simply address a mail to [email protected]
    – Zaibis
    Commented Jul 6, 2015 at 10:55
  • 2
    Also saying "Secure everything again and test (30 minutes - 2 hours)" Would be the same as saying "Developing the required code (20 minutes) QA it for any possible test case (additional 20 minutes)" The point is: You can't test anything. And something will remain untested what some one else coudl reveal. So better rely on some one who has already pluged his holes for years or even decades. So it is given there are a lot less unpluged leaks as if you start it from scretch. But even there it could be risky. But on an complete different scale then the do it your self scale.
    – Zaibis
    Commented Jul 6, 2015 at 10:59

6 Answers 6


Rent VPS (even better: home server) & Domain (May take up to 2 days, who cares..)

How many ISPs do not provide law enforcement access to their sites and to the systems they provide for their customers?

And with a home server: lots of sites explicitly deny access to their mail server from a "home" IP address (these are known address blocks), in order to fight spam. And even if you manage this: are you home all day or are you sure to detect any kind of break-in? Please note that you are not up against the average burglar.

Secure everything again and test (30 minutes - 2 hours)

What you've described might help to protect your privacy against Google etc (at least the emails). Against the NSA it is probably not sufficient. If they really want to own you they can send clever phishing mails with malware, use malvertising to attack you, simply break into your home, and much more.

Why do so many security experts (i.e. cryptologists & co.) not host their own email?

Security is a very wide field and I'm sure lots of crypto experts probably have no idea of how to set up and properly secure a mail server. Also lots of mail administrators have no idea of deeper cryptography. They are all experts in their own field and they are not able to know everything. This means they either learn to be expert in another field and have less time for their own field, or they have to find a way to outsource such tasks to somebody they trust.

DKIM, SPF, DMARC, DNSSEC, DANE & co if you want. (1 hour - 2 hours)

These are definitely not easy. You have to find first somebody who lets you do DNSSec with your own domain. Most ISPs or even dedicated DNS providers don't. And to have DKIM, SPF, or DANE you either need to use your own DNS server with all the problems (need primary and secondary for availability etc) or have again to find a provider which lets you set all these records up. These short times you give are definitely not realistic for somebody who is doing this for the first time.

  • Lavabit did this too, so does it really matter? At least Google / Hushmail / [Other-3rdparty-Mail-Provider-Here] can not read your email. Also what about a home server? Nobody could access that as easy as a VPS. Commented Jul 2, 2015 at 21:57
  • 18
    @FlorianSchneider: I think you should state more precisely what kind of attacker do you want to fight. If you just want that the provider does not read your mail self-hosting is an option. If you need to fight the NSA it is probably not that simple. Commented Jul 2, 2015 at 22:03
  • 1
    It isn't about me. It's about Snowden for example. Why do these security experts rely on a 3rd party service? They could easily (more or less) have set up a system that is more secure. I don't understand that. Commented Jul 2, 2015 at 22:05
  • 14
    @FlorianSchneider: apart from that - being a security expert does not mean you know everything possible about security and that you have the knowledge and time to administrate all your own systems. Security is a very wide field today and probably nobody knows everything there so you often source some work out to somebody you think does a better job with it. Commented Jul 2, 2015 at 22:19
  • 2
    @Freedom: if you use only TLS (i.e. hop by hop) it matters a lot if all servers in between are trusted and secure. Also you definitely need DNSSec because otherwise the MX record could be spoofed. And of course all mail servers need to do secure TLS which proper validation of the certificate etc. This is currently not the case. For real security your only option is to use PGP or SMIME, where the mail itself is encrypted and not only the transport. Commented Jul 3, 2015 at 20:42

As someone who has actually done this for a couple of years, I can tell you that it's not nearly as simple as you're describing and it doesn't offer the security properties you want.

In summary:

Why do so many security experts (i.e. cryptologists & co.) not host their own email?

Because it takes enormous amounts of time and specialized knowledge to do it properly, it's not much more secure in general (it's actually less secure in some circumstances) and there are better and easier solutions readily available

How much time do you need?

Your initial time estimates are very optimistic, even assuming you're a knowledgeable system administrator with lots of experience on the task.

To give you a quick idea, a popular book that covers one of the most popular MTAs spans around 500 pages.

That's just for the MTA. In the real world you'll also need an MDA with POP/IMAP, spam filtering and probably a authentication server.

You're also neglecting the continued effort needed to keep the system healthy and secure:

  • Monitoring machine and service health (are there OS updates? Is the service running and responding? Are you running out of disk space?)

  • Monitoring logs, diagnosing errors (are there ongoing DoS attacks? is someone brute-forcing SMTP auth? Why are logins not working?)

  • Security-related monitoring (Did tripwire alert you because of a OS update or a intrusion? Were there any security advisories of your OS this week? What about all the other software running on the machine?)

Unless you're happy having your messages severely delayed occasionally (or lost, in the worst case), there's a lot of other things that are also needed to reliably provide email (backup MX, failover and storage redundancy come to mind). A single home server probably won't be enough if your connection drops and you need to respond to a email urgently.

How secure can it be in the best case?

You didn't specify your thread model very clearly, but it seems you're concerned with a state-sponsored actor that is interested in accessing your email in particular. The setup you've described will not prevent that. As an example, there's strong evidence that the Heartbleed bug has been extensively used before its public discovery. If you were a sufficiently interesting target running a email server, compromising it would have been no problem at all. A sufficiently well-funded adversary will have the capability of compromising any practical security system you can devise.

Self-hosting also has the severe disadvantage of exposing much more information about you, if your system has few users. Your ISP can trivially tell when you receive or send an email, and with which providers you communicate.

Of course, that's not to say the self-hosted model is useless against other threat models. It prevents disclosure of your email to your service provider and helps you stay secure were a massive security breach to occur, since it's a isolated system. It also prevents silent coercion (lawful or not) of the provider. Some of these problems can be partially mitigated by using a competent provider in a country with strong data protection laws.

Are there better alternatives?

If you need security with this threat-model in mind, there are better and easier solutions, as Snowden has said himself:

Properly implemented strong crypto systems are one of the few things that you can rely on.

PGP is unrivaled against this particular threat model, as you don't need to trust any server or provider at all.

Compared to maintaining a email server, PGP is actually quite easy to use and understand.

  • 1
    To lose mail you have to accept it and then lose it in a disk crash or something before delivering it. If your server is merely down (for less than a few days) you won't lose legitimate mail, you'll just get it later than you otherwise would. You'll miss out on a lot of spam, though, since spammers don't bother with compliant queueing and retrying :)
    – hobbs
    Commented Jul 3, 2015 at 21:48
  • @hobbs Indeed; that's the entire principle behind email greylisting, and why it works so well for blocking spam at minimal risk of blocking legitimate traffic.
    – user
    Commented Feb 3, 2016 at 12:47

When you send emails in your scenario, you announce the IP of your custom, private email server. Every recipient, and any interested party, now knows you use your own email server and where it is.

This results in a one-to-one mapping of this server and your connection to it. If a government agency wants to track you down, all they need to do is to look for traffic to your server, and they know either where you are or what services you use to try to hide your location. Or, as an alternate option, the government agency could simply ask your server hosting company to suspend your server and wait for you to call support.

Not to mention the administration hassles. Downtime, spam, traffic headaches, redundancy, server patching, log analysis, all of these kinds of things are managed by a team of professionals dedicated to your security 24/7 when you use an email service.


There speaks someone who has never run their own email.

You don't mention an inbound antispam solution. DKIM and related techniques are for authenticating your own mail as not spam and making it deliverable. (Deliverability is the main barrier against home hosting: most providers block port 25 and many mail recipients block all ranges known to be ADSL). But if you don't have inbound antispam you'll drown in spam, and none of the existing solutions are really turnkey.

Your times are best-case for an experienced sysadmin who's set up all those pieces before. For someone who hasn't it may take a lot longer. You need to tolerate the risk of silently losing mail until you're sure it's all working.

And your times are one-off. You need to track versions and advisories for all those pieces and be prepared to drop everything as soon as a vulnerability is announced. Obviously if a key vulnerability is announced while you're asleep you could be compromised before you wake up.

  • 12
    Having previously run my own personal email server, I stopped when I realised it was turning into a full time job in and of itself. Commented Jul 3, 2015 at 10:29
  • 12
    @BillMichell +1 - I was young and so optimistic. My own e-mail, my own domain, my own settings - it was going to be wonderful. Until I had to get my IP whitelisted, and then a HDD failed, and then the providers internet dropped, and then the spam really started...
    – Dan
    Commented Jul 3, 2015 at 11:12
  • Ah – a kindred spirit 😃 Commented Jul 3, 2015 at 11:53
  • I receive my own mail on my home server, but send using my ISP's outbound. Totally agree deliverability is the big issue with outbound. Commented Jul 3, 2015 at 19:33
  • @DAN : Just also don’t fully trust providers. I have hard times (like many others who lost all their data without receiving prior notice) with the previous e‑mail main provider of the country.  I’m seeing Googles and their services like Gmail are violating local privacy codes/law and they are essentially maintaining with lawayers so the country could wake up one morning with Gmail blocked by ISPs. Commented Jul 3, 2015 at 19:52

Short answer, it's not the easiest solution.

" it's very easy to set up a self-hosted email server"

You are wrong, the rest is wrong because it's based on this. I assume you imply it's easy to set up a safe server (otherwise, what's the purpose of it all?). Your laundry list of what you need is long, and not even so it is complete.

It's much easier to send and receive encrypted and signed email and not worry about the transmission. You could even rely on gmail or hotmail to transmit the encrypted messages.


I'm not a expert, but since nobody said the magic word " encryption " here yet, i will write this answer.

It seems to me that what you want is to prevent NSA to get the hands on your communications data, but you are looking the wrong way, you must trust only the encryption algorithm that make the data secure and private and nothing more, you should aim to make so that even if NSA is actually your email provider your emails are still private and can't be read.

The only way is of course, with encryption...as long as the keys are safe(e.g in your head) and the encryption algorithm is not broken it's does not matter where are the emails stored or on what server the emails are sent/received. You can enjoy all their good infrastructure, 24/7 run time and still have your data private.

Having your own self-hosted email server is equivalent to use your own self-hosted cloud storage, when you could just encrypt your stuff and enjoy the ease of use of Google Drive and better yet you don't stands out in the crowd.

So in resume nobody does that, because is too much effort ( like they said above no email provider is ran by only one person and they are paid for that ) and no further benefit plus do you really think that one person could hold the elite hackers that are very well paid to hack you ? Let them hack you, just make sure they can't make anything of it.

But if I was needed to hide something like what Snowden had, i would probably have a "master" PGP public key to be used in the first contact with someone, after that i would agree with the person to keep generating new PGP keys that would be passed on each message to encrypt the next one, like a Diffie-Hellman algorithm. And of course never reusing keys and do a secure delete after the use. And on top of that, i would encrypt all my private keys with a open-source software and keep them in a linux OS running in a virtual box with full disk encryption. And every single tcp and udp packets on VPN + TOR.Yeah really paranoid, but effective.

That being said, no encryption will ever protect you from Rubber-hose cryptanalysis so i would make even more paranoid actions to make sure they can't get to me ( fleeing the country would be one of them, like Snowden had to do)

  • 1
    Rubber-hose cryptanalysis explained in pictures: xkcd.com/538
    – Callie J
    Commented Jul 3, 2015 at 7:48
  • @Freedom : just not that be stupid. For self hosted mails don’t use Ruber Hose for asking passwords or keys. Just torture for asking the contents directly. Commented Jul 3, 2015 at 19:58
  • 1
    You could always lie about the content and with the keys they would have a proof of what you did and write. Doing what i said would mitigate that since after the erase of the keys i wouldn't be able to give them that. I will edit my answer later to clarify why one should use different public keys for each message ( kinda perfect forward secrecy ) and secure erase of the keys (plausible deniability ) after use
    – Freedo
    Commented Jul 3, 2015 at 20:10
  • If you delete a key after use, how do you re-read and old message?
    – ott--
    Commented Jul 3, 2015 at 20:24
  • You don't .There's no intent to re-read the message. If you are talking about really sensitive things you should store it on your head only. I'll add a warning for that. Why you would want keep a email that could kill you?
    – Freedo
    Commented Jul 3, 2015 at 20:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .