This secret warrant less surveillance program, collectively known by the NSA code name Stellar Wind, was launched in the end of 2001, to handover the data to the United States government.
Program was officially authorized after the September 11, 2001 terrorist attacks by President George W. Bush and continued under President Barack Obama through 2011. A federal judge at the Fisa court approved this bulk collection order for internet metadata, in every 90 days.
Documents also exposed that all communications with at least one communicant outside the United States or for which no communicant was known to be a citizen of the United States, was recorded by surveillance program
Metadata also details the internet protocol addresses (IP) used by people inside the United States when sending emails information which can reflect their physical location
There were internal disputes within the Justice Department about the legality of the program, because data are collected for large numbers of people, not just the subjects of Foreign Intelligence Surveillance Act (FISA) warrants. Deputy attorney general James Cole defended the bulk collection of Americans' phone records as outside the scope of the fourth amendment's protections against unreasonable searches and seizures.
"Toll records, phone records like this, that don't include any content, are not covered by the fourth amendment because people don't have a reasonable expectation of privacy in who they called and when they called," Cole testified to the House intelligence committee on June 18.
"That's something you show to the phone company. That's something you show to many, many people within the phone company on a regular basis." he added.
So, this program continued for more than two years into the Obama administration, but Bush's email metadata program had restrictions on the scope of the bulk email records the NSA could analyze.