The US House unanimously approved legislation Wednesday requiring authorities to obtain a court warrant to acquire e-mails and data stored in the cloud.

The Email Privacy Act unwinds a President Ronald Reagan-era law that allows authorities to access e-mail and data from service providers without a warrant if the message or data is at least 180 days old. The 1986 e-mail privacy law, adopted when CompuServe was king, considered cloud-stored e-mail and other documents older than six months to be abandoned and ripe for the taking.

The measure now goes to the Senate, where its chances of passage are unknown. The Senate Judiciary Committee for years has debated and even passed similar legislation, which has gone nowhere. President Obama must also sign the bill, but it's unlikely to reach his desk before his term expires in January.

The legislation approved Wednesday was co-sponsored by more than 300 House members. A provision demanding that the target of the warrant be notified about the warrant was removed from the legislation. Because of varying precedent on whether a warrant is required already, many companies, including Google, already demand one.

The bill spells out that warrants are required for all online documents and other private electronic documents like photos, just like warrants are needed for physical papers and effects. National Security Letters, of which hundreds of thousands have been issued, are not included in the House-passed legislation.

Government agencies like the Securities and Exchange Commission had lobbied against the measure and wanted it to be carved out of the law. The SEC said it would make its job of policing securities fraud more difficult. The House version did not cave to the SEC.

The vote was 419-0. There were 238 Republicans and 181 Democrats voting.

Privacy advocates were cautiously optimistic about the measure's passage in the House.

"While we applaud the passage of H.R. 699, the bill isn’t perfect. In particular, the Email Privacy Act doesn’t require the government to notify users when it seeks their online data from service providers, a vital safeguard ensuring users can obtain legal counsel to fight for their rights," said Sophia Pope, a staff attorney with the Electronic Frontier Foundation. "However, companies may continue to provide notice to users of government requests—prior to compliance—something many companies commit to in our annual Who Has Your Back report."

Moreover, a group of companies from Amazon to Yahoo supported the measure despite it not achieving "all of the reforms we had hoped for (PDF)."