I don't answer the door if I don't know who it is. But that's not limited to knowing your name. For example, I know the neighbors kids by sight but not name. When they come selling cookies, popcorn, etc for Scouts, band, football, etc I open the door and support their endeavors. I'm a softy in that regard. Best judgement is always used.
Otherwise, I usually don't open the door with the exception of one recent individual who was particularly persistent, effectively harassing my wife and that is a sure way to piss me off.
A few weeks ago my wife was home all day and a supposed salesman came by 4 times. He'd been in the neighborhood ALL day. She didn't answer once. I got home in the evening and she briefed me on his actions. He came back a 5th time while I was there. I opened the door and needless to say said some not so nice things to him.
The first words out of my mouth were "leave now". He kept talking and since he failed to turn and leave I stepped out on the porch to give him some more motivation while saying some increasingly un-Christian things. He kept talking and still wouldn't step back. He kept saying he wasn't selling anything. That there were lots of reports of bug and ant pests in the area. That he "had" to inform me they were going to do some pest control nearby. Red flags were flying up everywhere. If you must inform me but aren't selling anything (bullshit) than why not just leave a note? Either this guy had nothing to do with pest control or he WAS selling something.
Either way he was a liar and informed that he was trespassing. The sheriff's dept was called immediately and given a full description. They dispatched a deputy immediately.
In this situation, I found it VERY odd that this same guy came back so many times. I thought he was casing the place and for that reason I wanted to make it very clear that the house was indeed occupied and it was occupied by a man. During my "neighborly" "discussion" with this guy I made it clear I knew how many times he'd been by my house in an attempt to show him I was home all day and was just refusing to answer the door.

