On the role of resonances in polluting white dwarfs by asteroids