(5)A prisoner may be allowed to write letters to his near relatives and friends only. Where it is found that the prisoner is corresponding with undesirable persons or vice-versa or if any correspondence is considered detrimental to the prisoners' rehabilitation, such letters, both, incoming and outgoing, shall be withheld. Prisoners may be informed of the action taken without divulging the contents of such letters received. If necessary, they may be warned in this respect.