Saturday, January 23, 2010

SquirrelMail CAPTCHA

SkyHi @ Saturday, January 23, 2010

Shows how to install the CAPTCHA SquirrelMail plugin by Paul Lesniewski. A CAPTCHA input is placed on the login screen to detect whether or not a human is attempting to log in.

CAPTCHA stands for Completely Automated Public Turing to tell Computers from Humans Apart. It helps prevent automated login attacks.

SquirrelMail1. Connect to your SquirrelMail server and note down its version.
2. Download CAPTCHA 1.1 from the SquirrelMail site. If your version of SquirrelMail is not 1.5.2+ or 1.4.10+, download Compatibility 2.0.11.
File Browser
3. Extract the downloaded files and put them into the /usr/share/squirrelmail/plugins directory.
SquirrelMail Configuration
4. From a Terminal window, type in /usr/share/squirrelmail/config/ and press Enter. This will launch the SquirrelMail Configuration utility.
NoteIf your Terminal window has a white background, make sure that the colors are off by looking for the command Turn color on. If the command is Turn color off, type in C and press Enter to turn the colors off. This will ensure that you will be able to read all of the text.
SquirrelMail Configuration
5. Type in 8 and press Enter to list the Plugins submenu.
SquirrelMail Configuration
6. Install the captcha plugin by typing in the number corresponding to it and press Enter. When you are done, type in q and press Enter to quit then type in y and press Enter to save your changes.
7. Install php-gd by typing in yum install php-gd. PHP-GD is required by almost all captcha backends.
8. In the /usr/share/squirrelmail/plugins/captcha directory, copy the file config.sample.php and save it as config.php. Edit config.php and assign a value to $captcha_backend.
9. If your version of SquirrelMail requires the compatibility plugin, go to /usr/share/squirrelmail/plugins/compatibility and apply the compatibility patch by typing in the command below.
patch -p0 <> Replace 1.4.8 with your SquirrelMail version. 
Service Configuration
10. Restart the httpd service. Learn how to start and stop services here.
11. Connect to your SquirrelMail server, you should see the CAPTCHA in your login page.