A maximum principle for exterior Dirichlet problems via rearrangements