Facade, Building, Architecture, Commercial building, Signage, Company, Glass, Advertising, Metal, Sign, pinterest
Kris Tripplaar Rex/Shutterstock

Just when you thought a Yahoo Mail account couldn't get much less appealing, it's been alleged that the company has designed a tool for scanning all of its customers' incoming emails.

Citing two former employees of the company and a third source, Reuters claims that the software program was built in-house last year to comply with a classified US government directive. The request is said to have been made by the FBI or NSA.

It's reportedly been used to search hundreds of millions of accounts for "a set of characters" - but what specifically was sought is unknown. It's also not known whether any findings were ultimately passed over to the FBI/NSA.

The sources have also alleged that Yahoo's decision to undertake the data search was behind the departure of Chief Information Security Officer Alex Stamos last June. Now at Facebook, he has declined to comment.

Yahoo CEO Marissa Mayer at Fortune Global Forumpinterest
Kimberly White//Getty Images

[Yahoo CEO Marissa Mayer]

When the claims were put to Yahoo, the response was: "Yahoo is a law abiding company, and complies with the laws of the United States." No need to say any more.

What to Read Next

The scale of the email-trawling, as well as the custom-building of a tool for the process, are thought to be unprecedented. It's not known whether other companies were approached with the same request.

These allegations come soon after Yahoo's confirmation that "at least 500 million" of its users were hacked in one of the largest-ever data breaches.

The hackers gained access to "names, email addresses, telephone numbers, dates of birth, hashed passwords (the vast majority with bcrypt) and, in some cases, encrypted or unencrypted security questions and answers" in a massive 2014 attack on Yahoo servers.

Apple CEO Tim Cook introduces Apple Watchpinterest
Marcio Jose Sanchez / AP/Press Association Images

Apple famously fought against an FBI request to aid access to customer information earlier this year, refusing to help them unlock an iPhone belonging to San Bernardino shooting suspect Syed Farouk.

A third party eventually helped unlock the device instead, meaning the US Department of Justice formally withdrew its request.