- Timestamp:
- 11/06/09 10:45:33 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dnsbl/extract-data
r8 r9 132 132 # now, get the relay IP 133 133 134 my $stmsg = $status->get_message(); 135 my @untrusted = @{$stmsg->{metadata}->{relays_untrusted}}; 136 137 my $sa_intip = new NetAddr::IP $untrusted[0]->{ip}; 138 139 134 140 my %headerlist = %{$imap->parse_headers($msgs[$i], "Received")}; 135 141 my $recvnum = 0; … … 171 177 #Received: from source ([208.95.48.65]) (using TLSv1) by 172 178 # exprod5mx230.postini.com ([64.18.4.10]) with SMTP; Fri, 10 Jul 173 my ($tmprelayip) = ($recv =~ /from source \(\[([\d.]+)\]\) (?:\(using TLSv1\) )?by exprod\dm[xo]b?\d+\.postini\.com/);179 my ($tmprelayip) = ($recv =~ /from source \(\[([\d.]+)\]\) (?:\(using TLSv1\) )?by (?:exprod\dm[xo]b?|chipmx)\d+\.postini\.com/); 174 180 $relayip = new NetAddr::IP $tmprelayip; 175 181 } else { … … 177 183 $relayip = new NetAddr::IP $tmprelayip; 178 184 } 185 186 print "SA vs manual extraction, relay IP mismatch: $sa_intip vs $relayip on\n\t$recv\n" if $sa_intip != $relayip; 179 187 180 188 # Hotmail/Windows Live Mail may originate or relay spam, but we can't blacklist them … … 249 257 my $yahoo13 = new NetAddr::IP "209.191.64.0/18"; 250 258 next if $relayip->within($yahoo13); 259 #route: 212.82.104.0/21 260 my $yahoo14 = new NetAddr::IP "212.82.104.0/21"; 261 next if $relayip->within($yahoo14); 251 262 252 263 # and the same goes for Bell Canada. *le sigh* … … 270 281 next if $relayip->within($craigslist1); 271 282 283 # not gonna whitelist the whole enchilada... just the asmtpout0(11-30).mac.com 284 # 17.148.16 011 -> 86 030 -> 105 285 #IP-Network 17.0.0.0/8 286 #IP-Network-Block 017.000.000.000 - 017.255.255.255 287 #Org-Name Apple Computer, Inc. 288 my $apple1 = new NetAddr::IP "17.148.16.64/26"; 289 next if $relayip->within($apple1); 290 272 291 $iplist{$relayip->addr}++ if $relayip; 273 292 # print "$recv\n"; … … 297 316 } 298 317 foreach my $uri (sort keys %urilist) { 299 my @hout = qx { host $uri.multi.uribl.com; host $uri.uribl.company.com};318 my @hout = qx { host '$uri.multi.uribl.com'; host '$uri.uribl.company.com' }; 300 319 if ($hout[0] =~ /NXDOMAIN/ && $hout[1] =~ /NXDOMAIN/) { 301 320 if ($opts{u}) {
Note:
See TracChangeset
for help on using the changeset viewer.