<div dir="ltr"><div class="gmail_extra">On 14 August 2013 22:36, Dirk Kastens <span dir="ltr"><<a href="mailto:dirk.kastens@uni-osnabrueck.de" target="_blank">dirk.kastens@uni-osnabrueck.de</a>></span> wrote:<br><div class="gmail_quote">


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">OK, but this would only work with an external script. We use MAIL with FORMAT=sms. Meanwhile we have shortened the URL that is tested by xymon. Now we are below the 160 character limit.</blockquote>


</div><br>You could change from MAIL to SCRIPT, and have the script call $MAIL for you, after shortening URLs or whatever you wanted.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Or you could redefine MAIL (in xymonserver.cfg) to do a similar thing.  The example below will remove the first URL it finds, plus anything after the first 160 chars of what's left, and finally it will ensure that the last character is a newline (as some MTAs or MUAs might expect this to be the case):</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">MAILC="/usr/bin/sed 's,https://[^ ]* ,,' | /bin/dd bs=1 count=160 2>/dev/null | /usr/bin/sed '$s/.$/\n/' | mail"</div><div class="gmail_extra">

<br></div><div class="gmail_extra">J<br></div><div class="gmail_extra"><br></div>
</div>