Opsview Knowledge Center

Email Notifications Converted to Unreadable Attachments

Learn how to resolve why your email notifications are being converted to unreadable attachments

By default the Opsview Monitor email notification profile uses a plugin called "notify_by_email". With most email servers you'll likely never run into any issues. However, if your email is being processed through an Exchange server at any point along its journey you may run into problems with the text being converted to a binary attachment. This can happen due to Exchange mistakenly reading the content of your email and believing that the way your email text is organized is actually some form of attachment. This is most common when you have service check results that include error messages starting with 0x.

To get around this there is another email notification script that you can use which is linked from this FAQ. It Base64 encodes the email content for you which prevents Exchange from converting the email content to an attachment. Follow the steps below to install this modified email notification method:

  1. Download the following notification plugin notify-by-email-base64.zip to the following directory /usr/local/nagios/libexec/notifications on your Opsview Monitor Master server
  2. Update the permissions to allow the script to be executed. E.g. chmod +x /usr/local/nagios/libexec/notifications/notify_by_email_base64. If required, install the needed dependencies to successfully execute the script. You can either use the packages provided with your distribution (recommended) or use CPAN. To install the packages:

    • Debian: apt-get install libmail-sender-perl
    • RedHat: yum install perl-mail-sender
  3. Test that the notification script works. You can do this by running the following as the nagios user:

    NAGIOS_CONTACTEMAIL=myemail@mydomain.com
    /usr/local/nagios/libexec/notifications/notify_by_email_base64
    

You should see similar output as noted below:

Now you just need to configure the notification method and profile within Opsview Monitor as outlined in the following articles:

Notification Methods
Notification Profiles

Email Notifications Converted to Unreadable Attachments

Learn how to resolve why your email notifications are being converted to unreadable attachments