[Xymon] Xymon notifcations disappear due to base64 encoding

Scott Pfister icepickjazz at gmail.com
Fri Feb 6 17:39:01 CET 2015


We have had that problem for a  long time and tried a similar method as
Ribeiro to strip out charactes but endup using mutt instead.  Since then
haven't had any issues:

#MAILC="mail"
MAILC="/usr/local/bin/mutt"





On Thu, Feb 5, 2015 at 11:23 AM, Ribeiro, Glauber <
glauber.ribeiro at experian.com> wrote:

> More details:
>
> In xymonserver.cfg, I have
>
> #MAILC="mail"
> MAILC="/usr/local/hobbit/server/mail_nocr.sh"    # Command used to send an
> e-mail with no subject
> MAIL="$MAILC -s"                                # Command used to send an
> e-mail with a subject
>
> The mail_nocr.sh script is like this:
>
> #! /bin/bash
> # 20130104 - glauber - get rid of CR in emails
> exec /usr/bin/tr -d '\015' | /bin/mail "$@"
>
>
> That's all, folks!
>
>
> The occasional CR in the emails not only mess up the SMS gateways, they
> also make Exchange turn a simple message into an email with a binary
> attachment.
>
> g
>
>
> -----Original Message-----
> From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Ribeiro, Glauber
> Sent: Thursday, February 05, 2015 09:37
> To: Benjamin Smith; xymon at xymon.com
> Subject: Re: [Xymon] Xymon notifcations disappear due to base64 encoding
>
> I've always had this problem. I ended up setting the mail client in xymon
> server (via the configuration file) to be a script that pipes the messages
> through tr to delete the CRs, then pipes then to mail.
>
> g
>
> -----Original Message-----
> From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Benjamin Smith
> Sent: Wednesday, February 04, 2015 19:06
> To: xymon at xymon.com
> Subject: [Xymon] Xymon notifcations disappear due to base64 encoding
>
> This morning, one of our servers was down and we (the admins) didn't
> immediately know because of a long chain of events. After spending the
> morning
> drilling down step by step, the issue was that Verizon's SMS email gateway
> doesn't accept base64 encoded messages, and the message being sent was
> base64
> encoded because of <CR> (aka "\r" or ASCII 13) in the message.
>
> We could reproduce this issue with the following PHP script used at the
> command line as a Verizon customer. I don't know if this is a recent
> change at
> Verizon, and don't really have a way to find out.
>
>
> // GENERAL ENVIRONMENT
> CentOS 6, recently updated.
> Postfix is the MTA
> PHP5
>
>
> // THIS WON'T WORK Note the "\r" that causes postfix to base64 encode the
> message.
> file.php's contents, 1 line:
> <?php  echo "Test of bad message\r\n"; ?>
> $ php file.php | mail -s test yournumber at vtext.php
>
>
> // THIS WORKS FINE, Note the lack of "\r", postfix sends this as
> text/plain, 7
> bit encoding.
> file.php's contents, 1 line:
> <?php  echo "Test of bad message\n"; ?>
> $ php file.php | mail -s test yournumber at vtext.php
>
>
>
> We've wasted time playing with a wrapper for the mail command that would
> strip
> out the "\r" in the alerts but this has, so far, proven fruitless. Messages
> sent via the Sprint SMS gateway go through just fine. Wondering if anybody
> else
> has seen this issue, or has any idea what the best way to handle it might
> be?
>
> Thanks,
>
> Ben
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20150206/b1454dec/attachment.html>


More information about the Xymon mailing list