i made a script thats mails me ip and useragent from each 301 error
sometimes i get 5 to 20 emails send by same user ip all in one second ...
is it posible to insert some block so sendmail can only send one email in a second?
is this posible can some one show me how
i used
print MAIL "--------------------------\n";
close (MAIL);
sleep 5;
the script is sleeping for 5 seconds ...
but the robot can still browser the site
and errors are still writen to log file ....
Is it posible to make the whole server sleep for few seconds? so the browser gives time out error or somthing or server not ecsist?
There are a few options you can do here:
1. you can just place the user agent in the robots.txt file and hope that it follows the robot rules. That will deny it from whatever paths you set.
2. you could use mod_rewrite to execute a perl script on 301 errors, log the UA to the robots.txt file and send an email. However, if it does not use robots.txt it won't work
Other options may be using hosts.allow/deny (but only if Apache is configured to look at those - it's not by default). Or add a DROP target for that IP to iptables (complex and needs sysadmin access if not root).
Probably option 2 is the best bet, but it does require some coding and will require some work with mod re_write.
Scott