[Xymon] Xymon notifcations disappear due to base64 encoding

Benjamin Smith lists at benjamindsmith.com
Thu Feb 5 02:05:47 CET 2015


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 



More information about the Xymon mailing list