On 11 April 2010 08:41, Doug Hardie <bc...@lafn.org> wrote:

>
> On 10 April 2010, at 23:14, Jos Chrispijn wrote:
>
> > Can someone tell me if there is a way of generating an email on the
> moment that someone logs in to my FreeBSD server? The mail part (phpmail)
> will be easy; I don't know yet how to trigger and pass parameter to this
> script or redirect info to a file (that I then send by email).  Thanks.
>
> A cheesy way to do that is to use a popen ("tail -f /var/log/auth.log",
> "r") and then read that.  It will give you every login regardless of ssh,
> telnet etc.  You could then generate the emails from that.  I have no idea
> just how resource intensive this might be.  You would also have to ensure it
> got started by rc during boot._________________________


It shouldn't be to bad as I use that method to generate stats from log files
for snmp. The log files I tail have about 200 odd lines per second and the
boxes handle it fine. But they are decentish spec but not extravagant (dell
2850 with 4gig  ram)
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to