An IT manager who logged onto to his former employer's computer network five months after being fired and opened the email server up to spammers has been sentenced to one year in prison.

Steven Barnes had earlier pleaded guilty to computer intrusion charges, saying in a plea agreement that he accessed servers at a San Mateo, California, Internet media company called Akimbo Systems and turned the company's mail system into an open mail server that spammers could use to send out messages.

He also deleted the company's Microsoft Exchange email database and files that the computer needed in order to boot up.

In a letter to the presiding judge, Barnes said that he had battled drug and alcohol addictions at the time, and was upset after Akimbo representatives showed up at his door in April 2003 - one carrying a baseball bat - and took both work and personal computers from him.

He logged onto company servers on September 30 after trying an old password that had been valid before he was fired. "To my complete disbelief, I soon realised... they had no firewall and the passwords were not even changed," he said.

Employees at Akimbo, which operated under the name Blue Falcon Networks at the time, were unable to send or receive email or look up old messages for days, and the company was also blacklisted by an anti-spam organisation, federal prosecutors said in court filings.

On Thursday a federal judge in California ordered Barnes to serve a year and a day in prison and pay $54,000 (£34,000) in restitution to Akimbo Systems. After his release, Barnes will serve three years probation.

He is scheduled to report to prison on January 8.