sendmail –O LogLevel=14 –bs -Am
if sendmail is running via xinetd then add the line –O LogLevel=14 to server_args in /etc/xinetd.d/sendmail and reload/restart xinetd
this can help to catch spammers.
Just another WordPress site
sendmail –O LogLevel=14 –bs -Am
if sendmail is running via xinetd then add the line –O LogLevel=14 to server_args in /etc/xinetd.d/sendmail and reload/restart xinetd
this can help to catch spammers.
As root:
Optional: if there is no custombuild folder use this:
======================================
cd /usr/local/directadmin
wget http://files.directadmin.com/services/custombuild/1.2/custombuild.tar.gz
tar xvzf custombuild.tar.gz
cd custombuild
======================================
normal upgrade way (for debian install: libpcre3-dev libdb4.3-dev libperl-dev libsasl2-dev and skip the yum line)
======================================
cd /usr/local/directadmin/custombuild
yum -y install db4-devel cyrus-sasl-devel
./build update
./build update_script
./build set exim yes
./build clean
./build pcre
./build exim
=====================================
if first set is not working, use this one:
===============================================================
cd /usr/local/directadmin/custombuild
./build set custombuild 1.2
./build set exim yes
./build update
./build update_script
./build update_data
./build clean
./build exim
./build set custombuild 1.1
===============================================================
[How To] How to test Spamassassin
Resolution
To test Spamassassin it is necessary to send a test mail containing the following string of characters (in upper case and with no white spaces and line breaks):
XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X
Note: Test mail must be sent from an account outside of your network.
Additional information
Please see more information about Spamassassin here: http://spamassassin.apache.org/gtube
SELECT mail.id, mail.mail_name, domains.name, accounts.password, mail.postbox, mail.mbox_quota, mail.redirect, mail.redir_addr, mail_group, mail.autoresponder FROM mail, accounts, domains WHERE mail.account_id = accounts.id AND mail.dom_id = domains.id AND domains.name = ‘domain.tld’;
You may check first what is the path of sendmail:
whereis sendmail
or php -i | grep sendmail
move /usr/sbin/sendmail
to something like /usr/sbin/sendmail.or
vi /usr/sbin/sendmail
put the code below:
#!/usr/bin/perl
# use strict;
use Env;
my $date = `date`;
chomp $date;
open (INFO, ">>/var/log/formmail.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 - @info\n";
}
my $mailprog = '/usr/sbin/sendmail.or';
foreach (@ARGV) {
$arg="$arg" . " $_";
}
open (MAIL,"|$mailprog $arg") || die "cannot open $mailprog: $!\n";
while (<STDIN> ) {
print MAIL;
}
close (INFO);
close (MAIL);
chmod a+x /usr/sbin/sendmail
touch /var/log/formmail.log
and chmod 777 /var/log/formmail.log
that should be all.
http://www.linuxscrew.com/2009/12/21/best-of-linux-cheat-sheets/