From owner-freebsd-questions Tue Dec 18 12: 0:13 2001 Delivered-To: freebsd-questions@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id 8A89237B41E for ; Tue, 18 Dec 2001 12:00:10 -0800 (PST) Received: (from dan@localhost) by dan.emsphone.com (8.11.6/8.11.6) id fBIJxWU45746; Tue, 18 Dec 2001 13:59:32 -0600 (CST) (envelope-from dan) Date: Tue, 18 Dec 2001 13:59:32 -0600 From: Dan Nelson To: Ceri Cc: krzysztof , freebsd-questions@FreeBSD.ORG Subject: Re: Sending email with syslogd Message-ID: <20011218195932.GC57822@dan.emsphone.com> References: <20011218192032.43522.qmail@web14808.mail.yahoo.com> <20011218193110.GA57342@rhadamanth> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20011218193110.GA57342@rhadamanth> User-Agent: Mutt/1.3.23.2i X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In the last episode (Dec 18), Ceri said: > On Tue, Dec 18, 2001 at 11:20:32AM -0800, krzysztof wrote: > > I've recently configured snort to log to syslog but it does > > not have an option in the snort.conf file to have it mail any > > detections to an account. How would one configure anything snort > > logs to syslog at local*.* to send mail? Is this something syslog > > can do? > > In syslog.conf : > > local*.* |/bin/mail -s "log message from host.example.net" me@example.com .. and keep in mind that syslog will launch that command /once/, and spool data into it until the pipe closes. You probably want to do something like (untested): local1.* | read -r line ; ( echo $line | /bin/mail -s "log message" user@host.com ) & See the syslog.conf manpage for details. -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message