According to riwayaat we may keep long as long as we look after the hair otherwise either shave it or trim it.
There is specific chapter in Tahzeebul Islam on hair written by Allama Majlisi
Above was summary of the Hadith of Rasul saw
According to a tradition from Hazrat Moosa Kazim (a.s.), when the hair on the head get long, the eyes get weak and eyesight gets dim and when the hair are cut, the brightness of the eyes is increased. (This applies to men).
It is haram (not permissible) for women to cut their hair without any reason.
Another reliable tradition states that a person who will not part his hair when he has kept them long, his head will be opened on the day of judgement by God with a cutter of fire.
A tradition states that the Holy Prophet (s.a.w.a.) has prohibited a woman who has physically matured to gather her hair in front or at the sides and knot them and hang them in front like men.
Two other traditions state that there is no harm in making an addition (something to tie a plait) from the hair of one's own hair or that of an animal but the hair of other women should not be mixed with one's own. One should be careful to take off the addition of animal's hair from one's hair before starting one's prayers, as namaz is not allowed with it. But if it is of the hair of permissible animals, then its usage even during prayers is not prohibited.