Japanese authorities have had enough of spam emails and viruses, and decided that there’s only one way to deal with them: Jail time.

Admittedly, that’s not the only option for those falling foul of the criminalization of computer viruses, nor for the sending of pornographic spam emails; prison can be avoided if you can afford fines of anywhere up to 500,000 yen (around $6,200).

(PHOTOS: A Brief History of the Computer)

A bill was passed earlier today by the Japanese House of Councillors that makes creation or distribution of a computer virus without reasonable cause punishable by up to three years in prison, and acquisition or storage of a virus punishable by up to two years.

The new laws will also allow data to be seized or copied from computer servers connected to any computer seized during an investigation, as well as giving authorities the right to request that ISPs retain communication logs of parties under investigation for up to 60 days.

This is the third time similar legislation has been presented for approval; earlier attempts in 2003 and 2005 were defeated due to concerns around clauses that some believed criminalized even conceiving a crime.

The passing of this legislation allows Japan to join the Convention on Cybercrime, an international treaty allowing co-operation on criminal matters committed online, which has been in effect since 2004 with 31 other countries participating so far.

(MORE: Malware Gangs Using Banner Ads to Hire Coders in Russia)