‘Come you, monk, be guarded as to the doors of the sense-organs. Having seen a material shape with the eye…. Having cognized a mental state with the mind, be not entranced by the general appearance, be not entranced by the detail. For if you dwell with the organ of mind uncontrolled, covetousness and dejection, evil unskillful states of mind, might flow in. So fare along with its control, guard the organ of mind, achieve control over the organ of the mind.’
Dantabhumi sutta