Announcement

Collapse
No announcement yet.

Email Notifications Not Sending

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Email Notifications Not Sending

    I have checked the logs to why I am not receiving email's when a host is down. This is what is recorded.

    Attempting to execute the command "/usr/bin/printf "%b" "***** Oreon *****\n\nNotification Type: PROBLEM\n\nService: \nHost: Host\nAddress: IP Address\nState: \nDate/Time: $DATETIME$\n\nAdditional Info:\n\n$OUTPUT$" | /usr/bin -s "** PROBLEM alert - Host/ is **" email " resulted in a return code of 126. Make sure the script or binary you are trying to execute actually exists...

    I have checked the /usr/bin folder and the script printf does exist.

  • #2
    and binary mail or sendmail ?? :wink:

    edit : check that the path specified in oreon for mail is the good one
    windows XP pro
    VM

    Comment


    • #3
      Binary or Sendmail??

      Currently using sendmail which is configured to relay through a mail server. Using webmin, I can send emails without a problem on the internal network and external network.

      Comment


      • #4
        Re: Email Notifications Not Sending

        "/usr/bin/printf "%b" "***** Oreon *****\n\nNotification Type: PROBLEM\n\nService: \nHost: Host\nAddress: IP Address\nState: \nDate/Time: $DATETIME$\n\nAdditional Info:\n\n$OUTPUT$" | /usr/bin -s "** PROBLEM alert - Host/ is **" email "

        would be better

        "/usr/bin/printf "%b" "***** Oreon *****\n\nNotification Type: PROBLEM\n\nService: \nHost: Host\nAddress: IP Address\nState: \nDate/Time: $DATETIME$\n\nAdditional Info:\n\n$OUTPUT$" | /usr/bin/email -s "** PROBLEM alert - Host/ is **" "
        Intel(R) Xeon(TM) CPU 3.4GHz - MemTotal : 1034476 kB
        Centreon 2.4.1 - Nagios 3.2.1 - Nagios Plugins 1.4.15 - Manubulon Plugins tuné
        Fedora Core 5 - 2.6.20-1.2320

        Comment


        • #5
          Mail Command

          Looking through my /usr/bin directory, I don't have the email command. I looked in the /usr/sbin folder and have sendmail. Could I substitue the email -s command for sendmail?

          Comment


          • #6
            on my distrib the command is 'mail'

            i ll give you 'email' because you seem to broke your command line and on it i had show 'email'
            Intel(R) Xeon(TM) CPU 3.4GHz - MemTotal : 1034476 kB
            Centreon 2.4.1 - Nagios 3.2.1 - Nagios Plugins 1.4.15 - Manubulon Plugins tuné
            Fedora Core 5 - 2.6.20-1.2320

            Comment


            • #7
              Mail Logs

              I have checked my mail logs after sending email's from the command line and this is what appear's.

              Sep 5 10:51:18 sysmon sm-msp-queue[17716]: k852DUdJ016986: [email protected], ctladdr=root (0/0), delay=00:37:48, xdelay=00:00:00, mailer=relay, pri=750066, relay=[127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1].

              I have configured sendmail from webmin to use a different mail server and it can send email's without a problem

              Comment


              • #8
                I think i got your fix

                Im running Ubuntu 6.10 and using oreon to install rrdtools it never configured it properly so to fix that i installed the package(and the package was the updated one) then for the mail binary i figured out you need the mailx package so forme i just ran

                sudo aptitude install mailx

                after you do so check your /usr/bin dir for the mail binary and it should be there.

                Comment

                Working...
                X