A class-action case was launched in 2013 urging the tech giant to stop scanning people's emails.
Yahoo was accused of illegally violating users' privacy by scanning the contents of their messages to deliver targeted advertising. The Orange County based company was accused of violating California's Invasion of Privacy Act (CIPA) and the federal Stored Communications Act (SCA).
However, in an unbelievable turn of events, the judge has agreed that Yahoo can continue to scan emails as long as it only does so when the messages are at rest and not in transit.
"Plaintiffs have achieved their stated goal in this litigation: Yahoo will no longer intercept and analyze emails in transit for advertising purposes," Judge Koh said in a statement.
"Yahoo represents and warrants it will make technical changes such that, for incoming email, email content will be retrieved from the servers from which email is accessible by Yahoo Mail users, and only sent to servers for analysis for advertising purposes after a Yahoo Mail user can access the email in his or her inbox," the statement added.
The company will also be updating their "Terms and Conditions," but this may prove a little useless as non-Yahoo users will have no reason to read this information.
The best part about the whole case however, is that the lawyers representing "the people" against the tech giant will get a hefty sum of US$4 million for their efforts.