Maxwell's refrigerator: An exactly solvable model