Yahoo will face a US class action lawsuit for allegedly accessing the content of emails sent to its mail users from non-Yahoo Mail accounts.
A Californian judge ruled that people who sent emails to or received emails from Yahoo Mail users from 2 October 2011 can sue the company as a group, granting it class action status.
There is estimated to be over one million members in the privacy lawsuit.
Yahoo is accused of using the data to boost advertising revenue.
The non-Yahoo Mail users said the company intercepted and analysed their emails, along with attachments with the goal of creating "targeted advertising" for its 275 million mail subscribers.
Last year, nearly 80% of Yahoo's revenue came from its search and display advertising.
The judge also ruled that a group of holders of non-Yahoo accounts in California since 2 October 2012 may also sue as a group for privacy infringement.
The accusers sought an injunction banning Yahoo from allegedly spying on emails, along with damages.
In its defence, Yahoo argued that some of the plaintiffs continued to email Yahoo subscribers, despite being aware of Yahoo's activities and in doing so consented to Yahoo accessing their emails.
A class action lawsuit can make it easier for the group to receive larger damages and more wide-ranging resolutions at a lower cost.