~ubuntu-branches/ubuntu/utopic/spamassassin/utopic-proposed

« back to all changes in this revision

Viewing changes to rules/20_fake_helo_tests.cf

  • Committer: Bazaar Package Importer
  • Author(s): Noah Meyerhans
  • Date: 2010-01-26 22:53:12 UTC
  • mfrom: (1.1.13 upstream) (5.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100126225312-wkftb10idc1kz2aq
Tags: 3.3.0-1
* New upstream version.
* Switch to dpkg-source 3.0 (quilt) format

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# SpamAssassin rules file: fake-HELO tests
2
 
#
3
 
# Please don't modify this file as your changes will be overwritten with
4
 
# the next update. Use @@LOCAL_RULES_DIR@@/local.cf instead.
5
 
# See 'perldoc Mail::SpamAssassin::Conf' for details.
6
 
#
7
 
# We should write a new ruletype for these, to save typing.
8
 
#
9
 
# <@LICENSE>
10
 
# Licensed to the Apache Software Foundation (ASF) under one or more
11
 
# contributor license agreements.  See the NOTICE file distributed with
12
 
# this work for additional information regarding copyright ownership.
13
 
# The ASF licenses this file to you under the Apache License, Version 2.0
14
 
# (the "License"); you may not use this file except in compliance with
15
 
# the License.  You may obtain a copy of the License at:
16
 
17
 
#     http://www.apache.org/licenses/LICENSE-2.0
18
 
19
 
# Unless required by applicable law or agreed to in writing, software
20
 
# distributed under the License is distributed on an "AS IS" BASIS,
21
 
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22
 
# See the License for the specific language governing permissions and
23
 
# limitations under the License.
24
 
# </@LICENSE>
25
 
#
26
 
###########################################################################
27
 
 
28
 
require_version @@VERSION@@
29
 
 
30
 
# ---------------------------------------------------------------------------
31
 
 
32
 
# Suresh says: these will never be used as HELOs from real mail.com relays.
33
 
# Just check the most recent handover; the connection to a trusted host.
34
 
# This way a legit sender can send to their MSA using that HELO (quite a few
35
 
# MUAs will do that), but a spammer gets caught.  (List of domains comes from
36
 
# the drop-down list on the Mail.com signup page.)
37
 
header FAKE_HELO_MAIL_COM_DOM  X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=(?:\S+\.|)(?:(?:mail|email|iname|cheerful|consultant|europe|mindless|myself|post|techie|usa|writeme|2die4|artlover|bikerider|catlover|cliffhanger|cutey|doglover|gardener|hot-shot|inorbit|loveable|mad\.scientist|playful|poetic|popstar|saintly|seductive|soon|whoever|winning|witty|yours|africamail|arcticmail|asia|australiamail|europe|japan|samerica|usa|berlin|dublin|london|madrid|moscowmail|munich|nycmail|paris|rome|sanfranmail|singapore|tokyo|accountant|adexec|allergist|alumnidirector|archaeologist|chemist|clerk|columnist|comic|consultant|counsellor|deliveryman|diplomats|doctor|dr|engineer|execs|financier|geologist|graphic-designer|insurer|journalist|lawyer|legislator|lobbyist|minister|optician|pediatrician|presidency|priest|publicist|realtyagent|registerednurses|repairman|representative|rescueteam|scientist|sociologist|teacher|techietechnologist|umpire)\.com|(?:programmer|earthling|hairdresser)\.net|musician\.org) /i
38
 
describe FAKE_HELO_MAIL_COM_DOM Relay HELO'd with suspicious hostname (mail.com)
39
 
 
40
 
# ---------------------------------------------------------------------------
41
 
# Interesting new feature; spamware HELO'ing, from a dialup IP addr,
42
 
# using that IP's rDNS entry.  We can catch this easily.  There aren't
43
 
# many legit mailservers calling themselves
44
 
# 'dhcp024-210-034-053.columbus.rr.com'. ;)
45
 
#
46
 
# Note the '^[^\]]+ ' stanza: this ensures that we only match spamware
47
 
# connecting to a trusted relay; if a mail came from a dynamic addr but
48
 
# was relayed through their smarthost, that's fine.
49
 
 
50
 
# dhcp024-210-034-053.columbus.rr.com [24.210.34.53]
51
 
# c-66-176-16-108.se.client2.attbi.com [66.176.16.108]
52
 
# c-67-168-174-61.client.comcast.net [67.168.174.61]
53
 
# NNN-NNN-NNN-NNN.fibertel.com.ar
54
 
# NN.NN.NNN.NNN.ap.yournet.ne.jp
55
 
# NN.NNN.NN-NN.rev.gaoland.net
56
 
# vaise-1-82-67-44-166.fbx.proxad.net [82.67.44.166]
57
 
# lns-vlq-11-62-147-186-141.adsl.proxad.net [62.147.186.141]
58
 
# dsl-200-95-109-107.prod-infinitum.com.mx [200.95.109.107]
59
 
# port-212-202-77-203.reverse.qsc.de [212.202.77.203]
60
 
# pool-151-203-32-68.bos.east.verizon.net [151.203.32.68]
61
 
# c-67-164-133-216.client.comcast.net [67.164.133.216]
62
 
# 200-171-228-6.customer.telesp.net.br [200.171.228.6]
63
 
# modemcable090.28-201-24.mc.videotron.ca [24.201.28.90]
64
 
# 80-218-47-160.dclient.hispeed.ch [80.218.47.160]
65
 
# cdm-68-226-239-16.laft.cox-internet.com [68.226.239.16]
66
 
# d53-64-35-171.nap.wideopenwest.com [64.53.171.35]
67
 
# 74.67-201-80.adsl.skynet.be [80.201.67.74]
68
 
# 12-218-225-223.client.mchsi.com [12.218.225.223]
69
 
# (require an alpha first, as legit HELO'ing-as-IP-address is hit otherwise)
70
 
header HELO_DYNAMIC_IPADDR X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=[a-z]\S*\d+[^\d\s]\d+[^\d\s]\d+[^\d\s]\d+[^\d\s][^\.]*\.\S+\.\S+[^\]]+ auth= /i
71
 
describe HELO_DYNAMIC_IPADDR Relay HELO'd using suspicious hostname (IP addr 1)
72
 
 
73
 
# dhcp024-210-034-053.columbus.rr.com [24.210.34.53]
74
 
# catv-506237d8.miskcatv.broadband.hu [80.98.55.216]
75
 
# node-c-8b22.a2000.nl
76
 
# cm89.omega139.maxonline.com.sg
77
 
# cm114.gamma208.maxonline.com.sg
78
 
header HELO_DYNAMIC_DHCP X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=\S*(?:(?<!a)cm|catv|docsis|cable|dsl|dhcp|cpe|node)\S*\d+[^\d\s]+\d+[^\]]+ auth= /i
79
 
describe HELO_DYNAMIC_DHCP Relay HELO'd using suspicious hostname (DHCP)
80
 
 
81
 
# fia83-8.dsl.hccnet.nl [62.251.8.83]
82
 
# fia160-115-100.dsl.hccnet.nl [80.100.115.160]
83
 
header HELO_DYNAMIC_HCC   X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=\S*\d+[^\d\s]+\d+\S*\.(?:docsis|cable|dsl|adsl|dhcp|cpe)\.[^\]]+ auth= /i
84
 
describe HELO_DYNAMIC_HCC Relay HELO'd using suspicious hostname (HCC)
85
 
 
86
 
# h0002a5d76857.ne.client2.attbi.com [65.96.12.59]
87
 
 
88
 
# CPE0004e2372711-CM000a73666706.cpe.net.cable.rogers.com
89
 
# CPE00e0184f0eba-CM014490118324.cpe.net.cable.rogers.com [24.43.109.140]
90
 
header HELO_DYNAMIC_ROGERS X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=CPE\d+\S+\.rogers\.com[^\]]+ auth= /i
91
 
describe HELO_DYNAMIC_ROGERS Relay HELO'd using suspicious hostname (Rogers)
92
 
 
93
 
# pD9E4F89F.dip.t-dialin.net [217.228.248.159]
94
 
header HELO_DYNAMIC_DIALIN X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=[a-z][A-F0-9]+\.dip\./
95
 
describe HELO_DYNAMIC_DIALIN Relay HELO'd using suspicious hostname (T-Dialin)
96
 
 
97
 
# 0xd5aaf40b.dhcp.kabelnettet.dk
98
 
# 0x50a46949.virnxx11.adsl-dhcp.tele.dk
99
 
header HELO_DYNAMIC_HEXIP X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=0x[a-f0-9]{8}\./
100
 
describe HELO_DYNAMIC_HEXIP Relay HELO'd using suspicious hostname (Hex IP)
101
 
 
102
 
# 118.Red-80-35-201.pooles.rima-tde.net
103
 
header HELO_DYNAMIC_SPLIT_IP X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=\d+\.\S+\d+[^\d\s]\d+[^\d\s]\d+[^\d\s]/
104
 
describe HELO_DYNAMIC_SPLIT_IP Relay HELO'd using suspicious hostname (Split IP)
105
 
 
106
 
# YahooBB219173000034.bbtec.net [219.173.0.34]
107
 
 
108
 
header HELO_DYNAMIC_IPADDR2 X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=\d+[^\d\s]\d+[^\d\s]\d+[^\d\s]\d+[^\d\s][^\.]*\.\S+\.\S+[^\]]+ auth= /i
109
 
describe HELO_DYNAMIC_IPADDR2 Relay HELO'd using suspicious hostname (IP addr 2)
110
 
 
111
 
# h234n2fls32o895.telia.com [217.208.73.234]
112
 
# h53n2fls32o828.telia.com
113
 
# h116n2fls32o1111.telia.com
114
 
# h29n1fls306o1003.telia.com
115
 
 
116
 
# CM-vina5-168-207.cm.vtr.net [200.104.168.207]
117
 
# CM-anto1-98-153.cm.vtr.net [200.104.98.153]
118
 
 
119
 
# ec9z5l.cm.chello.no
120
 
 
121
 
# g225174.upc-g.chello.nl
122
 
# a151145.upc-a.chello.nl
123
 
# a96134.upc-a.chello.nl
124
 
header HELO_DYNAMIC_CHELLO_NL  X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=[a-z]\d+\.upc-[a-z]\.chello\.nl[^\]]+ auth= /i
125
 
describe HELO_DYNAMIC_CHELLO_NL Relay HELO'd using suspicious hostname (Chello.nl)
126
 
 
127
 
# cp160000-a.mill1.nb.home.nl
128
 
# cp341468-b.venra1.lb.home.nl
129
 
header HELO_DYNAMIC_HOME_NL  X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=[a-z]{2}\d+-\S\.\S+\d\.[a-z]{2}\.home\.nl[^]]+ auth= /i
130
 
describe HELO_DYNAMIC_HOME_NL Relay HELO'd using suspicious hostname (Home.nl)
131
 
 
132
 
###########################################################################
133
 
 
134
 
ifplugin Mail::SpamAssassin::Plugin::RelayEval
135
 
 
136
 
header FAKE_HELO_MSN            eval:check_for_rdns_helo_mismatch("msn\.com","msn\.com")
137
 
describe FAKE_HELO_MSN          Host HELO did not match rDNS: msn.com
138
 
header FAKE_HELO_MAIL_COM       eval:check_for_rdns_helo_mismatch("mail\.com","mail\.com")
139
 
describe FAKE_HELO_MAIL_COM     Host HELO did not match rDNS: mail.com
140
 
header FAKE_HELO_EMAIL_COM      eval:check_for_rdns_helo_mismatch("email\.com","email\.com")
141
 
describe FAKE_HELO_EMAIL_COM    Host HELO did not match rDNS: email.com
142
 
header FAKE_HELO_EXCITE         eval:check_for_rdns_helo_mismatch("excite\S*","excite\.com")
143
 
describe FAKE_HELO_EXCITE       Host HELO did not match rDNS: excite.com
144
 
header FAKE_HELO_LYCOS          eval:check_for_rdns_helo_mismatch("lycos\S*","lycos\.com")
145
 
describe FAKE_HELO_LYCOS        Host HELO did not match rDNS: lycos.com
146
 
header FAKE_HELO_YAHOO_CA       eval:check_for_rdns_helo_mismatch("yahoo\.ca","yahoo\.ca")
147
 
describe FAKE_HELO_YAHOO_CA     Host HELO did not match rDNS: yahoo.ca
148
 
 
149
 
endif