Where to affix it, how to affix, and its benediction.
One who is coming to affix [a mezuzah] should place it in a reed or other type of tube and he should affix it in its place and say the placing “who sanctified us with His commandments and commanded us to affix a mezuzah” and one should not make a blessing when the mezuzah is being written. Rema: One who is affixing two or three mezuzot should make one blessing for all of them.
Where is the proper place for affixing [the mezuzah]? In the empty space of the doorway [on the inside of the doorway] within the tefach that is closest to the outside, Rema: And if he changes [and places it somewhere else] it does not prevent [the fulfillment of the mitzvah] so long as he places it on the doorpost itself. [Place it] at the start of the upper third of the height of the entryway; and if he attached it higher than this it is valid, so long as it is at least a tefach way from the lintel, and one should attach it on the right side [of the doorway from the point of view] of entering. Rema: and there is no difference whether the person is left-handed or not. And if he placed it on the left side [of the doorway from the point of view of one entering] then it is invalid.
Someone whose house is divided in two and each part is a doorway open to reshut harabim, in the separating divider there is a doorway to both halves: In the place where he makes the hole in the threshhold, [wherein] the door's axle (hinge?) turns, and he erects the doors there, that is the house, and where he enters when it's on his right, he affixes it. Template:Clarify
How is it affixed? Nail it with nails into the door post, or dig out a hole and stick it in there. And don't dig deeper than a tefach, else it's invalid.
[If] he affixed on the doorposts of the doorway whilst [doorpost was] detached, and then attached [the doorpost] to the doorway, it's invalid.
The mezuzah should be erect lengthwise on the length of the doorpost of the doorway, and one should intend that the [word] shema that is at the end of the scroll should be [facing] the outside. Rema: And that is how they practice, but there are those who say that [the mezuzah] is invalid erect, rather its length needs to be inclined towards the width of the doorpost of the doorway [that is to say, horizontally]. And those who are scrupulous fulfill both [opinions] and place the mezuzah at an incline, at a diagonal. And this is how it is proper to practice, and this is how we practice in these places, and one should intend that the top of the mezuzah, where the [word] shema is, should be towards the inside and the last line should be facing outside.