In the wake of former CIA Director David Petraeus’ sex scandal—uncovered largely through the disclosure of explicit e-mails between him and his mistress—the Senate Judiciary Committee passed a new amendment to the Electronic Communications Privacy Act on Wednesday.

The bill as it stands now (PDF) would require a warrant by law enforcement agencies before they can go digging through e-mail, social networking posts, and other data stored on cloud-based services. If it passes both houses of Congress and is signed by the president, it would mark an important shift in privacy protection for electronic communications. As we’ve reportedforsometime now, those protections (or lack thereof) are woefully out of date.

Sen. Patrick Leahy (D-VT) has been the driving force behind ECPA reform and first proposed similar revisions back in 2011, but they were never brought to a committee vote.

“Three decades after the enactment of ECPA, Americans face even greater threats to their digital privacy, as we witness the explosion of new technologies and the expansion of the Government’s surveillance powers,” Leahy said during the mark up. “Today, the Committee has an important opportunity to begin to address this privacy challenge.”

As we previously wrote, when Congress passed the 1986 Electronic Communications Privacy Act (ECPA), massive online storage of e-mail was essentially unimaginable. It was presumed that if you hadn’t actually bothered to download your e-mail, it could be considered "abandoned" after 180 days.

By that logic, law enforcement would not need a warrant to go to the e-mail provider or ISP to get the messages that are older than 180 days; police only need to show that they have "reasonable grounds to believe" the information gathered would be useful in an investigation. Oddly, that essentially means that postal mail has greater protection than your e-mail inbox.

Privacy watchdogs have also lauded the committee’s vote.

"This is an important gain for privacy. We are very happy that the committee voted that all electronic content like emails, photos and other communications held by companies like Google and Facebook should be protected with a search warrant," Chris Calabrese, legislative counsel for the American Civil Liberties Union, added in a statement. “We believe law enforcement should use the same standard to search your inbox that they do to search your home.”