  The Casimir-Polder interaction between an atom and a metal wall is
investigated under the influence of real conditions including the dynamic
polarizability of the atom, finite conductivity of the wall metal and nonzero
temperature of the system. Both analytical and numerical results for the free
energy and force are obtained over a wide range of the atom-wall distances.
Numerical computations are performed for an Au wall and metastable
He${}^{\ast}$, Na and Cs atoms. For the He${}^{\ast}$ atom we demonstrate, as
an illustration, that at short separations of about the Au plasma wavelength at
room temperature the free energy deviates up to 35% and the force up to 57%
from the classical Casimir-Polder result. Accordingly, such large deviations
should be taken into account in precision experiments on atom-wall
interactions. The combined account of different corrections to the
Casimir-Polder interaction leads to the conclusion that at short separations
the corrections due to the dynamic polarizability of an atom play a more
important role than -- and suppress -- the corrections due to the nonideality
of the metal wall. By the comparison of the exact atomic polarizabilities with
those in the framework of the single oscillator model, it is shown that the
obtained asymptotic expressions enable calculation of the free energy and force
for the atom-wall interaction under real conditions with a precision of one
percent.
