Adding spell-checking to SquirrelMail
20 June 2002 Updated 1 November 2002
![]() |
iSpell 3.2.06We tested a fresh installation of iSpell 3.2.06 with Mac OS X 10.2 (with the latest Developer Tools and BSD SDK) along with SquirrelMail 1.2.7 (as distributed with Mac OS X Server 10.2) and found no problems installing or running the software. |
While any good Mac OS X Web browser has a built-in spell checker due to the underlying goodness that Apple put into the OS, for those of us less fortunate that aren’t using Mac OS X to communicate with SquirrelMail, a spell check function can come in quite handy.
Luckily, the good folks that put together SquirrelMail have included support for a venerable UNIX spelling system by the name of Ispell. While you might think this name was inspired by the Apple applications of the same prefix, Ispell has been around in one form or another for over thirty years. Plus, the addition of Ispell to your system will allow you to keep custom dictionaries for your Web mail accounts.
First of all you need to download the source code.
curl -O http://fmg-www.cs.ucla.edu/geoff/tars/ispell-3.2.06.tar.gz
Then unpack it using the commands below.
gnutar -xzvf ispell-3.2.06.tar.gz cd ispell-3.2.06
Now you need to make a very minor change to the source code before you can compile.
cp local.h.samp local.h
This duplicates the config file; now you need to make it writable because you are going to make some changes to it.
chmod 777 local.h
Now you need to either use vi or emacs, or open it up in TextEdit with the command
open -e local.h
Take out the “local” in these lines at the end of the file:
#define BINDIR "/usr/local/bin" #define LIBDIR "/usr/local/lib" #define MAN1DIR "/usr/local/man/man1" #define MAN4DIR "/usr/local/man/man4"
So that they look like this:
#define BINDIR "/usr/bin" #define LIBDIR "/usr/lib" #define MAN1DIR "/usr/man/man1" #define MAN4DIR "/usr/man/man4"
Add the following line to the end of the file:
#define TERMLIB “-lcurses"
Save your changes and make a tweak to your environment:
setenv TMPDIR /tmp
Finally a little bit of housekeeping:
sudo mkdir /usr/man touch ispell.4
And you are ready to make and install Ispell with the commands below.
make all sudo make install rehash
This will install Ispell, but it won’t be available to SquirrelMail because the zsh shell can’t find it in the default path. Make a symlink for Ispell to somewhere that it can be seen, with the command below.
sudo ln -s /usr/local/bin/ispell /sbin/ispell
Now, give it a whirl in SquirrelMail. If you haven’t already added the Ispell plug-in, you will need to rerun the Perl configuration script that you ran to setup SquirrelMail in the first place. Go to the Plugins section and add squirrelspell.
Try it out in a Web browser. If you get any errors, play with your permissions in the squirrelspell plugins directory of your SquirrelMail installation.
