Page 1 of 1

Service level alerts in junk mail without any content

Posted: Thu Aug 22, 2019 9:36 pm
by vipulaeris
Hi Team,
please help me to resolve my problem. here are the steps
1. I have Nagios core 4.4.3.
2. Installed and confiured postfix with aws ses
3. Custom host level alerts are landing in inbox with all the contents
4. But whenever i generate service level custom alerts or real alerts by nagios it always land in junk mail and all the contents are getting blocked.
here are my service level and custom level command

notify-host-by-email
/usr/bin/printf "%b" "From: GCP Nagios AB-DEV <[email protected]>\nTo:$CONTACTEMAIL$\nSubject: GCP Nagios Alert: $NOTIFICATIONTYPE$ $HOSTALIAS$ is $HOSTSTATE$ \n*****GCP Nagios Dev*****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/sbin/sendmail -tf "[email protected]"

notify-service-by-email /usr/bin/printf "%b" "From: GCP Nagios AB-Dev <[email protected]>\nSubject: GCP Nagios Alert: $NOTIFICATIONTYPE$ $HOSTALIAS$ is $SERVICESTATE$ \n*****GCP Nagios Dev*****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | /usr/sbin/sendmail -f "[email protected]" $CONTACTEMAIL$

Re: Service level alerts in junk mail without any content

Posted: Fri Aug 23, 2019 10:45 am
by bheden
The first thing that stands out is the missing -t in the service notification. Seems like a minor detail, but SMTP can be a pain sometimes.

Try that first and let us know.

Re: Service level alerts in junk mail without any content

Posted: Mon Aug 26, 2019 1:56 pm
by mbellerue
Hi vipulaeris,

Were you able to try out the -t option that was mentioned? Did it work for you?