From 72b5be1874ae6b4bb8c3fb0143314d9a9a7b3db8 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Wed, 14 Nov 2007 13:31:37 +0000 Subject: Tighten grep pattern. Include daemon in shortline output, and drop ip. --- localshowuserfromip | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'localshowuserfromip') diff --git a/localshowuserfromip b/localshowuserfromip index f64d673..69e9122 100755 --- a/localshowuserfromip +++ b/localshowuserfromip @@ -3,7 +3,7 @@ # /usr/local/sbin/localshowuserfromip # Copyright 2007 Jonas Smedegaard # -# $Id: localshowuserfromip,v 1.2 2007-11-14 13:26:38 jonas Exp $ +# $Id: localshowuserfromip,v 1.3 2007-11-14 13:31:37 jonas Exp $ # # List recent identifiable users from some IP address # @@ -19,9 +19,9 @@ sed_time='s/^\(.\{15\}\) .*$/\1 /' case $pattern in user_dovecot) # Dovecot "deliver" - egrep_before=', rip=(' + egrep_before='dovecot: .*: Login: .*, rip=(' egrep_after='), lip=' - sed_shortline='s/^\(.\{15\}\) [^:]*: [^-]*-login: Login: user=, method=[^,]*, rip=/ /;s/, lip=.*$//' + sed_shortline='s/^\(.\{15\}\) [^:]*: \([^-]*\)-login: Login: user=, .*$//' sed_username='s/^.* user=, .*$//' ;; *) -- cgit v1.2.3