The mezuzah should be affixed to the top third of the doorpost, measuring from the lower lintel. The extended posts are excluded because the window does not become an entrance merely because it is framed by posts and a lintel. Moreover, the significant posts are the ones that frame the door.
Even so, if there is an area where the top thirds of both calculations intersect, the mezuzah should ideally be placed there, as long as it would still be a tefach away from the lower lintel.
 Mezuzot Beitecha 289:2, citing oral ruling of Chazon Ish.
 Indeed, according to Rambam, a doorway without a door is exempt from mezuzah.
 Teshuvos V’Hanhagos 2:550.