Ongoing public scrutiny of the convoluted case surrounding the resignation of former CIA Director David Petraeus has focused mostly on its intricate web of personal relationships.

Less noted has been the ease with which the FBI managed to track, obtain and read the emails of the nation's top spy and others connected to the scandal.

Fortunately Sen. Patrick Leahy, the Vermont Democrat and chairman of the Senate Judiciary Committee, has scrapped amendments to a bill that would have made it even easier for scores of government agencies to access private emails.

Mr. Leahy originally proposed a bill requiring search warrants for access to emails, the same standard that applies to most other potential evidence in criminal investigations. Such warrants require court approval based on probable cause.

Recently the bill was amended to require only a subpoena, which does not require court approval and which would enable a host of federal agencies to go on fishing expeditions at the expense of individual privacy. It also would have allowed unfettered access to private intranet networks with institutions such as universities.

Federal laws covering surveillance need an upgrade because they mostly date to the 1980s, long before email and other forms of electronic communication and storage became ubiquitous. But the upgrade should be to ensure the preservation of as much privacy as possible and preserve the Fourth Amendment's prohibition of "unreasonable searches and seizures."

Justice Department officials have complained about having to get court approval to go after digital data, but the rule is the same as applied to most other forms of evidence. The Constitution deliberately establishes barriers to government access to personal information. There is no reason not to require the government to overcome those barriers to access just because the information is in a different form.