PDA

View Full Version : Email Notifications Not Sending


nolim8ts
08-30-2006, 10:27 AM
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.

kyo
08-30-2006, 10:33 AM
and binary mail or sendmail ?? :wink:

edit : check that the path specified in oreon for mail is the good one

nolim8ts
08-30-2006, 03:19 PM
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.

DonKiShoot
08-30-2006, 03:46 PM
"/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 **" "

nolim8ts
08-31-2006, 03:24 AM
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?

DonKiShoot
08-31-2006, 12:13 PM
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'

nolim8ts
09-05-2006, 05:49 AM
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: to=email@email, 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

stanner
11-22-2006, 09:52 PM
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.