Learn about Centmin Mod LEMP Stack today
Become a Member

Beta Branch Oddity in lfd mailer

Discussion in 'Beta release code' started by Colin, Sep 16, 2020 at 9:05 PM.

  1. Colin

    Colin Premium Member Premium Member

    153
    44
    28
    Oct 7, 2015
    Sheffield UK
    Ratings:
    +117
    Local Time:
    1:12 PM
    1.13.#
    MariaDB 10.1.#
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • When was last time updated Centmin Mod code base ? : daily
    • Persistent Config:
      Code (Text):
      # Custom config
      AUTO_GITUPDATE='y'
      MENUEXIT_ALWAYS_YUMCHECK='y'
      MEMCACHED_DISABLED='n'        # when set to ='y' Memcached server disabled by default via chkconfig off
      PHP_DISABLED='n'              # when set to ='y' PHP-FPM disabled by default with chkconfig off
      MYSQLSERVICE_DISABLED='y'     # when set to ='y' MariaDB MySQL service disabled by default with chkconfig off
      PUREFTPD_DISABLED='n'
      PHP_PGO='y'                   # Profile Guided Optimization https://software.intel.com/en-us/blogs/2015/10/09/pgo-let-it-go-php
      PHP_PGO_ALWAYS='y'
      NGINX_PAGESPEED='y'
      MARCH_TARGETNATIVE='n'
      


      I've spun a new test server up on upcloud. While compiling php; which is hammering the cpu, I'm getting the expected lfd load alert.
    However I'm also getting a mail failure for
    Code:
    -r@hostname.domain
    where hostname and domain are valid. I do get one for the alert to my main mail.

    The LF_ALERT_TO = is set to my email address.

    It's the -r bit that's foxing me. I've checked .forward and other places where email might be set, I've grepped for -r in case I have botched exiting vim somewhere.

    It's not the end of the world, just confusing as :)

    Any thoughts?
     
  2. eva2000

    eva2000 Administrator Staff Member

    45,155
    10,272
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,919
    Local Time:
    10:12 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Is this a separate email from lfd high cpu alert or the same email ? If it's separate, what's the email subject name/title ?
     
  3. Colin

    Colin Premium Member Premium Member

    153
    44
    28
    Oct 7, 2015
    Sheffield UK
    Ratings:
    +117
    Local Time:
    1:12 PM
    1.13.#
    MariaDB 10.1.#
    It's this one:
    Code:
    Subject: lfd on hostname.domain.tld Centmin Mod Extended Load
    Code:
    Final-Recipient: rfc822; -r@hostname.domain.tld
    Original-Recipient: rfc822; -r
    Action: failed
    Status: 5.1.3
    Diagnostic-Code: X-Postfix; bad address syntax
    All normal lfd mails, login etc are fine.
     
  4. eva2000

    eva2000 Administrator Staff Member

    45,155
    10,272
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,919
    Local Time:
    10:12 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Ah that email subject title is for Centmin Mod's csf_loadalert function which configures /etc/csf/csf.conf setting for PT_LOAD_ACTION to call /etc/csf/load.sh script when cpu load average is greater than the number of cpu threads you have on the server and sends additional server info from cminfo top and cminfo netstat commands which are defined in /etc/csf/csf.report. Looks like a found an additional bug in that /etc/csf/csf.report isn't properly emptied after each run (so will fix that).

    contents of /etc/csf/load.sh is taken from /usr/local/src/centminmod/config/csf/load.sh - see centminmod/centminmod

    The load.sh script defines a from email with -r populated by variable $CHECK_LFEMAIL which is populated via command
    Code (Text):
    awk -F '=' '/LF_ALERT_TO/ {print $2}' /etc/csf/csf.conf | sed -e 's|\"||g' -e 's|\s||'

    what's output for that command for you ?