  We derive a residual based a-posteriori error estimate for the outer normal
flux of approximations to {the diffusion problem with variable coefficient}. By
analyzing the solution of the adjoint problem, we show that error indicators in
the bulk may be defined to be of higher order than those close to the boundary,
which lead to more economic meshes. The theory is illustrated with some
numerical examples.
