Then in the 1700s you identified yourself as the postman so you didn't get shot. I imagine a uniform and some familiarity had a lot to do with it.
For god's sake I'm not saying this is good, or this is how I want the world to work. I sure as hell don't and I'm not some conspiratorial militiaman.
Historically, i.e. in early America. There were no pigs, so you defended your own property. Typically with a gun. Warrants partly exist to stop someone from doing that, which is what the parent comment is all about.
Generally speaking you never had the right to shoot people walking on your property in America. You could tell them to get lost. Home invasion is a different matter.
Shooting the postman is illegal.