What we colloquially call an "eruv" is actually intended to be a halachic doorway (tzurath hapethach) to count as a partition delineating a reshuth hayachid (private domain). As such, every post should really be obligated in a "mezuza" (see Chazon Ish Hilchos Mezuza 172; see also, however, Sefer Chovas haDar 5:1, both cited here). Leniencies are suggested where there is a threat that the mezuza scroll might be defaced by the public. Are there any Rabbis, communities (or private eruvim, for that matter) that do indeed put mezuzoth in the posts?
We live in a square made up of 8 buildings with 4 entrances.
We have doorposts connected by a string at every entrance, as an Eruv.
When a neighbour - some 15 years ago - made a bris at home and invited Reb Chaim Kanievsky שליט"א to be Sandek, he noticed this.
He paskened that we need a Mezuza at each entrance.
As a result we replaced the string with a solid lintel. Why?
1. Aligning a Mezuza under a string is next to impossible.
2. Strings snap and then the Mezuzah has to be refastened; a pain when it's solidly affixed to prevent vandalism.
As to why a regular Eruv does not have Mezuzot on every entrance, I've been told that these doorposts are not for entering and exiting and thus do not need a Mezuza.
See Kitzur Shulchan Aruch סימן יא - הלכות מזוזה:
אַךְ אִם יֵשׁ אֵיזֶה פֶתַח שֶׁאֵינוֹ עָשׂוּי אֶלָּא לְהַכְנִיס דֶּרֶךְ שָׁם אֵיזֶה מַשָּׂא לִפְרָקִים וְיֵשׁ שָׁם פֶּתַח אַחֵר לִכְנִיסָה וִיצִיאָה, אֲזַי הַפֶּתַח הֶעָשׂוּי רַק לְהַכְנִיס מַשָּׂאוֹת, פָּטוּר
Doors that are rarely used - e.g. for deliveries only - are exempt from Mezuza if there are other entrances that are usually used.