5. Given that the length of the major axis of an ellipse is 4, the left vertex is on the parabola $y^{2}=x-1$, and the left directrix is the $y$-axis. Then the maximum value of the eccentricity of such an ellipse is $\qquad$

Translate the above text into English, please retain the original text's line breaks and format, and output the translation result directly.
5. $\frac{2}{3}$.

Since the x-coordinate of the point on the parabola is not less than 1, that is, the distance to the y-axis is not less than 1, thus, the distance from the left vertex of the ellipse to the left directrix is not less than 1.
$$
\begin{array}{l}
\text { Then } \frac{a^{2}}{c}-a \geqslant 1 \Rightarrow \frac{a}{c} \cdot a \geqslant a+1 \\
\Rightarrow e \leqslant \frac{a}{a+1}=\frac{2}{3} .
\end{array}
$$

When the left vertex of the ellipse is the vertex of the parabola, $e$ achieves its maximum value $\frac{2}{3}$.