So, I'm now able to get syslog-ng sending email alerts when certain simple things happen (like authentication), but I'm not sure how to get it to detect 'attacks'. Any idea how I would do that? By the way, the perl script that I call from syslog-ng.conf is here (I modified someone elses to work with esmtp):

Code:
#!/opt/bin/perl -n
# thanks to Brian Dowling for an example with security in mind.

$TO = 'user@mail.com';
$FROM = 'user@smtphost.net';

s/^<\d{1,2}>//;

open(MAIL, "|/opt/sbin/sendmail -t");

print MAIL << "EOT";
From: $FROM
To: $TO
Subject: Email Alert:

Message: $_

EOT
Quote Originally Posted by tiwag View Post
i've installed successfully and use the package esmtp
it is not an email (or smtp) server but it is a smtp relay client.
with esmtp you can send mails using your already existing email account with any provider which allows smtp

you can install it with "ipkg install esmtp"


then you need to edit the file /opt/etc/esmtprc with your account infos



after that you can use it like sendmail

example: sending a mail to user@mail.com, note the two "\n\n" before the Message text !!