Dovecot’s Quota Plugin

The below assumes your using mdbox so dirsize or dict:sql will be the fastest. Since we already have sql setup, were going to go with that.

Enabling the Quota Plugin

mail_plugins = $mail_plugins quota

protocol imap {
  # Space separated list of plugins to load (default is global mail_plugins).
  mail_plugins = $mail_plugins imap_quota

plugin {
  # SQL backend:
  quota = dict:User quota::proxy::quota
  quota_rule = *:storage=1024M:messages=100000
  quota_rule2 = Trash:storage=+20%%
  quota_rule3 = Junk:storage=+20%%
}dict {
  quota = mysql:/etc/dovecot/dovecot-dict-mysql.conf

The dovecot-dict-mysql.conf file should containe something like this

connect = host=localhost dbname=postfix user=postfix password=postfix
map {
  pattern = priv/quota/storage
  table = quota
  username_field = username
  value_field = bytes
map {
  pattern = priv/quota/messages
  table = quota
  username_field = username
  value_field = messages

And lastly, add the following table to your email servers database in mySQL.

  username varchar(100) not null,
  bytes bigint not null default 0,
  messages integer not null default 0,
  primary key (username)

wp-Gallery2 Image Block post

The wp-Gallery2 Image Block plugin will allow you to put one of the many Gallery2 Image Blocks on your WordPress site.  You are required to have a running Gallery2 install to use this plugin.

This is a complete rewrite of Chris Schierer (aka Lentil) Gallery2 Image Block Plugin 0.1.4.  This rewrite uses the new WordPress 2.8 Widget API, so is only compatible with WordPress 2.8+.

All options described in the Gallery 2 Image Block documentation are included.

User configuration of Image Block options is available through the Widget configuration panel.  Blank (empty) options use the Gallery2 defaults.

Note: The widget is written using lib_curl() to avoid url_fopen issues.


  • wp-gallery2-image-block – Version 0.4 (2009-July-16)
  • wp-gallery2-image-block – Version 0.3 (2009-July-15)
  • wp-gallery2-image-block – Version 0.1 (2009-July-12)

Screen Shots


Extract the zip file and copy the folder wp=gallery2-image-block into your wp-content/plugins/ directory of your WordPress installation and then activate the Plugin from Plugins page.

RoundCube Fail2Ban Plugin

RoundCube Fail2Ban Plugin is a small plugin that will display a failed login attempts to your syslog or userlogins log file. Using this information Fail2Ban be able to block a user for a set amount of time. The best part, the block is happing at the IP level and blocks the IP address, not the user they are try to log in as.


  • tgz | zip | git – Version: 1.0 (2009-Jul-09)


  • Place this plugin folder into the RoundCube plugins directory (roundcube/plugins/)
  • Add fail2ban to $rcmail_config[‘plugins’] in your RoundCube config

Note: When downloading this plugin from you will need to create a directory called fail2ban and place fail2ban.php in there, ignoring the root directory in the downloaded archive. You may also run ‘git clone git:// fail2ban’ from the plugins directory.

Fail2Ban Setup


enabled  = true
port     = http,https
filter   = roundcube
action   = iptables-multiport[name=roundcube, port="http,https"]
logpath  = /var/www/html/roundcube/logs/userlogins


failregex = FAILED login for .*. from <HOST>
ignoreregex =