Yahoo allegedly aided the US government to spy on user's emails Justin Sullivan/Getty Images

Yahoo is said to have used its child pornography and spam filter to scan all incoming messages of its users to comply with a secret court order of surveillance procured by the FBI. Although the motive of the order was to obtain messages containing digital signatures tied to a state-sponsored terrorist organisation, the mechanism gave access to all emails of users.

A New York Times report details how Yahoo might have been compelled by an order obtained by the Justice Department from the Foreign Intelligence Surveillance Court in 2015 to carry out this scanning system.

In order to comply with the order, Yahoo customised the existing scanning system for all incoming emails that contained a digital signature and gave a copy of the same to the FBI. The order involved a blanket scan of all Yahoo users' emails rather than specific accounts.

However, sources claim the mechanism, which was used by Yahoo, is not scanning emails like that anymore.

According to the report, investigators within the FBI initiated the order after they learnt agents of a foreign terrorist organisation were using Yahoo's email service to communicate. This included a unique method, which used digital signatures, but investigators could not locate those specific accounts being used to communicate and thus wanted to scan through as many as emails as possible.

After news broke of Yahoo aiding the US government in an alleged email surveillance, the company called these reports 'misleading' and issued a statement saying: "The mail scanning does not exist on our systems." Shortly after that other tech giants like Microsoft, Google, Twitter and Apple denied having received any such requests from the US government to install such software to scan incoming emails and their attachments.