1 17 18 package org.apache.james.transport.matchers; 19 20 import org.apache.james.util.RFC2822Headers; 21 import org.apache.mailet.Mail; 22 import org.apache.oro.text.regex.MalformedPatternException; 23 24 import javax.mail.MessagingException ; 25 26 31 public class NESSpamCheck extends GenericRegexMatcher { 32 protected Object NESPatterns[][] = {{RFC2822Headers.RECEIVED, "GAA.*-0600.*EST"}, 33 {RFC2822Headers.RECEIVED, "XAA.*-0700.*EDT"}, 34 {RFC2822Headers.RECEIVED, "xxxxxxxxxxxxxxxxxxxxx"}, 35 {RFC2822Headers.RECEIVED, "untrace?able"}, 36 {RFC2822Headers.RECEIVED, "from (baby|bewellnet|kllklk) "}, 37 {RFC2822Headers.TO, "Friend@public\\.com"}, 38 {RFC2822Headers.TO, "user@the[-_]internet"}, 39 {RFC2822Headers.DATE, "/[0-9]+/.+[AP]M.+Time"}, 40 {RFC2822Headers.SUBJECT, "^\\(?ADV?[:;)]"}, 41 {RFC2822Headers.MESSAGE_ID, "<>"}, 42 {RFC2822Headers.MESSAGE_ID_VARIATION, "<>"}, 43 {RFC2822Headers.MESSAGE_ID_VARIATION, "<(419\\.43|989\\.28)"}, 44 {"X-MimeOLE", "MimeOLE V[^0-9]"}, 45 {"MIME-Version", "1.0From"}, 47 {"X-Mailer", "DiffondiCool"}, 49 {"X-Mailer", "Emailer Platinum"}, 50 {"X-Mailer", "eMerge"}, 51 {"X-Mailer", "Crescent Internet Tool"}, 52 {"X-Mailer", "Avalanche"}, 54 {"Subject", " "}, 56 {"MessageID", "<.+>"}, 58 {"X-References", "0[A-Z0-9]+, 0[A-Z0-9]+$"}, 59 {"X-Other-References", "0[A-Z0-9]+$"}, 60 {"X-See-Also", "0[A-Z0-9]+$"}, 61 {RFC2822Headers.SENDER, ".+"}, 64 {RFC2822Headers.RESENT_FROM, ".+"}, 65 {"Resent-By", ".+"}, 66 {"X-Mozilla-Status", ".+"}, 68 {"X-Mailer", "Internet Mail Service"}, 71 {"X-ID", ".+"}, 73 {"X-UIDL", ".*"}, 75 {"X-mailer", "Pegasus"}, 79 {"X-Mailer", "Pegasus"}, 81 {"X-Confirm-Reading-To", ".+"}, 83 {RFC2822Headers.COMMENTS, "Authenticated sender"}, 85 {"X-PMFLAGS", ".*"}, 86 {"X-Pmflags", ".*"}, 87 {"X-pmrqc", ".*"}, 88 {"Host-From:envonly", ".*"}}; 89 90 public void init() throws MessagingException { 91 try { 93 compile(NESPatterns); 94 } catch(MalformedPatternException mp) { 95 throw new MessagingException ("Could not initialize NES patterns", mp); 96 } 97 } 98 } 99 | Popular Tags |