I use this trick with Uni. Each and every doorway in the house, I go first, and she follows. Before you go through the door, have him sit, you walk through, then say good boy, come on! Do it every single time. i did this for a long time when Uni was a baby. So they will eventually understand that ALL doorways they have to wait for your OK to go through. Most likely Duncan was just trying to say hi to the mail carrier. If Uni sees someone outside, then yes she will run through, but only to the person, not to go down the street. Also, if i call her back in, she will come back in.
Also work on your "stay". Have Duncan stay and you back away from him a few feet, with you facing him. Then
come back to him and reward. Don't have him stay then
come to you. He needs to know the difference between stay and come, and sometimes it will confuse them if you have them come to you. Keep extending the distance and time of your stay, until you know he got it. Then try doing the stay and you turn your back from him, then come back.
In the meantime while training, yes get the baby gate.