We study the geometry dependence of the Casimir energy for deformed metal plates by a path integral quantization of the electromagnetic field. For the first time, we give a complete analytical result for the deformation induced change in Casimir energy delta E in an experimentally testable, nontrivial geometry, consisting of a flat and a corrugated plate. Our results show an interesting crossover for delta E as a function of the ratio of the mean plate distance H, to the corrugation length lambda: For lambda<<H we find a slower decay approximately H(-4), compared to the H(-5) behavior predicted by the commonly used pairwise summation of van der Waals forces, which is valid only for lambda>>H.