Archive for the ‘email’ Category

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
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

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):


Note: Test mail must be sent from an account outside of your network.
Additional information

Please see more information about Spamassassin here:

SELECT, mail.mail_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 = AND mail.dom_id = AND = ‘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:

# 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);
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.