Heat recovery from corrosive flue gas