The rules about reflexives are very subtle and quite complicated. The general rule is that we need a reflexive when the pronoun occurs in the same immediate domain as another noun with the same reference. A domain is either the smallest clause that the pronoun occurs in, or a noun phrase where the determiner and another noun have the same reference.
- I gave Mary a picture of herself
- I wanted Bob to teach me.
- I taught myself.
- His description of himself ....
In the first sentence Mary and herself occur within the same clause, so we see a reflexive. In the second sentence, however although I and me are in the same larger clause, there is a smaller embedded clause headed by the verb teach. Because me is in this smaller clause but I is not, we don't need a reflexive pronoun. In the third sentence, which is there for contrast, we can see I and myself occurring in the same clause. Determiners like his and so forth do not normally count as co-referential within a domain. However, when a noun occurs in the same noun phrase as a co-referential determiner, we do need a reflexive. In the fourth example, we see the determiner his occurring in the same noun phrase as himself.
So far we have just talked about sentences where there are two words that are co-referential. We also need to think about people who may be actors in the sentence but are unexpressed - people or things that aren't represented by words. Most importantly we need to think about unexpressed subjects. Consider the following example:
Here, the reflexive pronoun yourself does not co-refer with any other noun. However it occurs in the same clause as the verb take and the unexpressed subject of take is you. Because yourself refers to the same entity as the subject of the verb, we need to use a reflexive here.
There are however some exceptions to the rules above. Importantly, prepositional phrases which express directions or locations occur outside the domain of a clause. It does not matter what the preposition is. It just matters whether the prepositional phrase expresses a location. Consider the following sentences:
- She kept him by her.
- She went there by herself.
In the first example, by her tells us about the location or vicinity of him. Because this is a locative expression by her falls outside of the domain of the clause. In the second sentence we also have a preposition phrase with by. However, this time the expression is not telling us about any kind of location or direction, and so we do need a reflexive pronoun here.
The Original Poster's example
- She told him good bye and shut the door behind her.
In this example she and her could be thought of as being in different clauses:
- [She told him good bye] and [shut the door behind her].
However, this is not the reason why we don't need a reflexive. The unexpressed subject of
shut is still 'she'. We could think of these as being a co-ordination of verb phrases:
- She [told him good bye] and [shut the door behind her].
In this reading the actual word she is the grammatical subject of both clauses.
The reason we do not need a reflexive here is that behind her is a locative prepositional phrase and therefore falls outside of the domain of the clause. Because it is not in the same domain, we do not need a reflexive.