MathOverflow will be down for maintenance for approximately 3 hours, starting Monday evening (06/24/2013) at approximately 9:00 PM Eastern time (UTC-4).
show/hide this revision's text 2 corrected a typo---$X$ for $Y$.

Question 1 has a positive answer for general $X$. The reason for this is that $C(X)$ cannot distinguish between $X$ and its realcompactification. Hence if $X$ is not realcompact we construct $M_{x,y}$ as above with $x$ in $Y$ X$ and with $y$ in the realcompactification, but not in $X$. This is a maximal subring which does not have the required form.

A good reference for this material is Weir's book "Hewitt-Nachbin spaces" (and, of course, Gilman and Jerison).

show/hide this revision's text 1

Question 1 has a positive answer for general $X$. The reason for this is that $C(X)$ cannot distinguish between $X$ and its realcompactification. Hence if $X$ is not realcompact we construct $M_{x,y}$ as above with $x$ in $Y$ and with $y$ in the realcompactification, but not in $X$. This is a maximal subring which does not have the required form.

A good reference for this material is Weir's book "Hewitt-Nachbin spaces" (and, of course, Gilman and Jerison).