Are relations forbidden temporarily considered Mahrams?
General Chapter
Al-Mughni
Book of Hajj
Primary text
Those whom a woman is forbidden to marry only temporarily, such as her slave, or her sister's husband, are not considered Mahrams to her. This ruling is explicitly stated by Ahmad because such individuals are not deemed trustworthy protectors of her honor, and the prohibition of marriage is not permanent. They are treated as non-related strangers.
Supporting text
There is a view attributed to Al-Shafi'i that her slave is a Mahram because looking upon her is permissible for him, similar to a blood relation. This view is deemed weaker because blood relations are trustworthy and the prohibition is permanent, a quality lacking in the slave.