We prove that the algebraic condition $|p-2|\, |\lan Im A\xi,\xi\ran| \leq 2 \sqrt{p-1}\, \lan Re A\xi,\xi\ran$ (for any $\xi\in\R^{n}$) is necessary and sufficient for the $L^{p}$-dissipativity of the Dirichlet problem for the differential operator $\nabla^{t}(A\nabla)$, where $A$ is a matrix whose entries are complex measures and whose imaginary part is symmetric. This result is new even for smooth coefficients, when it implies a criterion for the $L^{p}$-contractivity of the corresponding semigroup. We consider also the operator $\nabla^{t}(A\nabla)+{\bf b}\nabla +a$, where the coefficients are smooth and $ Im A$ may be not symmetric. We show that the previous algebraic condition is necessary and sufficient for the $L^{p}$-quasi-dissipat...