Posts Tagged spamassasin

Spamassassin Blacklists

Posted by Filed Under Spam Control with Comments Off

Blacklists are a little easier to understand in that you will find domains or senders that you simply do not want to receive mail from them ever.
There are two blacklist directives.  The first directive, blacklist_from will specify a a sender address that address is what will appear in the Resent-From, From, Envelope-Sender, Resent-Sender or X-Envelope-From. When the sender address matches a score of 100 is added to the sender, which effectively blocks mail from that user.   Edit the /etc/mail/spamassassin/local.cf file to place these entries.

blacklist_from joe@badexample.com
blacklist_from badexample.com *.badexample.com

The wildcard “*” can be used for including multiple characters to eliminate all users on the badexample.com domain.

You can remove a user from the list by using the the unblacklist_from directive.

unblacklist_from badexample.com

The other method of blacklisting users is the blacklist_to which will blacklist the recipient address.  This users may be found in the Resent-To, Resent-Cc, To, Apparently-To, Delivered-To, Envelope-Recipients, Apparently-Resent-To, X-Envelope-To, Envelope-To, X-Delivered-To, X-Original-To, X-Rcpt-To, X-Real-To, or Cc.

blacklist_to users@mycompany.com

This would be used to eliminate mail coming to possibly forged To header by adding 10 points to the score.

Here is what a local.cf looks like with some blacklist entries.
# These should be safe assumptions and allow for simple visual sifting
# without risking lost emails.

required_hits 5
report_safe 0
rewrite_header Subject [SPAM]

blacklist_from *@bellevuecollege.edu
blacklist_from *@vmta-c-253.lstrk.net
blacklist_from *@SmartStream-1.itsjss.com
blacklist_from *@hosting.obdobion.com

Dropping Spanish Spam with Spamassassin

Posted by Filed Under Spam Control with Comments Off

Spamassassin has a section in /usr/share/spamassassin called 25_body_tests_es.cf which deals with Spanish Spam.  These rules are not listed in the 50_scores.cf so as explained in the 50_scores.cf rules not listed automatically get a score of “1”.  In some cases that score may not be enough so you will want to modify it in /etc/mail/spamassassin/local.cf.  In this example the rules have all been take from the  25_body_tests_es.cf and placed in local.cf.  Each rule has had score added to adjust the score and the number 3 at the end to add an additional 3 points to each rule.  The file is saved and then you can restart spamassassin and the changes will begin to take effect.

score REMOVE_ES_01 3
score REMOVE_ES_01 3
score REMOVE_ES_02 3
score REMOVE_ES_03 3
score REMOVE_ES_04 3
score REMOVE_ES_05 3
score REMOVE_ES_06 3
score REMOVE_ES_07  3
score REMOVE_ES_08 3
score SUBSCRIBE_ES_01 3
score DEJAR_DE_FUMAR_ES 3
score GRATIS_ES 3
score INTERESADO_ES 3
score LEY_ORGANICA_ES 3
score NORMATIVA_SPAM_ES 3
score LEY_CHILE_ES_01 3
score LEY_CHILE_ES_02 3
score TARJETA_VERDE_ES 3
score PROMOCION_ES 3
score ALTA_BUSCADORES_ES 3
score EXCLAMACION_ES 3
score PRESENTAMOS_ES 3
score CONTRA_REEMBOLSO_ES 3
score PEDIDO_ES 3
score CLICK_ES 3
score REGALO_ES 3
score GANADORES_ES_01 3
score GANADORES_ES_02 3
score PORNO_GRATIS_ES 3
score MAS_INFORMACION_ES 3
score INFORMACION_RESERVA_ES 3
score REENVIA_ES 3
score NO_MAS_MAIL_1_ES 3
score NO_MAS_MAIL_2_ES 3
score COLECTOR_DE_MAILS_ES 3