From 72b06479a58c3c3961e0bc5d4812271662bf946e Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 27 Mar 2013 11:08:33 -0400 Subject: [PATCH] ENH: Slight tune ups for fresh SOGo filter + comment into the sample log file --- config/filter.d/sogo-auth.conf | 2 +- testcases/files/logs/sogo-auth | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config/filter.d/sogo-auth.conf b/config/filter.d/sogo-auth.conf index 6054c589..3e238419 100644 --- a/config/filter.d/sogo-auth.conf +++ b/config/filter.d/sogo-auth.conf @@ -11,7 +11,7 @@ # Note: the error log may contain multiple hosts, whereas the first one # is the client and all others are poxys. We match the first one, only -failregex = Login from '.*' for user '.*' might not have worked +failregex = Login from '' for user '.*' might not have worked( - password policy: \d* grace: -?\d* expire: -?\d* bound: -?\d*)?\s*$ # Option: ignoreregex # Notes.: regex to ignore. If this regex matches, the line is ignored. diff --git a/testcases/files/logs/sogo-auth b/testcases/files/logs/sogo-auth index 6dbe7356..e4fb9409 100644 --- a/testcases/files/logs/sogo-auth +++ b/testcases/files/logs/sogo-auth @@ -1,3 +1,6 @@ +# yoh: Kept original apache log lines as well, just in case they might come useful +# for (testing) multiline regular expressions which would further constraint +# SOGo log lines Mar 24 08:58:32 sogod [26818]: <0x0xb8537990[LDAPSource]> NAME:LDAPException REASON:operation bind failed: Invalid credentials (0x31) INFO:{login = "uid=hack0r,ou=users,dc=mail,dc=example,dc=org"; } Mar 24 08:58:32 sogod [26818]: SOGoRootPage Login from '173.194.44.31' for user 'hack0r' might not have worked - password policy: 65535 grace: -1 expire: -1 bound: 0 173.194.44.31 - - [24/Mar/2013:08:58:32 GMT] "POST /SOGo/connect HTTP/1.1" 403 34/38 0.311 - - 2M @@ -12,4 +15,3 @@ Mar 24 08:58:59 sogod [26818]: SOGoRootPage Login from '173.194.44.31' for user 173.194.44.31 - - [24/Mar/2013:08:58:59 GMT] "POST /SOGo/connect HTTP/1.1" 403 34/36 0.007 - - 0 Mar 24 08:59:04 sogod [26818]: <0x0xb8537990[LDAPSource]> NAME:LDAPException REASON:operation bind failed: Invalid credentials (0x31) INFO:{login = "uid=admin,ou=users,dc=mail,dc=example,dc=org"; } Mar 24 08:59:04 sogod [26818]: SOGoRootPage Login from '173.194.44.31' for user 'admin' might not have worked - password policy: 65535 grace: -1 expire: -1 bound: 0 -173.194.44.31 - - [24/Mar/2013:08:59:04 GMT] "POST /SOGo/connect HTTP/1.1" 403 34/37 0.007 - - 0