On mean values of Dirichlet polynomials with real characters