SOLVED -LOCALRELAY Alert for useraccount email SPAM

0

The solution below will help you solve the problem of spam from your server. You normally get alert email messges  suc as this  –lfd on <serverurl>: LOCALRELAY Alert for <useraccount>  if you have CSF Firwall installed on your server. I had this problem for months. I removed all plugins, changed theme, and infact i even reinstall the wordpress and yet the spam email kept coming.In this article i am assuming that you have CSF firewall installed on your server to get this alert. if you don’t have csf installed then start from step 1 otherwise go to step 2 if you  have already installed the CSF firwall   on your server

Solution

STEP 1

Firstly ssh into your server and install CSF firewall. Follow the usual instructions below to install CSF Firewall:

mkdir /usr/local/src
cd /usr/local/src
wget http://www.configserver.com/free/csf.tgz
tar xfz csf.tgz
cd csf
./install.sh

On a cPanel based server, all the default settings are what you want, with 2 exceptions:

Open the configuration file in your favorite text editor (/etc/csf.conf) and change the following lines:

TESTING = “1” change to TESTING = “0”

 

STEP 2

myserver – WebHost Manager 2016-08-12 08-52-29NEXT:  you need to change 2 more lines, the SMTP_BLOCK and SMTP_ALLOWLOCAL to the following values:

SMTP_BLOCK = “1”

SMTP_ALLOWLOCAL = “0”

This will block outbound emails from anyone other than the mail server software, and prevent any unauthorized access to the mail daemon from local scripts.  Your web hosting clients, and web pages will still be able to send email like before .

 

STEP 3

 

(2) Navigate to WHM >> Main >> Tweak Settings >> Initial default/catch-all forwarder destination.
  //Set this setting to Bounce / Fail.
STEP 4
Stop open relay in cpanel
An Open relay is SMTP server which is configured in such a way, which allows a third party to send/receive emails that are neither from nor for local users. For that reason, such servers are usually targets for spam senders.
issue the following command to close it
/scripts/fixrelayd
/etc/init.d/exim restart

SOLVED -LOCALRELAY Alert for useraccount email SPAM

 

Share.

About Author

Comments are closed.