The government has been increasing its control over social media and the internet. It’s time to do something about it.

Does the Fourth Amendment protect us from warrantless government searches? It’s supposed to, but in some cases it doesn’t. One of the most amazing details to come out of last year’s l’affaire Petraeus—when the director of the Central Intelligence Agency was forced to resign after his extramarital affair was revealed through e-mails obtained by an overzealous FBI agent—is the ease with which law enforcement agencies can access anybody’s private online information. It’s surprising how quickly Google and other internet service providers will give up information to investigators. But that’s not the fault of Google or the ISPs—that’s just how the law works.

If the feds want to search your basement, read your mail or tap your phones, they have to go through a process designed to protect your constitutional rights. But in the realm of electronic communications, investigators needn’t consider those rights. They are not required to establish probable cause or appear before a judge in order to obtain a search warrant. That means your e-mails, texts, Facebook messages and Dropbox files can all easily be accessed by a nosy investigator.

E-mail providers such as Google and Yahoo may turn over messages older than six months if authorities obtain a subpoena, which doesn’t require a judge’s signature, rather than a search warrant, which does need court approval. The government isn’t even required to let you know if it has obtained your e-mail with a search warrant.

This is partly because electronic privacy law—which essentially remains defined by 1986’s Electronic Communications Privacy Act—hasn’t kept pace with technology. Back in the 1980s, most people didn’t keep electronic communications for long, so six months seemed a reasonable protection. Now, of course, such information lives forever in the cloud.

In 2010 the Sixth Circuit Court of Appeals in Cincinnati ruled that users would have the same reasonable expectation of privacy in their stored e-mails that they do with their mail or phone calls and that the government must obtain a search warrant before seizing e-mails. Which means, essentially, that the ECPA is unconstitutional.

Last November, the Senate Judiciary Committee approved a measure that would require investigators to obtain a search warrant before they could review any e-mails. And the proposed amendment to the ECPA would obligate officials to notify you within 10 days of obtaining a warrant, unless a special dispensation had been granted by the court.

Investigators don’t like this amendment, naturally. They contend that such protection—it takes longer to get a search warrant than it does to get a subpoena—would hinder their ability to go after criminals. But the amendment would leave intact the counterterrorism provisions of the Patriot Act.

With a little luck the measure will make it through the Senate sometime this year. Maybe it will even become the law of the land. Until then, be careful what you write.