Service level alerts in junk mail without any content

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
vipulaeris
Posts: 1
Joined: Thu Aug 22, 2019 9:28 pm

Service level alerts in junk mail without any content

Post 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 <nagios-gcp-dev@aeris.net>\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 "nagios-gcp-dev@aeris.net"

notify-service-by-email /usr/bin/printf "%b" "From: GCP Nagios AB-Dev <nagios-gcp-dev@aeris.net>\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 "nagios-gcp-dev@aeris.net" $CONTACTEMAIL$
bheden
Product Development Manager
Posts: 179
Joined: Thu Feb 13, 2014 9:50 am
Location: Nagios Enterprises

Re: Service level alerts in junk mail without any content

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Nagios Enterprises
Senior Developer
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Service level alerts in junk mail without any content

Post by mbellerue »

Hi vipulaeris,

Were you able to try out the -t option that was mentioned? Did it work for you?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked