The Catholic Church made anathema (erroneously) synonymous with excommunication only 1917. Anathema was never eternal damnation as some understand it. Anyone can always return to the Church by repentance.
Excommunication is closer to penance. Eastern priests would excommunicate "unclean" women for a period of time if it could be proven that they attended the Divine Liturgy four times a month.
Orthodox women would gather outside the Church to follow the litrugy during those "unclean" days of the month. But christological heretics, like Nestorian, were not just excommunicated, they were thrown out of the Church.
“Orthodox women would gather outside the Church to follow the litrugy during those “unclean” days of the month.”
My great grandmother would tell of sticking her head into the church through a window to see the Liturgy during those days