[xmail] Re: auto block spammer

2005-11-22 Thread Chris L. Franklin

you might want to look into my anti-repeat-spammer filter. It's designed to 
do just that,  Block a repeat-spammer until the next day. 
http://xmail.nomadcf.com


-- Chris L. Franklin --



- Original Message - 
From: Helio Cavichiolo Jr [EMAIL PROTECTED]
To: xmail@xmailserver.org
Sent: Monday, November 21, 2005 8:31 PM
Subject: [xmail] Re: auto block spammer



Em Seg 21 Nov 2005 20:09, Sönke Ruempler escreveu:
 Not native in XMail. Just set up a SpamAssassin ;-)

I already have SpamAssassin installed, but it's not enought.
With this small script I caught 8 bad guys in 15 minutes. The script is 
called
by crontab every 5 minutes and every 23:59 (11:59 pm) I run the following
command to take them out of the punishment:
echo -n  /var/MailRoot/spammers.tab

Here goes the script:

#!/bin/sh

spammer() {
  if [ $2 -gt 30 ]; then
if [ ! `grep \^$1\/24\$\ /var/MailRoot/spammers.tab` ]; then
  echo $1/24  /var/MailRoot/spammers.tab
fi
  fi
}

tail -n 1000 /var/MailRoot/logs/smtp-`date +%Y%m%d` | \
sed 's///g' | cut -f3,4 | sort  /tmp/$$
while read ip datetime ; do
  if [ $ip = $lip ]; then
let n=$n+1
  else
if [ $lip ]; then
  spammer $lip $n
fi
n=1
lip=$ip
  fi
done  /tmp/$$
rm -f /tmp/$$
if [ $ip ]; then
  spammer $ip $n
fi
==
Just it!
Helio
-
To unsubscribe from this list: send the line unsubscribe xmail in
the body of a message to [EMAIL PROTECTED]
For general help: send the line help in the body of a message to
[EMAIL PROTECTED]





This email was scanned by the server at NomadCF.com, And has been deemed 
clean of invaild and or dangerous email attachment type and virus'.

Although this is by no means a guarantee.
 

-
To unsubscribe from this list: send the line unsubscribe xmail in
the body of a message to [EMAIL PROTECTED]
For general help: send the line help in the body of a message to
[EMAIL PROTECTED]



[xmail] Re: auto block spammer

2005-11-22 Thread Tom Banting
 In server.tab set:
SMTP-MaxErrors 2
This will stop dictionary attacks but it is not remembered after the
connection is dropped however it is sill quite effective. I wrote a program
to collect these attacks from the log file and add them to spammers.tab but
stopped using it because with a setting of 2 it was catching some legitimate
mail.

At 05:04 PM 21/11/2005, you wrote:

Is there a way to automatically block a sender IP address after he/she trie=
d=20
to deliver more than (for example)  10 consecutive messagens to email=20
addresses that doesn't exist on server in a given elapsed time?
I think it would be a good antispam tool.
It could also releases blocked IPs after a punishment time.

=2D-=20
Helio Cavichiolo Jr
Altecnet Inform=E1tica Ltda
(19) 8137-6822
-
To unsubscribe from this list: send the line unsubscribe xmail in
the body of a message to [EMAIL PROTECTED]
For general help: send the line help in the body of a message to
[EMAIL PROTECTED] 

Tom Banting Internet:   [EMAIL PROTECTED]
Telcom Research WEB:http://www.TelcomResearch.com
[1]Voice 1 (905) 336-2450Fax 1 (905) 336-1487 

--- Links ---
   1 http://www.TelcomResearch.com
-
To unsubscribe from this list: send the line unsubscribe xmail in
the body of a message to [EMAIL PROTECTED]
For general help: send the line help in the body of a message to
[EMAIL PROTECTED]



[xmail] Re: auto block spammer

2005-11-21 Thread Sönke Ruempler

On 21.11.2005 23:04, Helio Cavichiolo Jr wrote:

 Is there a way to automatically block a sender IP address after he/she tried 
 to deliver more than (for example)  10 consecutive messagens to email 
 addresses that doesn't exist on server in a given elapsed time?
 I think it would be a good antispam tool.
 It could also releases blocked IPs after a punishment time.

Not native in XMail. Just set up a SpamAssassin ;-)
-
To unsubscribe from this list: send the line unsubscribe xmail in
the body of a message to [EMAIL PROTECTED]
For general help: send the line help in the body of a message to
[EMAIL PROTECTED]



[xmail] Re: auto block spammer

2005-11-21 Thread Helio Cavichiolo Jr

Em Seg 21 Nov 2005 20:09, Sönke Ruempler escreveu:
 Not native in XMail. Just set up a SpamAssassin ;-)

I already have SpamAssassin installed, but it's not enought.
With this small script I caught 8 bad guys in 15 minutes. The script is called 
by crontab every 5 minutes and every 23:59 (11:59 pm) I run the following 
command to take them out of the punishment:
echo -n  /var/MailRoot/spammers.tab

Here goes the script:

#!/bin/sh

spammer() {
  if [ $2 -gt 30 ]; then
if [ ! `grep \^$1\/24\$\ /var/MailRoot/spammers.tab` ]; then
  echo $1/24  /var/MailRoot/spammers.tab
fi
  fi
}

tail -n 1000 /var/MailRoot/logs/smtp-`date +%Y%m%d` | \
sed 's///g' | cut -f3,4 | sort  /tmp/$$
while read ip datetime ; do
  if [ $ip = $lip ]; then
let n=$n+1
  else
if [ $lip ]; then
  spammer $lip $n
fi
n=1
lip=$ip
  fi
done  /tmp/$$
rm -f /tmp/$$
if [ $ip ]; then
  spammer $ip $n
fi
==
Just it!
Helio
-
To unsubscribe from this list: send the line unsubscribe xmail in
the body of a message to [EMAIL PROTECTED]
For general help: send the line help in the body of a message to
[EMAIL PROTECTED]