Trigger means for holding the bolt in the retracted position and releasing the bolt when the door is closed