This is part of the Sunnah. If a person dreams that he greeted a man,this indicates that he will do an act of Sunnah and remove enmity that existed between them. The same applies if he shakes hands with his enemy or opponent. In the Hadeeth it says:
“Shaking hands increases friendship.”
If a person dreams that an old man he does not know greets him,he will be safe from the punishment of Allah; if he does know that oldman, he will marry a beautiful woman and eat different kinds of fruit,because Allah says:
“They will have therein fruits (of all kinds) and all that they ask for. (It will be said to them): Salaam (peace be on you) — aWord from the Lord (Allah), Most Merciful.”
If he dreams that a young man whom he does not know greets him,he will be safe from the evil of his enemies. If he asks a man for awoman’s hand in marriage then dreams that he greeted that man andhe returned the greeting, he will marry her, but if he does not return the greetings he will not marry her.