Ahmad ibn Naqib al-Misri (from “The Reliance of the Traveler – A Classic Manual of Islamic Sacred Law”), circa 1360 C.E (pg 3 a1.5):
According to this school (Shafi’i), a person is not morally obligated by God to do or refrain from anything unless the invitation of a prophet and what God has legislated have reached him. No one is rewarded for doing something or punished for refraining from or doing something until he knows by means of God’s messengers what he is obligated to do or obliged to refrain from.
So whoever lives in such complete isolation that the summons of a prophet and his Sacred Law do not reach him is not morally responsible to God for anything and deserves neither reward nor punishment.
And those who lived in one of the intervals after the death of a prophet and before a new one had been sent were not responsible for anything and deserve neither reward nor punishment.
This view is confirmed by the word of God Most High in the Qur’an 17:15 (“The Journey by Night”):
“We do not punish until We send a messenger.”
Final words: I ask Allah to forgive any mistakes in this writing, which are my own; and I thank Allah for any good in this writing, which is from Him, and from His Wisdom, with which He guides men.