Police found 2,489 packages and envelopes in Grant McCrone's property in Balmoral Avenue in Dumfries in May.
Dumfries Sheriff Court heard that the mail dated back to between September and December 2012.
McCrone, 26, who admitted stealing and intentionally delaying the mail, was sentenced to a community payback order and 180 hours of unpaid work.
The court heard that of the packages discovered, 2,388 were not addressed.
The Royal Mail had a contract to deliver them to certain postcode areas. It was likely they contained promotional material.
The remaining 101 packages were addressed to individuals. A total of 60 had been opened.
Sheriff Brian Mohan was told that McCrone was "a hard working, intelligent and, with the exception of this matter, a law abiding man".
He committed the crime when his father was diagnosed with terminal cancer.
He initially hid the mail at his family home before he moved to Balmoral Avenue after his father's death.
Sheriff Mohan said McCrone had breached the trust of the Royal Mail and its customers and he had narrowly avoided a prison sentence.
The court was told that McCrone was sacked by Royal Mail for gross misconduct on 6 June.
A postman stole more than 2,000 items of mail and hid them in his outhouse for more than two years.