summaryrefslogtreecommitdiff
path: root/localshowuserfromip
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2007-11-14 13:31:37 +0000
committerJonas Smedegaard <dr@jones.dk>2007-11-14 13:31:37 +0000
commit72b5be1874ae6b4bb8c3fb0143314d9a9a7b3db8 (patch)
tree858eca7fb90690612c35a8841158b9dbf88e6ca0 /localshowuserfromip
parenta8aad353122a8f1f7eac3e3d419ac7fa01e94d7b (diff)
Tighten grep pattern. Include daemon in shortline output, and drop ip.
Diffstat (limited to 'localshowuserfromip')
-rwxr-xr-xlocalshowuserfromip6
1 files changed, 3 insertions, 3 deletions
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 <dr@jones.dk>
#
-# $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=</\1 /;s/>, method=[^,]*, rip=/ /;s/, lip=.*$//'
+ sed_shortline='s/^\(.\{15\}\) [^:]*: \([^-]*\)-login: Login: user=</\1 (\2) /;s/>, .*$//'
sed_username='s/^.* user=<//;s/>, .*$//'
;;
*)