We describe methods for detecting linear structures in mammograms, and for classifying them into anatomical types (vessels, spicules, ducts, etc). Several different detection methods are compared, using realistic synthetic images and receiver operating characteristic (ROC) analysis. There are significant differences (p < 0.001) between the methods, with the best giving an Az value for pixel-level detection of 0.943. We also investigate methods for classifying the detected linear structures into anatomical types, using their cross-sectional profiles, with particular emphasis on recognising the "spicules" and "ducts" associated with some of the more subtle abnormalities. Automatic classification results are compared with expert annotations using ROC analysis, demonstrating useful discrimination between anatomical classes (Az = 0.746). Some of this discrimination relies on simple attributes such as profile width and contrast, but important information is also carried by the shape of the profile (Az = 0.653). The methods presented have potentially wide application in improving the specificity of abnormality detection by exploiting additional anatomical information.