Abu Hurairah (May Allah be pleased with him) reported:
Messenger of Allah (ﷺ) said, "When one of you meets a brother (in Faith) he should greet him. Then if a tree or a wall or a stone intervenes between them and then he meets him again, he should greet him."[Abu Dawud]. (DE)
App reference (DE): Book 6, Hadith 16 (DE)
Arabic/English book reference (DE): Book 6, Hadith 860 (DE)