<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: RoundCube Fail2Ban Plugin</title>
	<atom:link href="http://mattrude.com/projects/roundcube-fail2ban-plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://mattrude.com</link>
	<description>Matt Rude’s Personal Website</description>
	<lastBuildDate>Wed, 16 May 2012 12:18:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-beta4-20841</generator>
	<item>
		<title>By: Anthony</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-3500</link>
		<dc:creator>Anthony</dc:creator>
		<pubDate>Fri, 13 Apr 2012 15:23:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-3500</guid>
		<description>I did, but it still doesn&#039;t work - Charles mentioned that he had to put it in two places in the config file so I was wondering what the other places was.

I had to create the /plugins directory as there wasn&#039;t one in the root of roundcube, then I put in your fail2ban in it&#039;s own fail2ban directory in plugins - /var/www/html/roundcube/plugins/fail2ban/fail2ban.php I then added $rcmail_config[&#039;plugins&#039;] = array(&#039;fail2ban&#039;); to main.inc.php

I did notice that there was no plugins directory defined in main.inc.php like the log directory $rcmail_config[&#039;log_dir&#039;] = &#039;logs/&#039;;
I tried $rcmail_config[&#039;plugin_dir&#039;] = &#039;plugins/&#039;; but it didn&#039;t seem to do anything

I&#039;m puzzled why there wasn&#039;t a plugins directory to begin with

Of note - I&#039;m not using fail2ban/iptables service, I&#039;m using apf and installing Brute Force Monitor since I can&#039;t find a way to use fail2ban with apf (seems to only work with iptables)

What I do want to use your plugin for is to just get the IP logging in the log file for roundcube and then maybe try to get BFM to monitor it</description>
		<content:encoded><![CDATA[<p>I did, but it still doesn&#8217;t work &#8211; Charles mentioned that he had to put it in two places in the config file so I was wondering what the other places was.</p>
<p>I had to create the /plugins directory as there wasn&#8217;t one in the root of roundcube, then I put in your fail2ban in it&#8217;s own fail2ban directory in plugins &#8211; /var/www/html/roundcube/plugins/fail2ban/fail2ban.php I then added $rcmail_config['plugins'] = array(&#8216;fail2ban&#8217;); to main.inc.php</p>
<p>I did notice that there was no plugins directory defined in main.inc.php like the log directory $rcmail_config['log_dir'] = &#8216;logs/&#8217;;<br />
I tried $rcmail_config['plugin_dir'] = &#8216;plugins/&#8217;; but it didn&#8217;t seem to do anything</p>
<p>I&#8217;m puzzled why there wasn&#8217;t a plugins directory to begin with</p>
<p>Of note &#8211; I&#8217;m not using fail2ban/iptables service, I&#8217;m using apf and installing Brute Force Monitor since I can&#8217;t find a way to use fail2ban with apf (seems to only work with iptables)</p>
<p>What I do want to use your plugin for is to just get the IP logging in the log file for roundcube and then maybe try to get BFM to monitor it</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Rude</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-3493</link>
		<dc:creator>Matt Rude</dc:creator>
		<pubDate>Fri, 13 Apr 2012 01:44:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-3493</guid>
		<description>Yes, you need to add the &quot;fail2ban&quot; to the $rcmail_config[&#039;plugins&#039; option in your main.inc.php file, see: http://trac.roundcube.net/browser/trunk/roundcubemail/config/main.inc.php.dist#L364</description>
		<content:encoded><![CDATA[<p>Yes, you need to add the &#8220;fail2ban&#8221; to the $rcmail_config[&#8216;plugins&#8217; option in your main.inc.php file, see: <a href="http://trac.roundcube.net/browser/trunk/roundcubemail/config/main.inc.php.dist#L364" rel="nofollow">http://trac.roundcube.net/browser/trunk/roundcubemail/config/main.inc.php.dist#L364</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anthony</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-3492</link>
		<dc:creator>Anthony</dc:creator>
		<pubDate>Thu, 12 Apr 2012 23:55:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-3492</guid>
		<description>I can&#039;t get this to work either, where was the 2nd place you specified it?

I had to create a plugins directory because there was not one - do I have to specify the location of that in the main.inc.php file?</description>
		<content:encoded><![CDATA[<p>I can&#8217;t get this to work either, where was the 2nd place you specified it?</p>
<p>I had to create a plugins directory because there was not one &#8211; do I have to specify the location of that in the main.inc.php file?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-2579</link>
		<dc:creator>Charles</dc:creator>
		<pubDate>Tue, 21 Feb 2012 11:48:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-2579</guid>
		<description>it is working... in main.inc.php there are 2 places to specify the plugins... I need to make both to &#039;fail2ban&#039; before it will load.

Thanks!</description>
		<content:encoded><![CDATA[<p>it is working&#8230; in main.inc.php there are 2 places to specify the plugins&#8230; I need to make both to &#8216;fail2ban&#8217; before it will load.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-2578</link>
		<dc:creator>Charles</dc:creator>
		<pubDate>Tue, 21 Feb 2012 11:14:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-2578</guid>
		<description>No luck making it work. Followed every single step. Check and re-checked.

It seems that the plugin is not loaded.

Please advise how to check...

Thanks!</description>
		<content:encoded><![CDATA[<p>No luck making it work. Followed every single step. Check and re-checked.</p>
<p>It seems that the plugin is not loaded.</p>
<p>Please advise how to check&#8230;</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kiro</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-2216</link>
		<dc:creator>Kiro</dc:creator>
		<pubDate>Sun, 01 Jan 2012 13:51:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-2216</guid>
		<description>Many thx for this. It works like a charm !!</description>
		<content:encoded><![CDATA[<p>Many thx for this. It works like a charm !!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mic</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-1414</link>
		<dc:creator>Mic</dc:creator>
		<pubDate>Thu, 03 Nov 2011 22:42:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-1414</guid>
		<description>Matt,

Would you submit these same patterns on &lt;a href=&quot;http://www.sshguard.net/support/attacks/submit/&quot; rel=&quot;nofollow&quot;&gt;http://www.sshguard.net/support/attacks/submit/&lt;/a&gt; ? We&#039;d be happy to implement them in SSHGuard.

cheers
mic</description>
		<content:encoded><![CDATA[<p>Matt,</p>
<p>Would you submit these same patterns on <a href="http://www.sshguard.net/support/attacks/submit/" rel="nofollow">http://www.sshguard.net/support/attacks/submit/</a> ? We&#8217;d be happy to implement them in SSHGuard.</p>
<p>cheers<br />
mic</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julien</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-414</link>
		<dc:creator>Julien</dc:creator>
		<pubDate>Thu, 01 Sep 2011 16:31:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-414</guid>
		<description>Very nice and elegant way to solve the case where roundcube runs on the same server thanthe IMAP service. Previous courierauth would ban the IP of the server instead of banning the attacker.

Thanks!</description>
		<content:encoded><![CDATA[<p>Very nice and elegant way to solve the case where roundcube runs on the same server thanthe IMAP service. Previous courierauth would ban the IP of the server instead of banning the attacker.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vidar Normann</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-164</link>
		<dc:creator>Vidar Normann</dc:creator>
		<pubDate>Sat, 25 Jun 2011 08:00:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-164</guid>
		<description>Hi bill,

I&#039;m running Roundcube 0.5.3 on Debian Squeeze and these are the changes I made:

Change the jail-definition to look in logs/errors instead of logs/userlogins and change the regexp in the filter to the following:
.*Login failed for.*. from .

And like you said, there is no need for the plugin any longer, as Roundcube now logs failed logins by default.</description>
		<content:encoded><![CDATA[<p>Hi bill,</p>
<p>I&#8217;m running Roundcube 0.5.3 on Debian Squeeze and these are the changes I made:</p>
<p>Change the jail-definition to look in logs/errors instead of logs/userlogins and change the regexp in the filter to the following:<br />
.*Login failed for.*. from .</p>
<p>And like you said, there is no need for the plugin any longer, as Roundcube now logs failed logins by default.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: barron thomas</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-163</link>
		<dc:creator>barron thomas</dc:creator>
		<pubDate>Thu, 09 Jun 2011 04:50:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-163</guid>
		<description>Woah! I&#039;m really digging the template/theme of this site. It&#039;s simple, yet effective. A lot of times it&#039;s challenging to get that &quot;perfect balance&quot; between user friendliness and visual appearance. I must say you have done a fantastic job with this. Additionally, the blog loads very fast for me on Safari. Excellent Blog!</description>
		<content:encoded><![CDATA[<p>Woah! I&#8217;m really digging the template/theme of this site. It&#8217;s simple, yet effective. A lot of times it&#8217;s challenging to get that &#8220;perfect balance&#8221; between user friendliness and visual appearance. I must say you have done a fantastic job with this. Additionally, the blog loads very fast for me on Safari. Excellent Blog!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bill</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-162</link>
		<dc:creator>bill</dc:creator>
		<pubDate>Wed, 23 Mar 2011 07:50:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-162</guid>
		<description>Previously when I was using 0.3.1 on Ubuntu 9.04, I was able to get fail2ban working with roundcube without this plugin (it was actually logging the correct IP address in the normal roundcube errors log)... as I stated right at the top of this page

Now I am using 0.5 on Ubuntu 10.04, the normal errors log still works for me (ie. It shows the correct IP address of the remote system)

But.. the syntax of the log file changed and I CBF getting my regex to work cos I am not good at it... so I installed this plugin and sure enough I am getting the userlogins error log with the same IP addresses (correct ones)

I have setup fail2ban as per instructions. I can use fail2ban-regex to test my filter and it works. It finds matches in the log file. The jail is setup correctly and starts without errors.

I tested from a remote location today and was never banned after many many attempts... obviously I have done something wrong, or something has changed


&lt;strong&gt;jail.conf&lt;/strong&gt;
&lt;pre&gt;[roundcube]
enabled  = true
port     = http,https
filter   = roundcube
logpath  = /usr/share/roundcube/logs/userlogins&lt;/pre&gt;

&lt;strong&gt;filter.d/roundcube.conf&lt;/strong&gt;
&lt;pre&gt;[Definition]
failregex = FAILED login for .*. from 
ignoreregex =&lt;/pre&gt;

Like I said I have tested the regex against the log file and it finds matches. Enough matches that it should have banned (my default setting is 5 attempts in 10 minutes)

All my other jails are tested and working... just this roundcube jail doesn&#039;t work at all


As a side note, here is the output of the log files compared:

&lt;strong&gt;logs/errors&lt;/strong&gt;
&lt;pre&gt;[23-Mar-2011 07:44:12 +0900]: IMAP Error: Login failed for bantest@ictnt.com from
203.10.224.93. LOGIN: Login failed. in /usr/share/roundcube/program/include/rcube_imap.php
on line 192 (POST /webmail/?_task=login&amp;_action=login)&lt;/pre&gt;

&lt;strong&gt;logs/userlogins&lt;/strong&gt;
&lt;pre&gt;[23-Mar-2011 07:44:12 +0900]: FAILED login for bantest from 203.10.224.93&lt;/pre&gt;

If I could get a regex that works on the standard &quot;errors&quot; file, would that work?

I have also noted that both &quot;errors&quot; and &quot;userlogins&quot; have the same owner:group and permissions
&lt;pre&gt;-rw-r--r-- www-data:www-data&lt;/pre&gt;

So I can&#039;t see why the jail isn&#039;t working please help! :)</description>
		<content:encoded><![CDATA[<p>Previously when I was using 0.3.1 on Ubuntu 9.04, I was able to get fail2ban working with roundcube without this plugin (it was actually logging the correct IP address in the normal roundcube errors log)&#8230; as I stated right at the top of this page</p>
<p>Now I am using 0.5 on Ubuntu 10.04, the normal errors log still works for me (ie. It shows the correct IP address of the remote system)</p>
<p>But.. the syntax of the log file changed and I CBF getting my regex to work cos I am not good at it&#8230; so I installed this plugin and sure enough I am getting the userlogins error log with the same IP addresses (correct ones)</p>
<p>I have setup fail2ban as per instructions. I can use fail2ban-regex to test my filter and it works. It finds matches in the log file. The jail is setup correctly and starts without errors.</p>
<p>I tested from a remote location today and was never banned after many many attempts&#8230; obviously I have done something wrong, or something has changed</p>
<p><strong>jail.conf</strong></p>
<pre>[roundcube]
enabled  = true
port     = http,https
filter   = roundcube
logpath  = /usr/share/roundcube/logs/userlogins</pre>
<p><strong>filter.d/roundcube.conf</strong></p>
<pre>[Definition]
failregex = FAILED login for .*. from 
ignoreregex =</pre>
<p>Like I said I have tested the regex against the log file and it finds matches. Enough matches that it should have banned (my default setting is 5 attempts in 10 minutes)</p>
<p>All my other jails are tested and working&#8230; just this roundcube jail doesn&#8217;t work at all</p>
<p>As a side note, here is the output of the log files compared:</p>
<p><strong>logs/errors</strong></p>
<pre>[23-Mar-2011 07:44:12 +0900]: IMAP Error: Login failed for <a href="mailto:bantest@ictnt.com">bantest@ictnt.com</a> from
203.10.224.93. LOGIN: Login failed. in /usr/share/roundcube/program/include/rcube_imap.php
on line 192 (POST /webmail/?_task=login&amp;_action=login)</pre>
<p><strong>logs/userlogins</strong></p>
<pre>[23-Mar-2011 07:44:12 +0900]: FAILED login for bantest from 203.10.224.93</pre>
<p>If I could get a regex that works on the standard &#8220;errors&#8221; file, would that work?</p>
<p>I have also noted that both &#8220;errors&#8221; and &#8220;userlogins&#8221; have the same owner:group and permissions</p>
<pre>-rw-r--r-- www-data:www-data</pre>
<p>So I can&#8217;t see why the jail isn&#8217;t working please help! <img src='http://mattrude.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-161</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Wed, 16 Feb 2011 20:33:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-161</guid>
		<description>After i have changed the &quot;regex&quot; in the configuration file this plugin works great.

Thanks a lot
Chris</description>
		<content:encoded><![CDATA[<p>After i have changed the &#8220;regex&#8221; in the configuration file this plugin works great.</p>
<p>Thanks a lot<br />
Chris</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Rude</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-160</link>
		<dc:creator>Matt Rude</dc:creator>
		<pubDate>Sat, 05 Feb 2011 05:24:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-160</guid>
		<description>Thank you</description>
		<content:encoded><![CDATA[<p>Thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Rude</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-159</link>
		<dc:creator>Matt Rude</dc:creator>
		<pubDate>Sat, 05 Feb 2011 05:23:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-159</guid>
		<description>Thank you for adding this.</description>
		<content:encoded><![CDATA[<p>Thank you for adding this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Rude</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-158</link>
		<dc:creator>Matt Rude</dc:creator>
		<pubDate>Sat, 05 Feb 2011 05:23:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-158</guid>
		<description>yup, the plugins folder, but you have to follow the full install for it to work.</description>
		<content:encoded><![CDATA[<p>yup, the plugins folder, but you have to follow the full install for it to work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Rude</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-157</link>
		<dc:creator>Matt Rude</dc:creator>
		<pubDate>Sat, 05 Feb 2011 05:22:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-157</guid>
		<description>Your are free and welcome to modify the code anyway you wish :)</description>
		<content:encoded><![CDATA[<p>Your are free and welcome to modify the code anyway you wish <img src='http://mattrude.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Rude</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-156</link>
		<dc:creator>Matt Rude</dc:creator>
		<pubDate>Sat, 05 Feb 2011 05:18:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-156</guid>
		<description>I have no idea, I don&#039;t use Windows</description>
		<content:encoded><![CDATA[<p>I have no idea, I don&#8217;t use Windows</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DmDS</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-155</link>
		<dc:creator>DmDS</dc:creator>
		<pubDate>Sat, 25 Dec 2010 12:18:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-155</guid>
		<description>help please....
&quot;logpath&quot; for windows
c://logs/userlogins
is it right?</description>
		<content:encoded><![CDATA[<p>help please&#8230;.<br />
&#8220;logpath&#8221; for windows<br />
c://logs/userlogins<br />
is it right?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Coleman</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-154</link>
		<dc:creator>Chris Coleman</dc:creator>
		<pubDate>Sat, 13 Nov 2010 16:24:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-154</guid>
		<description>(continued)
I didnt include the details for the first file you must modify on Debian Lenny:
1. /usr/share/roundcube/config/main.inc.php
You must add these 2 lines for it to work:
$rcmail_config[&#039;log_driver&#039;] = ‘file’;
$rcmail_config[&#039;syslog_id&#039;] = ’roundcube’;</description>
		<content:encoded><![CDATA[<p>(continued)<br />
I didnt include the details for the first file you must modify on Debian Lenny:<br />
1. /usr/share/roundcube/config/main.inc.php<br />
You must add these 2 lines for it to work:<br />
$rcmail_config['log_driver'] = ‘file’;<br />
$rcmail_config['syslog_id'] = ’roundcube’;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Coleman</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-153</link>
		<dc:creator>Chris Coleman</dc:creator>
		<pubDate>Sat, 13 Nov 2010 16:12:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-153</guid>
		<description>I had to make modifications to 3 files so that your plugin could work on Debian Lenny (Debian 5).  

1. config/main.inc.php
2. /etc/fail2ban/jail.conf   the logpath was incorrect. For Debian Lenny it should be 
logpath=/usr/share/roundcube/logs/userlogins
3. the source code /usr/share/roundcube/plugins/fail2ban/fail2ban.php 
It should have:
chmod(&quot;logs/userlogins&quot;,0600);
before and after the line:
error_log(............);
Because something sets the permissions on that file after every write to an inaccessible 500 permissions(!!!). Yes, r-x------. We need 600 ie rw------- otherwise we get no info on failed login attempts.</description>
		<content:encoded><![CDATA[<p>I had to make modifications to 3 files so that your plugin could work on Debian Lenny (Debian 5).  </p>
<p>1. config/main.inc.php<br />
2. /etc/fail2ban/jail.conf   the logpath was incorrect. For Debian Lenny it should be<br />
logpath=/usr/share/roundcube/logs/userlogins<br />
3. the source code /usr/share/roundcube/plugins/fail2ban/fail2ban.php<br />
It should have:<br />
chmod(&#8220;logs/userlogins&#8221;,0600);<br />
before and after the line:<br />
error_log(&#8230;&#8230;&#8230;&#8230;);<br />
Because something sets the permissions on that file after every write to an inaccessible 500 permissions(!!!). Yes, r-x&#8212;&#8212;. We need 600 ie rw&#8212;&#8212;- otherwise we get no info on failed login attempts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Rude</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-152</link>
		<dc:creator>Matt Rude</dc:creator>
		<pubDate>Fri, 05 Nov 2010 23:38:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-152</guid>
		<description>It&#039;s expected behavior.  RoundCube doesn&#039;t seem to log failed logins, so it&#039;s pretty hard to block/lockout an IP address without knowing about them.</description>
		<content:encoded><![CDATA[<p>It&#8217;s expected behavior.  RoundCube doesn&#8217;t seem to log failed logins, so it&#8217;s pretty hard to block/lockout an IP address without knowing about them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Starks</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-151</link>
		<dc:creator>Michael Starks</dc:creator>
		<pubDate>Thu, 28 Oct 2010 03:06:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-151</guid>
		<description>I noticed that a failed login with a valid username will produce two log entries: one from the default roundcube log and one from this plugin. On the other hand, a failed login with an invalid username only produces a plugin log. Is this a bug in roundcube, the plugin, or is it expected behavior? Thanks.</description>
		<content:encoded><![CDATA[<p>I noticed that a failed login with a valid username will produce two log entries: one from the default roundcube log and one from this plugin. On the other hand, a failed login with an invalid username only produces a plugin log. Is this a bug in roundcube, the plugin, or is it expected behavior? Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-150</link>
		<dc:creator>matt</dc:creator>
		<pubDate>Thu, 30 Sep 2010 01:11:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-150</guid>
		<description>I can&#039;t seem to get this plugin to work with .4  what exactly do i need to setup?  I have done all the things said in the above messages is there just a folder i can drop in and make it work?</description>
		<content:encoded><![CDATA[<p>I can&#8217;t seem to get this plugin to work with .4  what exactly do i need to setup?  I have done all the things said in the above messages is there just a folder i can drop in and make it work?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thuan N. Tran</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-149</link>
		<dc:creator>Thuan N. Tran</dc:creator>
		<pubDate>Wed, 22 Sep 2010 14:40:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-149</guid>
		<description>I&#039;m using your plugin with rcguard and I modified rcguard a little with your code thus I can use the log output with my csf/lfd config, hope you don&#039;t mind. Here&#039;s the code http://pastebin.com/M868wWL0 from line 252 of function verify_recaptcha in rcguard latest version.</description>
		<content:encoded><![CDATA[<p>I&#8217;m using your plugin with rcguard and I modified rcguard a little with your code thus I can use the log output with my csf/lfd config, hope you don&#8217;t mind. Here&#8217;s the code <a href="http://pastebin.com/M868wWL0" rel="nofollow">http://pastebin.com/M868wWL0</a> from line 252 of function verify_recaptcha in rcguard latest version.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ryouji</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-148</link>
		<dc:creator>ryouji</dc:creator>
		<pubDate>Tue, 07 Sep 2010 16:41:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-148</guid>
		<description>Hi all fix issue
&lt;pre&gt;
[roundcube-24hr]
enabled  = true
port     =  http,https
action   = iptables-multiport[name=roundcube24, port=&quot;http,https&quot;,protocol=tcp]
sendmail-whois[name=RC-Webmail, dest=root@localhost, sender=fail2ban@localhost]
filter   = roundcube-24hr
logpath  = /var/log/fail2ban.log
maxretry = 2
findtime = 21600
bantime  = 86400
&lt;/pre&gt;

thanks all</description>
		<content:encoded><![CDATA[<p>Hi all fix issue</p>
<pre>
[roundcube-24hr]
enabled  = true
port     =  http,https
action   = iptables-multiport[name=roundcube24, port="http,https",protocol=tcp]
sendmail-whois[name=RC-Webmail, dest=root@localhost, sender=fail2ban@localhost]
filter   = roundcube-24hr
logpath  = /var/log/fail2ban.log
maxretry = 2
findtime = 21600
bantime  = 86400
</pre>
<p>thanks all</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wahid</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-147</link>
		<dc:creator>Wahid</dc:creator>
		<pubDate>Thu, 19 Aug 2010 14:45:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-147</guid>
		<description>Thanks, it works great with RoundCube 0.4Stable and fail2ban 0.8.3-2 under Debian Lenny. Thanks again</description>
		<content:encoded><![CDATA[<p>Thanks, it works great with RoundCube 0.4Stable and fail2ban 0.8.3-2 under Debian Lenny. Thanks again</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Al</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-146</link>
		<dc:creator>Al</dc:creator>
		<pubDate>Wed, 14 Jul 2010 07:18:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-146</guid>
		<description>Hi,
  Thanks for the plugin it works but with a small issue.
The IP the log is showing, does not correspond with the actual IP of the PC but the IP of the router, in my local network.

So, the IP banned is the router one.

Can you help with this?. Thanks</description>
		<content:encoded><![CDATA[<p>Hi,<br />
  Thanks for the plugin it works but with a small issue.<br />
The IP the log is showing, does not correspond with the actual IP of the PC but the IP of the router, in my local network.</p>
<p>So, the IP banned is the router one.</p>
<p>Can you help with this?. Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Odd Henriksen</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-145</link>
		<dc:creator>Odd Henriksen</dc:creator>
		<pubDate>Sat, 17 Apr 2010 21:53:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-145</guid>
		<description>Thanks for this!

RoundCube&#039;s &#039;native&#039; error log (logs/errors) doesn&#039;t specify the remote host address, at least not when using the settings I require.

I appreciate that you have taken the time to write this small but very useful plugin, and that you chose to share it with the rest of us.</description>
		<content:encoded><![CDATA[<p>Thanks for this!</p>
<p>RoundCube&#8217;s &#8216;native&#8217; error log (logs/errors) doesn&#8217;t specify the remote host address, at least not when using the settings I require.</p>
<p>I appreciate that you have taken the time to write this small but very useful plugin, and that you chose to share it with the rest of us.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: phil</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-144</link>
		<dc:creator>phil</dc:creator>
		<pubDate>Fri, 26 Mar 2010 12:37:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-144</guid>
		<description>Thanks for your work.</description>
		<content:encoded><![CDATA[<p>Thanks for your work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bill</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-143</link>
		<dc:creator>bill</dc:creator>
		<pubDate>Wed, 17 Mar 2010 15:27:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-143</guid>
		<description>i put a post on howtoforge with all the correct syntaxes

http://howtoforge.com/forums/showthread.php?t=44168</description>
		<content:encoded><![CDATA[<p>i put a post on howtoforge with all the correct syntaxes</p>
<p><a href="http://howtoforge.com/forums/showthread.php?t=44168" rel="nofollow">http://howtoforge.com/forums/showthread.php?t=44168</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bill</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-142</link>
		<dc:creator>bill</dc:creator>
		<pubDate>Wed, 17 Mar 2010 14:57:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-142</guid>
		<description>I found another way of doing it without the plugin...

actually it turns out 0.3.1 already logs auth errors (i don&#039;t know if previous versions did or not)

i set mine up by editing the files as such...

adjust the roundcube log path depending on your install setup - i installed mine manually i don&#039;t know where it normally installs to

add this to &lt;strong&gt;/etc/fail2ban/jail.conf&lt;/strong&gt;:
&lt;pre&gt;[roundcube]
enabled  = true
port     = http,https
filter   = roundcube
logpath  = /usr/local/roundcube/logs/errors&lt;/pre&gt;


create new file &lt;strong&gt;/etc/fail2ban/filter.d/roundcube.conf&lt;/strong&gt;:
&lt;pre&gt;[Definition]
failregex = IMAP Error: Authentication for .* () failed ((?:LOGIN&#124;AUTH)):
ignoreregex =&lt;/pre&gt;


and that is it... roundcube auth failures will be banned using your default settings... or you could adjust the setup in jail.conf with these additions:
&lt;pre&gt;findtime = x (in seconds)
bantime = x (in seconds)
maxretry = x (attempts)&lt;/pre&gt;

example, to setup a one hour ban for 5 failed login attempts within a 10 minute period: findtime = 600, bantime = 3600, maxretry = 5

also, you can setup rules for repeat offenders such as this (my example bans for 24 hours if a host suffers two 1 hour bans within a 6 hour period - aka they just won&#039;t take a hint):

add this to &lt;strong&gt;/etc/fail2ban/jail.conf&lt;/strong&gt;:
&lt;pre&gt;[roundcube-24hr]
enabled  = true
port     =  http,https
filter   = roundcube-24hr
logpath  = /var/log/fail2ban.log
maxretry = 2
findtime = 21600
bantime  = 86400&lt;/pre&gt;

create &lt;strong&gt;/etc/fail2ban/filter.d/roundcube-24hr.conf&lt;/strong&gt;:
&lt;pre&gt;[Definition]
failregex = [roundcube] Ban
ignoreregex =&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>I found another way of doing it without the plugin&#8230;</p>
<p>actually it turns out 0.3.1 already logs auth errors (i don&#8217;t know if previous versions did or not)</p>
<p>i set mine up by editing the files as such&#8230;</p>
<p>adjust the roundcube log path depending on your install setup &#8211; i installed mine manually i don&#8217;t know where it normally installs to</p>
<p>add this to <strong>/etc/fail2ban/jail.conf</strong>:</p>
<pre>[roundcube]
enabled  = true
port     = http,https
filter   = roundcube
logpath  = /usr/local/roundcube/logs/errors</pre>
<p>create new file <strong>/etc/fail2ban/filter.d/roundcube.conf</strong>:</p>
<pre>[Definition]
failregex = IMAP Error: Authentication for .* () failed ((?:LOGIN|AUTH)):
ignoreregex =</pre>
<p>and that is it&#8230; roundcube auth failures will be banned using your default settings&#8230; or you could adjust the setup in jail.conf with these additions:</p>
<pre>findtime = x (in seconds)
bantime = x (in seconds)
maxretry = x (attempts)</pre>
<p>example, to setup a one hour ban for 5 failed login attempts within a 10 minute period: findtime = 600, bantime = 3600, maxretry = 5</p>
<p>also, you can setup rules for repeat offenders such as this (my example bans for 24 hours if a host suffers two 1 hour bans within a 6 hour period &#8211; aka they just won&#8217;t take a hint):</p>
<p>add this to <strong>/etc/fail2ban/jail.conf</strong>:</p>
<pre>[roundcube-24hr]
enabled  = true
port     =  http,https
filter   = roundcube-24hr
logpath  = /var/log/fail2ban.log
maxretry = 2
findtime = 21600
bantime  = 86400</pre>
<p>create <strong>/etc/fail2ban/filter.d/roundcube-24hr.conf</strong>:</p>
<pre>[Definition]
failregex = [roundcube] Ban
ignoreregex =</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Rude</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-141</link>
		<dc:creator>Matt Rude</dc:creator>
		<pubDate>Wed, 17 Mar 2010 05:17:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-141</guid>
		<description>Yep, I&#039;m currently running it on a trunk install of RoundCube.</description>
		<content:encoded><![CDATA[<p>Yep, I&#8217;m currently running it on a trunk install of RoundCube.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bill</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-140</link>
		<dc:creator>bill</dc:creator>
		<pubDate>Sat, 13 Mar 2010 23:01:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-140</guid>
		<description>Does this work with 0.3.1 ?</description>
		<content:encoded><![CDATA[<p>Does this work with 0.3.1 ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: [0.3] SMTP and webmail on same server - RoundCube Webmail Forum</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-139</link>
		<dc:creator>[0.3] SMTP and webmail on same server - RoundCube Webmail Forum</dc:creator>
		<pubDate>Sat, 19 Sep 2009 14:16:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-139</guid>
		<description>[...] for your help. I haven&#039;t been able to find that plugin. However, I came acros this one: RoundCube Fail2Ban Plugin &#8211; Matt Rude . Does this plugin do what I want: Block the external IP of the client that is connecting and not [...] </description>
		<content:encoded><![CDATA[<p>[...] for your help. I haven&#039;t been able to find that plugin. However, I came acros this one: RoundCube Fail2Ban Plugin &#8211; Matt Rude . Does this plugin do what I want: Block the external IP of the client that is connecting and not [...] </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: [ErrorLog] Client IP Address - RoundCube Webmail Forum</title>
		<link>http://mattrude.com/projects/roundcube-fail2ban-plugin/#comment-138</link>
		<dc:creator>[ErrorLog] Client IP Address - RoundCube Webmail Forum</dc:creator>
		<pubDate>Wed, 19 Aug 2009 15:00:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattrude.com/?page_id=346#comment-138</guid>
		<description>[...] Fail2Ban Plugin      Check out the RoundCube Fail2Ban Plugin also as a quick and easy way to do [...] </description>
		<content:encoded><![CDATA[<p>[...] Fail2Ban Plugin      Check out the RoundCube Fail2Ban Plugin also as a quick and easy way to do [...] </p>
]]></content:encoded>
	</item>
</channel>
</rss>

