I keep mine about 10-15 cm from the wall just the make sure that the exhausted air from case has space to dissipate.
pretty close - like 6 inches maybe a little more? I dont exhaust out the back of mine, i exhaust out the top.
What cooler u running/?