DO NOT open your heart to every man, but discuss your affairs with one who is wise and who fears God. Do not keep company with young people and strangers. Do not fawn upon the rich, and do not be fond of mingling with the great. Associate with the humble and the simple, with the devout and virtuous, and with them speak of edifying things. Be not intimate with any woman, but generally commend all good women to God. Seek only the intimacy of God and of His angels, and avoid the notice of men.
We ought to have charity for all men but familiarity with all is not expedient. Sometimes it happens that a person enjoys a good reputation among those who do not know him, but at the same time is held in slight regard by those who do. Frequently we think we are pleasing others by our presence and we begin rather to displease them by the faults they find in us.
From Imitation of Christ by Thomas A. Kempis (trans. Aloysius Croft & Harold Bolton), Chapter 8.