#1  
Old 19th April 2012, 15:54
Lionheart82 Lionheart82 is offline
Member
 
Join Date: May 2011
Posts: 40
Thanks: 3
Thanked 4 Times in 4 Posts
Default fail2ban - SquirrelMail Error

Hello, i have followed the tut http://www.howtoforge.com/configurin....3-ispconfig-3
and have completed all steps by the book (triple checked this one).

The squirrelmail_access_log has been created and there are 4 failed tries like:
04/18/2012 09:46:23 [LOGIN_ERROR] admin@domainname (localhost) from xxx.xxx.xxx.xxx: Unknown user or password incorrect.

After i use the fail2ban-regex /var/lib/squirrelmail/prefs/squirrelmail_access_log /etc/fail2ban/filter.d/squirrelmail.conf

i get the Following error:

Running tests
=============

Use regex file : /etc/fail2ban/filter.d/squirrelmail.conf
Use log file : /var/lib/squirrelmail/prefs/squirrelmail_access_log

Traceback (most recent call last):
File "/usr/bin/fail2ban-regex", line 372, in ?
fail2banRegex.testRegex(line)
File "/usr/bin/fail2ban-regex", line 225, in testRegex
ret = self.__filter.processLine(line)
File "/usr/share/fail2ban/server/filter.py", line 265, in processLine
return self.findFailure(timeLine, logLine)
File "/usr/share/fail2ban/server/filter.py", line 311, in findFailure
date = self.dateDetector.getUnixTime(timeLine)
File "/usr/share/fail2ban/server/datedetector.py", line 167, in getUnixTime
date = self.getTime(line)
File "/usr/share/fail2ban/server/datedetector.py", line 156, in getTime
date = template.getDate(line)
File "/usr/share/fail2ban/server/datetemplate.py", line 140, in getDate
date = list(time.strptime(conv, pattern))
File "/usr/lib64/python2.4/_strptime.py", line 287, in strptime
format_regex = time_re.compile(format)
File "/usr/lib64/python2.4/_strptime.py", line 264, in compile
return re_compile(self.pattern(format), IGNORECASE)
File "/usr/lib64/python2.4/sre.py", line 180, in compile
return _compile(pattern, flags)
File "/usr/lib64/python2.4/sre.py", line 227, in _compile
raise error, v # invalid expression
sre_constants.error: redefinition of group name 'Y' as group 7; was group 3

As you can see my python version is 2.4, the Fail2ban version is 0.8.4-29.el5(epel) though i have tried this on the 8.2 with the same error( i did upgrade to 8.4 since two days now).

I have also followed the instructions on this topic (exacly the same problem but python 2.6) https://www.centos.org/modules/newbb...topic_id=32369
without success...any one has this problem solved?
I admit giving up on this one although a system is as strong as your weekest link :S
Reply With Quote
Sponsored Links
  #2  
Old 20th April 2012, 16:38
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts
Default

Can you post your /etc/fail2ban/filter.d/squirrelmail.conf file?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 20th April 2012, 16:45
Lionheart82 Lionheart82 is offline
Member
 
Join Date: May 2011
Posts: 40
Thanks: 3
Thanked 4 Times in 4 Posts
Default

Hello,

This is it:

# Fail2Ban configuration file
#
# Author: Bill Landry ((email_protected))
#
# $Revision: 510 $

[Definition]

# Option: failregex
# Notes.: regex to match the password failures messages in the logfile. The
# host must be matched by a group named "host". The tag "" can
# be used for standard IP/hostname matching and is only an alias for
# (?:::f{4,6}?(?P\S+)
# Values: TEXT

failregex = \[LOGIN_ERROR\].*from <HOST>: Unknown user or password incorrect

# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT

ignoreregex =
Reply With Quote
  #4  
Old 21st April 2012, 12:55
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts
Default

Looks ok. Did you save the file with Unix linebreaks or maybe with Windows linebreaks?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 22nd April 2012, 19:02
Lionheart82 Lionheart82 is offline
Member
 
Join Date: May 2011
Posts: 40
Thanks: 3
Thanked 4 Times in 4 Posts
Default

The file is created from linux vi editor how could this be in win format?
Reply With Quote
  #6  
Old 23rd April 2012, 11:04
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts
Default

Then it uses Unix linebreaks which is ok. Unfortunately I have no idea what's wrong...
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Tags
fail2ban, squirrelmail

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
mod_layout and php gd branov Installation/Configuration 8 2nd September 2009 16:51
High on Lenny - Lvm Mount Problem Serverman Technical 1 23rd June 2009 17:26
log files cruz Technical 3 15th May 2007 15:35
Unbearably slow access speeds CombatGod Installation/Configuration 5 30th May 2006 17:31
Fresh Install on Debian cksrealm Installation/Configuration 12 22nd February 2006 17:14


All times are GMT +2. The time now is 19:30.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.