  We consider a family of self-adjoint Ornstein--Uhlenbeck operators
$L_{\alpha} $ in an infinite dimensional Hilbert space H having the same
gaussian invariant measure $\mu$ for all $\alpha \in [0,1]$. We study the
Dirichlet problem for the equation $\lambda \phi - L_{\alpha}\phi = f$ in a
closed set K, with $f\in L^2(K, \mu)$. We first prove that the variational
solution, trivially provided by the Lax---Milgram theorem, can be represented,
as expected, by means of the transition semigroup stopped to K. Then we address
two problems: 1) the regularity of the solution $\varphi$ (which is by
definition in a Sobolev space $W^{1,2}_{\alpha}(K,\mu)$) of the Dirichlet
problem; 2) the meaning of the Dirichlet boundary condition. Concerning
regularity, we are able to prove interior $W^{2,2}_{\alpha}$ regularity
results; concerning the boundary condition we consider both irregular and
regular boundaries. In the first case we content to have a solution whose null
extension outside K belongs to $W^{1,2}_{\alpha}(H,\mu)$. In the second case we
exploit the Malliavin's theory of surface integrals which is recalled in the
Appendix of the paper, then we are able to give a meaning to the trace of
$\phi$ at the boundary of K and to show that it vanishes, as it is natural.
