<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Sorry there's Small mistake that In both internal send or out send I must restart syslog-ng first<br><br><hr id="stopSpelling">From: reakyrok@hotmail.com<br>To: syslog-ng@lists.balabit.hu<br>Date: Mon, 6 Jul 2009 15:50:00 +0300<br>Subject: [syslog-ng] Must Restart syslog-ng to send email<br><br>



<style>
.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass body.EC_hmmessage
{font-size:10pt;font-family:Verdana;}
</style>


Dear friends<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I have a small problem with my syslog-ng server, I use a configuration to filter mail from log file and forwerd it to perl script to send it, the configuration like the following:<br>=====================================================<br>source sme {file (/var/log/syslog-ng/servers/172.31.250.68/local7.log); };<br><br>destination maillog { program ("/usr/local/bin/syslog-mail-perl" );<br>&nbsp;};<br>log {source(sme); destination(maillog); };<br>=====================================================<br><br>And the perl script like the following:<br>+++++++++++++++++++++++++++++++++++=<br>#!/usr/bin/perl -n<br># thanks to Brian Dowling for an example with security in mind.<br><br>$TO = 'reaky@domain.com';<br>$FROM = $TO;<br><br>s/^//;<br><br>open(MAIL, "|/usr/sbin/sendmail -t");<br><br>print MAIL "EOT";<br>To: $TO<br>From: $FROM<br>Subject: SME Log Alert: $_<br><br>$_<br><br>EOT<br><br>close(MAIL);<br>+++++++++++++++++++++++++++++++++++++++<br><br>It worked very fine when I send to root user in the machine, But when I
tried to send to outside I found that I must restart syslog every time
to send the mails to sendmail, In another word it buffer the emails
tell I restart syslog-ng then It forwerd it to send mail and can see it
in the mail log.<br>Do you have any idea for that ?<br>Thanks<br><br><hr>Windows Live™: Keep your life in sync. <a href="http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_012009">Check it out!</a><br /><hr />Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! <a href='http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us' target='_new'>Try it!</a></body>
</html>