You can check whether the mail() is working inside your server by creating a mail.php file inside your public_html directory.

—————————
<?php
$to = “recipient@example.com”;
$subject = “Hi!”;
$body = “Hi,nnHow are you?”;
if (mail($to, $subject, $body)) {
echo(“<p>Message successfully sent!</p>”);
} else {
echo(“<p>Message delivery failed…</p>”);
}
?>

Check if any php script is causing the mass mailing with
—————————
cd /var/spool/exim/input

egrep “X-PHP-Script” * -R
—————————

Following command will show path to the script being utilized to send mail
—————————
ps -C exim -fH eww
ps -C exim -fH eww | grep home

cd /var/spool/exim/input/
egrep “X-PHP-Script” * -R
—————————