Stephen Shankland/CNET

Yahoo is being sued for spying on users' emails to get more money from advertising. And a judge has ruled that this case will move forward, according to Reuters.

US District Judge Lucy Koh decided late Tuesday that Yahoo must face a class action lawsuit that alleges the company scanned the content of emails sent from non-Yahoo Mail users to Yahoo Mail subscribers. Koh ruled that those people who sent or received emails can sue Yahoo for alleged privacy violations under federal and state laws, according to Reuters.

Yahoo isn't the only major tech company to have been accused of spying on its users. Google was also sued for carrying out the same type of surveillance in order to boost advertising revenue. The case against Google was thrown out in 2014. Koh decided to move forward with the Yahoo suit because she said it wasn't clear if users consented to the company's alleged scanning of email.

Members of the class action suit claim Yahoo copied and analyzed their emails to search for keywords and attachments that would help the company with "targeted advertising," according to Reuters. Yahoo also allegedly scanned emails for spam and malware detection. Those users involved in the lawsuit are seeking damages, as well as an injunction to stop Yahoo from looking at email.

"Yahoo may have to, as a practical matter, adjust its scanning practices on an individual basis," Koh wrote in her ruling, according to Reuters. "That does not, however, change the fact that plaintiffs seek uniform relief from a common policy that Yahoo applies to all class members."

Yahoo declined to comment on the ruling. CNET has reached out to the plaintiffs' lawyer for comment and will update this story if we hear back.