A sentence of 384,912 years was demanded at the prosecution of Gabriel March Grandos, 22, at Palma de Mallorca, Spain, on March 11, 1972, for failing to deliver 42, 768 letters.
http://www.trivia-library.com/a/longest-prison-sentences-in-history.htm
edit: it's not clear if this punishment was ever handed down. The longest verified sentence, though, 10,000 years for an American man in 1981 after killing at least three people. The man's name is Dudley Wayne Kyzer.