That happens because the messages have CR+LF line terminations, or have at least a few lines that have CR in them; this is causing Unix to treat those as binary instead of text content. In our system, I created a script that runs tr to get rid of those
#! /bin/bash
20130104 - glauber - get rid of CR in emails
exec /usr/bin/tr -d '\015' | /bin/mail "$@"
Then I set the MAIL parameter in xymonserver.cfg to point to this script instead of the actual mail application.
It works beautifully.
g
-----Original Message----- From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Shawn Heisey Sent: Wednesday, August 12, 2015 13:58 To: xymon at xymon.com Subject: [Xymon] Getting "ATT0001.bin" attachments sometimes -- MAILC fix is already in place
Xymon server is version 0.1.4, the client in this instance is BBWin 0.13 on a Server 2012 R2 system.
Occasionally, I am seeing xymon alarms with ATT00001.bin attachments instead of an actual message.
I already googled this, and applied the MAILC fix that I found to xymonserver.cfg, but it's still happening sometimes. I discovered some other bad characters that needed to be removed, so my tr command is set up to remove three characters:
For the xymond_alert module
MAILC="/usr/bin/tr -d '\\001\\004\\015' | mail" # Command used to send an e-mail with no subject #MAILC="mutt -x" # Command used to send an e-mail with no subject MAIL="$MAILC -s" # Command used to send an e-mail with a subject
Looking in the attachment that I just received, I can see hex 0D characters (carriage returns, octal 015) ... but the "tr" command that I implemented should have removed them.
Either there's a bug, or I am missing something simple. Can anyone help? I have not yet tried upgrading Xymon to the latest version.
Thanks, Shawn
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon