[Xymon] Getting "ATT0001.bin" attachments sometimes -- MAILC fix is already in place

Ribeiro, Glauber glauber.ribeiro at experian.com
Wed Aug 12 22:18:06 CEST 2015


I just saw that you used single quotes and double escapes

tr -d '\\001\\004\\015'

I think you need

tr -d '\001\004\015' or
tr -d "\\001\\004\\015"

(and restart xymon after making the change)

g

-----Original Message-----
From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Ribeiro, Glauber
Sent: Wednesday, August 12, 2015 15:13
To: Shawn Heisey; xymon at xymon.com
Subject: Re: [Xymon] Getting "ATT0001.bin" attachments sometimes -- MAILC fix is already in place

Sorry, I made 2 mistakes

1) MAILC is the parameter you want to override, not MAIL
2) I didn't read your email well enough to see that you have already tried something similar.

What you did should have worked. Make sure you are modifying the configuration file that is actually being used. Also, if you haven't yet, you would have to restart xymon server to pick up that configuration change.

g


-----Original Message-----
From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Ribeiro, Glauber
Sent: Wednesday, August 12, 2015 14:46
To: Shawn Heisey; xymon at xymon.com
Subject: Re: [Xymon] Getting "ATT0001.bin" attachments sometimes -- MAILC fix is already in place

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
_______________________________________________
Xymon mailing list
Xymon at xymon.com
http://lists.xymon.com/mailman/listinfo/xymon
_______________________________________________
Xymon mailing list
Xymon at xymon.com
http://lists.xymon.com/mailman/listinfo/xymon


More information about the Xymon mailing list