The posterior pituitary gland is not a 'true' endocrine gland because
The posterior pituitary is also called the neurohypophysis. It is actually an extension of nerve cells from the hypothalamus.
It doesn't produce hormones, but only stores and releases hormones produced by the hypothalamus.
On the other hand, the anterior pituitary (adenohypophysis) is actually a gland that produces hormones.