A significant amount of the available information on web sites come from the interaction with users, such as news sites and blogs, where readers can post comments and sometimes develop habits of frequenting them. Some blogs specialize in certain subjects, receive the users credibility and become references in the field. However, the ease of inserting content through text comments makes room for unwanted messages, which affect the user experience, reduce the quality of the information provided by the websites and indirectly causing personal and economic losses. Given this scenario, this paper presents a comprehensive analysis of machine learning techniques applied to automatically detect undesired comments posted on blogs. Experiments carried out with a real and public database indicate that support vector machines and logistic regression, trained with both attributes extracted from the text messages and metadata from the posts, are promising in the task of filtering unwanted comments.