TITLE: Are compact spaces characterized by "closed maps to Hausdorff spaces"?
QUESTION [18 upvotes]: It is well known that any continuous map from a compact space to a Hausdorff space must be a closed map. Does this fact characterize compactness?
That is, if for a space $X$, every continuous map to any Hausdorff space is closed, does it imply that $X$ is compact?
My guess is no (especially since this is NOT a common result), but I can't find a counterexample.

REPLY [8 votes]: Let $\tau=\{\varnothing\}\cup\{U\subseteq\Bbb N:0\in U\}$; then $\langle\Bbb N,\tau\rangle$ is not compact, but every continuous map $f$ from $X$ to a Hausdorff space is constant: $f[\Bbb N]=\{f(0)\}$. (I’m still thinking about the case in which $X$ has more than $T_0$ separation.)