Thank you very much. I don't want to really mess with the code itself. I fixed it by filtering it through sed in my procmailrc file. For anyone else that is interested, here is the scenario:<br><br>My alert subject: "ALERT: [$ACKCODE] $BBHOSTNAME - $SERVICE"<br>
Hobbit expects: "Hobbit [$ACKCODE] ......"<br><br>The contents of my ~/.procmailrc file to make hobbit-mailack accept the acknowledgement (until the code is changed):<br><br>DEFAULT=$HOME/Mailbox<br>LOGFILE=$HOME/procmail.log<br>
:0<br>| sed -e s/"ALERT: "/"Hobbit "/ | $HOME/server/bin/hobbit-mailack --env=$HOME/server/etc/hobbitserver.cfg<br><br><br><br><br><div class="gmail_quote">On Thu, Jul 22, 2010 at 11:37 AM, Asif Iqbal <span dir="ltr"><<a href="mailto:vadud3@gmail.com">vadud3@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">On Thu, Jul 22, 2010 at 11:16 AM, Geoff Hallford<br>
<<a href="mailto:geoff.hallford@gmail.com">geoff.hallford@gmail.com</a>> wrote:<br>
> Hi All,<br>
><br>
> Does anyone know of a way to allow my custom email alerts to be used with<br>
> hobbit-mailack? Currently, the only way to get Xymon 4.3.0-0 beta 2 to<br>
> acknowledge an alert via email reply is for the subject line to start with<br>
> "Hobbit [$ACKCODE]". My alerts start off with either "ALERT:" or<br>
> "RECOVERED:" and not matter where I put the $ACKCODE, it only works if you<br>
> do it as "Hobbit [$ACKCODE]".<br>
<br>
</div>You just have to modify few lines starting here, excerpted from<br>
hobbitd/hobbit-mailack.c<br>
<br>
 98         /* Get the alert cookie */<br>
 99         subjexp = pcre_compile(".*(Hobbit|BB)[ -]*<br>
\\[*(-*[0-9]+)[\\]!]*", PCRE_CASELESS, &errmsg, &errofs, NULL);<br>
100         if (subjexp == NULL) {<br>
101                 dbgprintf("pcre compile failed - 1\n");<br>
102                 return 2;<br>
103         }<br>
<br>
So it is really pcre match. Then make clean; make and then save your<br>
old hobbit-mailack and<br>
replace it your new hobbit-mailack<br>
<div><div></div><div class="h5"><br>
><br>
> I think there should be something in the hobbitserver.cfg to allow people to<br>
> change this, as we are supposed to be able to customize our alerting and<br>
> this breaks mailack.<br>
><br>
> Any thoughts?<br>
><br>
> Thanks.<br>
><br>
> P.S. I can't develop in C.<br>
><br>
> Geoff.<br>
><br>
<br>
<br>
<br>
</div></div><font color="#888888">--<br>
Asif Iqbal<br>
PGP Key: 0xE62693C5 KeyServer: <a href="http://pgp.mit.edu" target="_blank">pgp.mit.edu</a><br>
A: Because it messes up the order in which people normally read text.<br>
Q: Why is top-posting such a bad thing?<br>
<br>
To unsubscribe from the xymon list, send an e-mail to<br>
<a href="mailto:xymon-unsubscribe@xymon.com">xymon-unsubscribe@xymon.com</a><br>
<br>
<br>
</font></blockquote></div><br>