<div id="1f2f" class="ArwC7c ckChnd">
<p>Hello,</p><p>I am doing the following intercept stuff, and
everything seems to be working fine. What I want to do is, in the
subject line I want to parse the hostname. Could you guys help me with
this.</p>
<br><p><br></p><p>Thanks,</p><p>-john<br></p><p><br></p><p><br></p><p>destination mail-alert {
program("/usr/local/bin/syslog-mail.sh"); };</p>
<p> </p>
<p>filter f_config_alert {</p>
<p><span>
</span>(</p>
<p><span>
</span>(</p>
<p><span>
</span>host("host1") or</p>
<p><span>
</span>host("host2") or</p>
<p><span> </span><span> </span>host("host3") or</p>
<p><span>
</span>host("host4")</p>
<p><span>
</span>) and</p>
<p><span>
</span>match("Configured from console")</p>
<p><span>
</span>);</p>
<p><span>
</span>};</p>
<p> </p>
<p># Send alert when some Genius configure something</p>
<p>log {</p>
<p><span> </span>source(s_net);</p>
<p><span>
</span>source(s_system);</p>
<p><span>
</span>filter(f_config_alert);</p>
<p><span>
</span>destination(mail-alert);</p>
<p>};</p>
<p> </p>
<p>[root@central-logger ~]# more /usr/local/bin/syslog-mail.sh</p>
<p>#!/bin/sh</p>
<p>RECIPIENTS"<a href="mailto:john@abc.com" target="_blank">john@abc.com</a>"</p>
<p> </p>
<p>while read line; do</p>
<p><span> </span>echo $line |
/bin/mail -s "Config Change notification for $1" $RECIPIENTS</p>
<p>done</p>
</div>