<div dir="ltr">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:<br><br>#MAILC="mail"<br>MAILC="/usr/local/bin/mutt"<br><br><br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 5, 2015 at 11:23 AM, Ribeiro, Glauber <span dir="ltr"><<a href="mailto:glauber.ribeiro@experian.com" target="_blank">glauber.ribeiro@experian.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">More details:<br>
<br>
In xymonserver.cfg, I have<br>
<br>
#MAILC="mail"<br>
MAILC="/usr/local/hobbit/server/mail_nocr.sh"    # Command used to send an e-mail with no subject<br>
MAIL="$MAILC -s"                                # Command used to send an e-mail with a subject<br>
<br>
The mail_nocr.sh script is like this:<br>
<br>
#! /bin/bash<br>
# 20130104 - glauber - get rid of CR in emails<br>
exec /usr/bin/tr -d '\015' | /bin/mail "$@"<br>
<br>
<br>
That's all, folks!<br>
<br>
<br>
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.<br>
<span class="HOEnZb"><font color="#888888"><br>
g<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
-----Original Message-----<br>
From: Xymon [mailto:<a href="mailto:xymon-bounces@xymon.com">xymon-bounces@xymon.com</a>] On Behalf Of Ribeiro, Glauber<br>
Sent: Thursday, February 05, 2015 09:37<br>
To: Benjamin Smith; <a href="mailto:xymon@xymon.com">xymon@xymon.com</a><br>
Subject: Re: [Xymon] Xymon notifcations disappear due to base64 encoding<br>
<br>
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.<br>
<br>
g<br>
<br>
-----Original Message-----<br>
From: Xymon [mailto:<a href="mailto:xymon-bounces@xymon.com">xymon-bounces@xymon.com</a>] On Behalf Of Benjamin Smith<br>
Sent: Wednesday, February 04, 2015 19:06<br>
To: <a href="mailto:xymon@xymon.com">xymon@xymon.com</a><br>
Subject: [Xymon] Xymon notifcations disappear due to base64 encoding<br>
<br>
This morning, one of our servers was down and we (the admins) didn't<br>
immediately know because of a long chain of events. After spending the morning<br>
drilling down step by step, the issue was that Verizon's SMS email gateway<br>
doesn't accept base64 encoded messages, and the message being sent was base64<br>
encoded because of <CR> (aka "\r" or ASCII 13) in the message.<br>
<br>
We could reproduce this issue with the following PHP script used at the<br>
command line as a Verizon customer. I don't know if this is a recent change at<br>
Verizon, and don't really have a way to find out.<br>
<br>
<br>
// GENERAL ENVIRONMENT<br>
CentOS 6, recently updated.<br>
Postfix is the MTA<br>
PHP5<br>
<br>
<br>
// THIS WON'T WORK Note the "\r" that causes postfix to base64 encode the<br>
message.<br>
file.php's contents, 1 line:<br>
<?php  echo "Test of bad message\r\n"; ?><br>
$ php file.php | mail -s test yournumber@vtext.php<br>
<br>
<br>
// THIS WORKS FINE, Note the lack of "\r", postfix sends this as text/plain, 7<br>
bit encoding.<br>
file.php's contents, 1 line:<br>
<?php  echo "Test of bad message\n"; ?><br>
$ php file.php | mail -s test yournumber@vtext.php<br>
<br>
<br>
<br>
We've wasted time playing with a wrapper for the mail command that would strip<br>
out the "\r" in the alerts but this has, so far, proven fruitless. Messages<br>
sent via the Sprint SMS gateway go through just fine. Wondering if anybody else<br>
has seen this issue, or has any idea what the best way to handle it might be?<br>
<br>
Thanks,<br>
<br>
Ben<br>
_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
</div></div></blockquote></div><br></div>