Bastards and subjects are forbidden for eternity to the end of days, whether males or females:
Amonites and Moabites are forbidden, and their prohibition is an eternal prohibition; but their females are immediately permitted.
Egyptians and Edomites are forbidden [to be married into] until after three generations - both female and male. That is, after one [Edomite or Egyptian] converts, they and their son (born after the conversion) are forbidden [for marriage]. The grandchildren are permissible.
An Egyptian woman who is pregnant when she converts - her son [or daughter] is Egyptian.
A [male] Israelite who comes to one of these, the child shall follow her tribe. And if one of these - except for a bastard - comes to a daughter of Israel, the child will be ok for the congregation [to marry], except for kohanim.
A convert (male or female) from one of these who marries an Israelite (male or female), the child goes according to the one who is invalid. Thus, a second generation Amonite or Egyptian convert who marries an Israelite - the daughter is permissible, even to a cohen, since after either of these [the daugher] would become permissible. But a second generation male Egyptian who marries a first generation female Egyptian, yields a second generation Egyptian child. A first generation male Egyptian who marries a second generation female Egyptian: some say they yield a third generation child, and RaMBaM says a second genaration [Egyptian] child.
If an Ammonite man weds and Egyptian woman, the offspring is considered and Ammonite. If an Egyptian man weds an Ammonite woman, the offpsring is considered an Egyptian, because parentage is determined [exclusively] by paternity for non-Jews. If they convert to Judaism we follow the more 'damaged' of the two. Therefore, if an Ammonite male convert weds an Egyptian female convert, any male offspring is considered an Ammonite and retains his prohibition forever, while a female offspring is considered Egyptian. Rem"a: If an Egyptian male convert that weds a non-Jewish Ammonite woman, male offspring are considered Ammonites, while female offspring are permitted (another version reads: are considered Egyptian)
And an Egyptian convert who marries a [female] Amonite convert, the child [from such a union] is an Egyptian and is prohibited until the third generation.
All other nations, after they convert they are like [native born] Jews, [and they are permitted to marry into the congregation] immediately.
Today all nations are confused. Therefore, if an Ammonite, Moabite or Edomite convert, they may marry into the congregation immediately. Individuals are always seen as emerging from the majority, and we depend on the rationale that this person's origins are from the majority of nations who are permissible immediately. The Rambam extends this rule to an Egyptian, but according to the Rosh, the Egyptian retains his original prohibition.
A slave that was immersed in the mikva with the intent of keeping him as a slave may not wed a Jewish woman. A Jew may not wed a maid-servant, whether she belongs to him or anyone else.
After his master sets him free he is considered a Jew in all respects. If his master relinquished ownership rights, or if his master placed teffilin on him, or if his master served as the public officiant and called him to the Torah, or is his master married him off to a Jewish woman, the slave is still prohibited from cohabiting with a Jewish woman until his master writes a writ of freedom. Nevertheless, we must be concerned about his betrothal. Some say that even if his master did not marry him off, but instead he married in the presence of his master, we should be concerned about the betrothal. (Rem"a: Certainly if the master weds his own maidservant, we must be concerned about the betrothal.)
What is a mamzer? He is the product of a union that is called arayot, whether it is a capital offense or one punishable by spiritual death, with the exception of a menstruant woman, where the offspring is considered damaged but not a mamzer, even on rabbinic level.
If a woman's husband traveled abroad and remained there for more than twelve months, and she had a child after twelve months, that child his a mamzer, because gestation is never longer than twelve months. Some say he is not definitively a mamzer. Since it is subject to debate, he is considered a doubtful mamzer. Rem"a: During the twelve months, however, there is no concern, because we can say that this was a very long gestation. This is only if we see nothing distasteful about her, but if we did see something distasteful we do not say that it was a long gestation, and we are concerned for the offspring. If a woman was impregnated by her husband at the end of Sivan and she gave birth at the beginning of Kislev, even though there are only five months between them we need not be concerned that she was impregnated before then, because the determinant is the new month, and there were seven months of gestation. Even if she miscarried in Tishrei, and she heard the baby crying, we need not be concerned that she was impregnated earlier, because a five month gestated fetus can cry, and this was a stillborn who could not survive.
If a rumor spreads that a married woman committed adultery, and everyone is talking about her, we do not need to be concerned that her children are mamzerim, because we rely on the assumption that most of her cohabitation was with her husband. With regard to herself, however, we must be concerned that she is a harlot, and if her husband is a kohen the concern is a at a Torah level (Rem"a: If her husband is a kohen, we are concerned that her children are disgraced from the priesthood), and if he is a regular Jew, he may elect to distance himself from the repulsive. If she is extremely loose, we must even be concerned about her children. Rem"a: Nevertheless, she is believed if she says here children are legitimate. If she was loose when she was single or betrothed, but not after she married, even if she was seen committing an act of adultery, her children are legitimate.
[In the case of ] a woman whose husband [is presumed dead] at sea, and becomes married [to another man], but then [later learns] her [initial] husband is alive: any child from the second [marriage] is a complete bastard and is permitted to marry a female bastard. If the first husband returns to her before the second [husband] divorces her, and bears a child - the child is a rabinnic bastard, who is forbidden to marry a complete bastard, but is permitted to marry another rabinnic bastard. (But, if she becomes promiscuous, and her husband returns to her, the child does not become a bastard) (Mordekhai)
If a man who is half slave half free man cohabits with a married woman, there is no recourse for the offspring because he has both mamzer and permitted aspects combined. Therefore he may not wed a maid-servant, and his offspring will carry his characteristics for all generations.
An female or male Israelite who marries a bastard child, they always produce bastard [children].
If a non-Jew or a slave cohabit with a female mamzer, the offspring is a mamzer. If they cohabit with a Jewish woman, whether she is single or married, the offspring is permitted [to marry into the congregation], but is considered damaged with regard to marrying a kohen.
If a mamzer cohabits with a non-Jewish woman, the offspring is considered a non-Jew. If he converts, he is a full Jew. If a mamzer cohabits with a maid-servant the offspring is a slave. If he is freed, he is a free Jew. Therefore a mamzer may wed, as a matter of first resort, a maidservant who has accepted Jewish observance and has immersed in the mikva for the sake of slavery, so that his offspring may be permitted after they are freed and they may marry a Jewish woman.
A non-Jew who cohabits with his mother and she gives birth to a son from that [union] and that son converts [to Judaism], he [i.e., the son] is permitted to enter the congregation [i.e., he is not considered a mamzer].
A proselyte and a freed slave are permitted [to marry] a female mamzer. Similarly, a mamzer is permitted [to marry] a female proselyte or freed slave, since the community of proselytes is not properly called a community, and therefore a child born from them is a mamzer. This applies even if ones parentage and birth were within a [seemingly valid] marriage, for example, if ones father were a proselyte and he married a proselyte; even in such a situation, this person is permitted to marry a mamzer, even to the 10th generation; however after [the 10th generation], it would be forbidden, for by then the awareness of the proselyte origins would be gone and he then falls into the category of an Israelite man who marries a mamzer. The Rambam permits their child to marry a mamzer, as well as his son and grandson until the time when the awareness of the proselyte origins are gone and no one knows he is a proselyte; from then on, his descendents may not marry a mamzer women. The law is the same for proselytes and freed slaves; the same law applies to all of them.
a convert marries a daughter of a Jew, or a Jew marries a convert. They have a child who is then a jew, that child cannot marry a bastard.
[The general principle is:] A mamzer should only marry a female mamzer. When does this [principle] apply? To a situation where both of their statuses [as mamzer] is certain. However, if [the status of] one is certain and the other is in suspect or even if both of their statuses are suspect, then they are forbidden to marry one another lest [they marry and] one is a mamzer and the other is not a mamzer. When does a mamzer of suspect status arise? For example, one who is born from a union suspected of being forbidden, such as when ones father had sex with ones mother and the possibility of them contracting a legal marriage was in doubt or they were divorced but the legality of their divorce was in doubt.
A childless widow subject to levirate marriage who did not wait 3 months after her husband [died] prior to performing levirate marriage [i.e., relations with the levir], and then giving birth, there is a doubt whether the offspring is a 9-month baby of the first [husband] or a 7-month baby of the latter [husband/levir], [but] the child is kosher [i.e., not a mamzer because even if the baby belonged to the first husband, in which case levirate marriage would not be required and therefore relations with her husband's brother would normally be forbidden, the prohibition against relations does not strictly begin until the child of the first husband is actually born]. But, if afterwards the levir returned and cohabited with her and she became pregnant and gave birth, the [second] offspring has a doubtful mamzer status [because once the first child was born, since it could have been the first husband's child, levirate marriage would not have been necessary, meaning that relations with the husband's brother would be strictly forbidden; however, the status is subject to a doubt because if the child actually belonged to the levir, then the levirate marriage was legitimate] and is [therefore] prohibited to [marry either] a mamzeret or a Jewess.
An unmarried woman who became pregnant and gave birth: if she is not present to examine, is deranged, or is mute, or even if she says, "[The child] is Ploni's," and we know that Ploni to be a mamzer [i.e., is unfit to marry within the Jewish community], the child is [of] uncertain [status]. Even if said Ploni admits that she had intercourse with him, for just as she was promiscuous with him, she was also promiscuous with another. Yet if said Ploni is fit [i.e., not a mamzer], the child is fit. Nevertheless, we do not presume him to be his son definitively [so as] to inherit him unless he admits that this is his son. Rem"a: Even if she was exclusively his, she is not believed concerning him (Ra"n). And even one witness is not believed concerning him when he contradicts him. But we are concerned about her statements, and he may not marry the relatives of said Ploni. Rem"a: Specifically an unmarried woman. However, if she cheated on her husband, even if she says '[The child] is Ploni's and is a mamzer,' we show no concern for her words, for we ascribe most intercourse to the husband. He is therefore fit and may marry the relatives of said Ploni.
A betrothed woman who conceived and she is in her father's house, if she says from her betrothed-to she conceived, [then] if he concurs or is not before us, the child is kosher, and is heir. And even if the betrothed man says that he does not recall, just that he does not contradict her (R"an). And if he does not concur, but rather contradicts her that it is not from him, the child is an unquestionable bastard. And if she is not before us to ask her, or she says I do not know from whom it is, it is a questionable bastard. And the woman is not a presumed whore, rather, she is believed to say: "to by betrothed I was laid", even if he contradicts her. And these [aforementioned] matters are [as regards] the general world, [for example] that if she is married to a priest she does not leave [the marriage] and the child from him is kosher; but to the betrothed man himself, she is forbidden, for behold she "has placed it as to himself a piece of forbidden matter".
If the people were gossiping that she was promiscuous with her betrothed as well as with other men, even if the betrothed had intercourse with her in his father-in-law's home, the child is suspected of being a mamzer, for just as she was reckless with her betrothed, so too she was reckless with others. If she was examined and she said, "I had intercourse with my betrothed," the child is fit. Rem"a: So too if it is known that the betrothed had intercourse with her and there have been no rumors that she was promiscuous with others.
A married woman that says about her fetus that he is not from her husband, she is not believed to invalidate him. HG"H - There are those that say, specifically with a woman married through nissuin, that the son has a assumption (chazakah) of being valid. But a women only married through arusin that she says her son is a mamzer, even though the engaged husband says that it is his, and that his hand did not move from her's. There are those that say, that the son is a doubt of a mamzer, and there are those that say he is believed. But a father that says on a fetus that it is not from him, or on one of his sons that it is not his son, he is believed to invalidate him and he is a absolute mamzer. And if there are sons to the son, he is not believed even on the son. And if she says: "from a idol worshiper or from a slave I became pregnant," the baby is valid because the husband is not able to contradict her on this. HG"H- This that the father is believed on the son this is specifically that he didn't have a assumption of validity from the father's mouth, but if he had a assumption of validity, furthermore the father is not believed unless with witnesses (Ri in the name of Ramah), The father that says on his son that he is a mamzer, and retracts and says an excuse for why he said it, he is believed. That which the father is believed about the son, that is where he is in the father's control, for example, with his wife in nisuin, but a unmarried woman who says "this is Plony's son," and he says "she was impregnated from a mamzer," he is not believed to invalidate him, but he is believed to make him valid.
One who says on himself that he is a mamzer, he is believed to make himself forbidden to a Israelite girl and he is forbidden to a mamzeres until he knows for sure that he is a mamzer, and his son is like him. If he has grandchildren, he is not believed to invalidate anyone but himself.
A foundling who is gathered from the market has [the status of] a questionable bastard; [that is] for example [where] there is no proof that he was not cast there to die; but if there is proof that he was not cast there to die--whether there is a proof in his body, for example that he is circumcised or that his limbs are corrected and straightened similar to that which they do for children, or that he is anointed with oil, or that they put for him makeup on his eyes, or they hung for him an amulet; whether there is proof in the location, for example that he was found in a place that many [people] are found there, or that he is hanging on a tree in a place that beasts cannot reach there and it was close to a city, or that he is found in a synagogue that is nearby, or in the sides of the public thoroughfare--there is not in him from [the issue of] foundling, since they are concerned for him to protect him, and he was not cast there but on account of hunger.
The child that was cast in the road, and a person comes and says: "it is my child and I cast it", he is believed. And similarly his mother is believed. If [the child] was gathered from the market, and his father and mother come and say "it is our child", they are not believed since there already came out on him the name "foundling". And in years of famine they are believed, for on account of hunger they cast him and they want that others should feed him and therefore they were quiet until he was gathered.
The foundling that is found in a city that has in it idolaters and jews, whether that there was a majority of idolaters or jews, this is a questionable idolater for purposes of lineage. If he [the foundling] betrothed a woman, she requires a get on account of doubt. If a court immerses him [in a mikva] for the purpose of conversion, or he immersed himself when he grew up, he is for purposes of lineage like other foundlings found in jewish cities, because the immersion does not function except to remove him from the hands of the idolaters.
If he did not immerse (in a mikva) and a court did not immerse him, if most of the city is idolaters, it is permitted to feed him forbidden foods. If most are jews, [we] return to him his lost objects like a jew. [If the population was] half on half, it is a mitzva to keep him alive (exp. to feed him) like a jew, and [we] inquire for him into the heap on shabbos, and he is for purposes of damages and for all questions [in the status of] "one who demands from another, on him is the [burden of] prof". Gloss: And some say that even among a majority of idolaters, [we] inquire for him into the heap on shabbos and [we] are not commanded to keep him alive (exp. to feed him) except among a majority of jews (Tur)
Women that have given birth together, the wife of a Cohen, Levite and a Bastard (illegitimate person) . The mid-wife is trusted to say this one is the Cohen's son or the Levite or Bastard, because they are not yet assigned a status and we do not know their lineage. When does this apply in a case that she has a status of a trusted person and no one has cast doubt upon her. However if even one person has cast doubt and claimed, "She testifies falsely", She is not trusted and the boy is legitimate but has no lineage.
The questionables, for example the shushed one and the foundling, it is prohibited for them to come one onto the other (in marriage), and if they did marry, they should not keep (their spouse) rather they should divorce with a get, and the child is a questionable [person] like his parents. And there is no solution for these questionable except that they should marry converts and the child will follow the blemish. How is this? A shushed one or a foundling that married a convertess or a freedwoman, or a convert or freedman that married a shushed one or foundling, the child is a shushed one or foundling.
Any country that has in it a maidservant or idolater who is fit to give birth, since a foundling found in it is a questionable idolater or slave, when he will marry a convert behold this [woman] will be a questionable married woman. And similarly a shushed one who marries a woman that it is possible that she is to him a forbidden relative, behold she is in a [status of] questionable married woman, because betrothal does not take effect on forbidden relatives. And which one is a woman that it is possible that she is a forbidden relative to him? Any woman whose father or brothers were living when his mother conceived, and any woman who is divorced or widowed, [because] perhaps she is the wife of his father or the wife of his father's brother. Gloss: It is forbidden to marry among the Karaites, and all of them are questionable bastards, and [we] do not accept them if the wish to return (Beis Yosef found written in the responsa of R. Shimshon). But the anusim (marranos) who return to the law of Israel, it appears to me that it is permitted to marry among them similar to other converts (id.)