If you're being let go from a job you hate, it may be tempting to leave a 'goodbye present.' But while locking a tuna sandwich in your desk drawer on the last day, for example, is unlikely to get you jailed, sabotaging the company's computer systems probably will.

The Register reports that Christopher Victor Grupe, a 46-year-old former IT administrator at Canadian Pacific Railway (CPR), has been sentenced to 366 days behind bars for intentionally damaging the firm's computer network.

It seems that Grupe was unlikely to win employee of the month at his former job: he was suspended for 12 days in December 2015 for insubordination.

Grupe's attorney told the Star Tribune that his client's suspension was attributed to increased stress from "working around the clock," which led to him "yelling at [his boss] and using some language he probably shouldn't have."

When he returned on December 15, CPR told him he was being fired from its US headquarters in Minneapolis. The company allowed Grupe to resign, rather than being terminated. He signed a resignation letter and promised to give back his laptop, remote access authentication token, and access badges. But two days later, Grupe decided to take revenge.

On December 17, he used his work notebook and credentials to log into CPR's computer network switches. Grupe removed administrator-level accounts, deleted key files, and changed the passwords for other accounts. He then wiped the laptop clean and destroyed all logs to try and hide his crime.

CPR discovered the effects of Crupe's actions on January 5 when staff found they couldn't log into the switches. Court documents state that parts of the system went down, and staff had to force reboot all the switches to regain access.

Two days later, outside computer forensic experts hired by CPR traced the damage back to Grupe. A jury found him guilty of one count of intentional damage to a protected computer in October last year. US District Judge Patrick Schiltz sentenced him to a year and a day behind bars yesterday.