Perturbative theory for the Boltzmann equation in bounded domains with different boundary conditions