sendmail blackhole
"gulikoza" <[email protected]> Sun, 28 Dec 2014 16:28:51 +0100
| Newsgroups | gmane.comp.log.logwatch.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
Since sendmail seems to be on the spot, would it be possible to modify
blackhole regex not to search for the third / at the end of the url.
My sendmail only prints sitename ("- see http://www.spamcop.net") not the
full lookup url ("http://spamcop.net/bl.shtml?70.68.8.182"). Perhaps
something like (match [\/\n] instead on \/):
--- sendmail.org 2014-12-28 16:08:30.472681423 +0100
+++ sendmail 2014-12-28 16:18:28.294860546 +0100
@@ -823,18 +823,18 @@
$Temp = "From " . $1 . " by " . $2;
$BlackHoled{$Temp}++;
$BlackHoles{$2}++;
- } elsif ( ($Relay,$BlSite) = ($ThisLine =~
/^ruleset=(?:check_relay|check_rcpt), arg1=[^,]*,(?: arg2=[^,]*,)?
relay=([^,]*), reject=55\d\s*[\d.]*\s*.*http:\/\/([^\/]*)\//) ) {
+ } elsif ( ($Relay,$BlSite) = ($ThisLine =~
/^ruleset=(?:check_relay|check_rcpt), arg1=[^,]*,(?: arg2=[^,]*,)?
relay=([^,]*), reject=55\d\s*[\d.]*\s*.*http:\/\/([^\/]*)[\/\n]/) ) {
$Temp = "From " . $Relay . " by " . $BlSite;
$BlackHoled{$Temp}++;
$BlackHoles{$BlSite}++;
- } elsif ( ($Relay,$BlSite) = ($ThisLine =~
/^ruleset=(?:check_relay|check_rcpt), arg1=([^,]*),(?: arg2=[^,]*,)?
reject=55\d\s*[\d.]*\s*.*http:\/\/([^\/]*)\//) ) {
+ } elsif ( ($Relay,$BlSite) = ($ThisLine =~
/^ruleset=(?:check_relay|check_rcpt), arg1=([^,]*),(?: arg2=[^,]*,)?
reject=55\d\s*[\d.]*\s*.*http:\/\/([^\/]*)[\/\n]/) ) {
#Example 553 error with NO RELAY -mgt
#ruleset=check_relay, arg1=s010600402b39ee29.vf.shawcable.net,
arg2=127.0.0.2, reject=553 5.3.0
#Spam blocked see: http://spamcop.net/bl.shtml?70.68.8.182: 1 Time(s)
$Temp = "From " . $Relay . " by " . $BlSite;
$BlackHoled{$Temp}++;
$BlackHoles{$BlSite}++;
- } elsif ( ($Relay,$BlSite) = ($ThisLine =~ /reject=553\s*[\d.]*\s*<[^
]*>\.\.\. +Mail from ([\d\.]+) rejected\;see http:\/\/([^\/]*)\//) ) {
+ } elsif ( ($Relay,$BlSite) = ($ThisLine =~ /reject=553\s*[\d.]*\s*<[^
]*>\.\.\. +Mail from ([\d\.]+) rejected\;see http:\/\/([^\/]*)[\/\n]/) ) {
#This is the another blackhole tag -mgt
$Temp = "From " . $Relay . " by " . $BlSite;
$BlackHoled{$Temp}++;
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net