How to modify the email address for Csf/Lfd notifications from SSH

August 19, 2024 / How-to Guide

This article illustrates how to modify the CSF/LFD email address through SSH. It guarantees that important security warnings are sent to the right email, preserving server security and enabling timely replies.

Let us follow the steps:

  1. Log in to your server via SSH.
  2. Use a text editor to open the CSF configuration file, typically located at:
    /etc/csf/csf.conf
  3. Scroll through the file to find the email settings section, which includes options like:
     LF_ALERT_TO and LF_ALERT_FROM
  4. Locate the LF_ALERT_TO entry that lists the current notification email address, and replace it with your new email address (e.g., [email protected]).
  5. Save the changes to the configuration file.
  6. Restart CSF/LFD by entering the following in the terminal to apply the updates:
     csf -r
    
  7. Perform a test, such as triggering a failed login, to confirm that notifications are being sent to the new email address.
  8. Monitor your new email to ensure that CSF/LFD notifications are being received correctly.

By following these steps, you can successfully update the email address for CSF/LFD notifications on your server.