  We study the effect of a background flux string on the vacuum energy of
massive Dirac fermions in 3+1 dimensions confined to a finite spatial region
through MIT boundary conditions. We treat two admissible self-adjoint
extensions of the Hamiltonian. The external sector is also studied and
unambiguous results for the Casimir energy of massive fermions in the whole
space are obtained.
