  In this note we prove a Wiener criterion of regularity of boundary points for
the Dirichlet problem related to $X$-elliptic operators in divergence form
enjoying the doubling condition and the Poincar\'e inequality. As a step
towards this result, we exhibit some other characterizations of regularity in
terms of the capacitary potentials. Finally, we also show that a cone-type
criterion holds true in our setting.
