CSF’s Login Failure Daemon, or LFD, can email alerts to a configured address. This guide changes that destination from an SSH session so alerts reach the person responsible for the server.

Update the destination

You need administrator access to a server with CSF and LFD installed. Keep the existing SSH session and a recovery route available when reloading firewall software.

  1. Back up the configuration:

    sudo cp -p /etc/csf/csf.conf /etc/csf/csf.conf.before-alert-change
  2. Open it in a text editor:

    sudo nano /etc/csf/csf.conf
  3. Find the existing LF_ALERT_TO setting and edit its value:

    LF_ALERT_TO = "[email protected]"
  4. Replace the example address with the intended monitored mailbox. Do not add a second copy of the setting.

  5. Save the file.

  6. Reload CSF and restart LFD to read the updated configuration:

    sudo csf -r
    sudo systemctl restart lfd
    sudo systemctl status lfd

The systemd command applies to installations using an lfd service. Use the installed version’s supported service command otherwise.

Verify delivery

Check LFD’s logs and normal alert delivery to the new mailbox. Confirm that the server’s mail delivery works and investigate queue or spam-filter problems if alerts do not arrive.

Do not deliberately trigger repeated failed logins to test the address: that can block your own access. LF_ALERT_FROM controls the sender and does not need to change merely because the recipient changed.