AS we know sending spam with large number not allow for almost server and data centers'
so that if a site Ip send any spam
the hosting or data center will close this site until paying an amount of many
to the hosting as a penalty in order to re open this site
to avoids this on ur server
this steps will close the spam :-
1) On the SSH write :
PHP Code:
pico /etc/exim.conf
search for :
PHP Code:
spamd_address = 127.0.0.1 783
above add :
PHP Code:
log_selector = +arguments +subject
so that totally became :
PHP Code:
log_selector = +arguments +subject
spamd_address = 127.0.0.1 783
and then execute these two instruction on SSH
PHP Code:
service exim restart
service cpanel restart
2) Install a (spamdconf ) from cpanel add-ons
3)From Tweak settings do the following:
1.The maximum each domain can send out per hour (0 is unlimited) Set it to number between (1 and 100 )
2.Check the following
- Prevent the user "nobody" from sending out mail to remote addresses (PHP and CGI scripts generally run as nobody if you are not using PHPSuexec and Suexec respectively.) ·
- SpamAssassin Spam Filter
- Horde Webmail
- Mailman
- SpamAssassin Spam Box delivery for messages marked as spam (user configurable)
- SquirrelMail Webmail
3.Un check the BoxTrapper Spam Trap
4) install a CSF on ur server
PHP Code:
wget http://www.configserver.com/free/csf.tgz
tar -zxvf csf.tgz
cd csf
sh install.sh
And Don’t forget to set LF_SCRIPT_ALERT = 1
On csf.conf file
5) cave the peril 744 permeation :
PHP Code:
chmod 755 /usr/bin/perl
6) Blocking spam through php script by using nobody:-
From SSH write
PHP Code:
service exim stop
and
PHP Code:
pico /usr/sbin/sendmail
Change the file contain with the following :
PHP Code:
#!/usr/local/bin/perl
# use strict;
use Env;
my $date = `date`;
chomp $date;
open (INFO, ">>/var/log/spam_log") || die "Failed to open file ::$!";
my $uid = $>;
my @info = getpwuid($uid);
if($REMOTE_ADDR) {
print INFO "$date - $REMOTE_ADDR ran $SCRIPT_NAME at $SERVER_NAME n";
}
else {
print INFO "$date - $PWD - @infon";
}
my $mailprog = '/usr/sbin/sendmail.hidden';
foreach (@ARGV) {
$arg="$arg" . " $_";
}
open (MAIL,"|$mailprog $arg") || die "cannot open $mailprog: $!n";
while (<STDIN> ) {
print MAIL;
}
close (INFO);
close (MAIL);
Then save the file sendmail And change its permissions by
PHP Code:
chmod +x /usr/sbin/sendmail
5) Create a log file to register ur customer trying in order to alert them:
PHP Code:
touch /var/log/spam_log
PHP Code:
chmod 0777 /var/log/spam_log
6) start the ( exim):
PHP Code:
service exim start
Or
PHP Code:
/etc/init.d/exim start
And don’t forget to keep updating the Apache and PHP to latest version
glade to help in any question
Bookmarks