• PHP
  • Ruby on Rails
  • MySQL
  • Linux
    • SELINUX
    • Fedora
    • debian
  • Apache
  • nginx
  • AJAX
Albertech.net

Tag Archives: Captcha

Adding CAPTCHA to Squirrelmail

August 8, 2011 4:01 pm / Albertech.net

Here’s a quick guide to enabling the CAPTCHA plugin in Squirrelmail.

  1. Download and unzip/untar the following two Squirrelmail plugins to your plugins directory:
    a) User Information
    b) CAPTCHA
  2. Enable the User Information plugin by running the Squirrelmail configuration script. Run  ./configure, select 8 for plugins, typeg the number corresponding to the user_info plugin, and save.
  3. Obtain a free public/private RECAPTCHA key to use on your site. http://www.google.com/recaptcha.
  4. Copy the default configuration file inside plugins/captcha.
    cp config_example.php  config.php
  5. Edit the config.php and setup the $captcha_backend variable
    $captcha_backend = 'recaptcha';
  6. If you don’t want the CAPTCHA to appear on your local IP(s), you can define them in the $hide_captcha_ips variable.
    $hide_captcha_ips = array('MY IP ADDRESS');
  7. Go to the plugins/captcha/backends folder and copy the recaptcha_config_example.php as recaptcha_config.php.
    cp recaptcha_config_example.php recaptcha_config.php
  8. Edit recaptcha_config.php and enter your RECAPTCHA private and public keys. They should be listed in the welcome e-mail from RECAPTCHA.
    $recaptcha_public_key = 'YOUR PUBLIC KEY';
    $recaptcha_private_key = 'YOUR PRIVATE KEY';
  9.  The last step is to enable to CAPTCHA plugin in Squirrelmail. Run the Squirrelmail configuration script. Run  ./configure, select 8 for plugins, type the number corresponding to the captcha plugin, and save.

Notes: I noticed there is a bug inside the CAPTCHA plugin if you don’t have the user_information plugin installed. Its not a big deal, so I just added the user_information plugin to the installation instructions. Line 183 has missing parentheses for the file_exists case.

It should look like the following:

if ((!empty($hide_captcha_ips) || !empty($show_captcha_ips))
&& file_exists(SM_PATH . 'plugins/user_info/functions.php'))

Share this:

  • Facebook
  • Google
  • Twitter
  • Print
  • Email
Posted in: PHP / Tagged: captcha, squirrelmail

Categories

  • AJAX
  • Android
  • Apache
  • Canon Cameras
  • Cloud
  • CMS
  • Computer Mods
  • Conferences
  • Deals
  • debian
  • Fedora
  • Flash
  • Frameworks
  • git
  • Hardware
  • HTML
  • IDE
  • iPhone
  • iPhone App Review
  • jQuery
  • Linux
  • Mac OS X
  • MySQL
  • nginx
  • PHP
  • portfolio
  • Puppet
  • Ruby on Rails
  • Script Reviews
  • SELINUX
  • Software
  • Software Review
  • SQL Server
  • statistics
  • Tech
  • Tomcat
  • Uncategorized
  • VMWARE
  • VPS
  • Windows
  • wordpress
  • Zend Framework

Blogroll

  • DragonAl Flickr
  • Dropbox – Free 2GB Account
  • James' Blog
  • Javascript Compressor
  • PHP Builder Community
  • PHP-Princess.net
  • Rubular – Regular Expression Validator
  • The Scale-Out Blog
  • Tiny MCE

Tags

activation AJAX android antec Apache AWS awstats canon coda codeigniter debian enclosure external free G1 install vmware tools Internet Explorer iphone 5 jquery Linux mx-1 MySQL office 2007 OSX photoshop PHP plugin plugins portfolio redesigned website review rewrite script security SELinux ssh tinymce tutorial upgrade VMWARE vmware server wordpress wordpress mu XSS zend framework
© Copyright 2013 Albertech.net
Infinity Theme by DesignCoral / WordPress
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.