OpenWebMail Installation


2015/11/15 - Openwebmail-2.54 does not work in Fedora 22 anymore. Please upgrade to version 3.00_beta4.

This howto is for OpenWebMail-2.54 and is rather old. The new version is OpenWebMail-3.00Beta_4. Although it is a beta, still it is quite stable. I recommend that you use this instead.

The official webpage of OpenWebMail is now:

You can find there instructions on how to install OpenWebmail in Fedora, Debian, FreeBSD, Slackware and Ubuntu.

Fr. Visminlu Vicente L. Chua, S.J.

The latest stable release of OpenWebMail is 2.53. You can download it here:

Fedora 16

If you are using speedycgi with openwebmail, you need to uninstall speedycgi before you can upgrade to Fedora 16:

yum remove speedycgi

After upgrading you need to install the new rpm package compiled for Fedora 16:

yum install speedycgi-2.22-4.fc16.i686.rpm

If you are using quota with openwebmail you also need to update as the older version will not work anymore:

yum update perl-Quota-1.6.7-1.i386.rpm

You may download these rpm packages here.

Fr. Visminlu Vicente L. Chua, S.J.

openwebmail-2.53 and fedora 14

Fedora 14 comes with perl-5.12 and perl-5.12 does not support suid anymore. The problem is that openwebmail requires suid root to function properly. In this situation, you need to use c-wrappers.

Before using c-wrappers, if you are using speedycgi, please uninstall it and install the new speedycgi rpm that I built. If you want to use speedycgi (strongly recommended) please download it here and install.

Change all the shebangs of /var/www/cgi-bin/openwebmail/openwebmail*.pl to:


Now to the c-wrapper: download

Change mode to executable:

chmod 777


./ /var/www/cgi-bin/openwebmail/openwebmail*.pl
cd /var/www/cgi-bin/openwebmail
chmod 4755 openwebmail*.pl

With perl-5.12, the db format has changed. So there is need to change /var/www/cgi-bin/openwebmail/etc/dbm.conf:

cd /var/www/cgi-bin/openwebmail/etc/. Edit dbm.conf as follows:

  F13: perl-5.10 F14: perl-5.12
dbm_ext .db .pag
dbmopen_ext .db none
dbmopen_haslock no no

Initialize openwebmail:

cd /var/www/cgi-bin/openwebmail
./ --init

You also need to re-index all users db to the new format:

./ --alluser --index

Notice that perl-5.12 has deprecated the use of defined(%hash) and defined(@array). But openwebmail uses these functions extensively, so expect a lot of reminders in your apache's error_log file.

But do not worry, openwebmail will work just fine.

Fr. Visminlu Vicente L. Chua, S.J.

As we are using Fedora 8 Linux distribution, this installation howto is primarily for Fedora 8. But this can also be applied to RedHat and other Fedora versions.

I have just upgraded to Fedora 9 and the following are some difficulties that I have encountered and how I solved them:

  1. If you are using SpeedyCGI, your installed SpeedyCGI will not work after upgrading to Fedora 9. Recompiling the package downloaded from will not work either.

    What I did was to download the source rpm from and applied all the patches to the original SpeedyCGI and recompile. You can download this rpm file from here.

    Delete the installed SpeedyCGI and install the new one:

    rpm -e speedycgi
    rpm -Uvh Fedora-9-speedycgi-2.22-1.i386.rpm
    cd /usr/bin
    cp speedy speedy_suidperl
    chmod 4555 speedy_suidperl

    Note that I have configured this program to put all speedy files in /var/log/openwebmail/ instead of the default /tmp, so you need to manually create /var/log/openwebmail:

    cd /var/log
    mkdir openwebmail

  2. If you are using openwebmail's, the installed perl-Quota also does not work anymore. I have compiled a new version which I also made available here. Just install it:
    rpm -Uvh perl-Quota-1.6.2-1.i386.rpm

Openwebmail is written in perl. So it requires that the perl package should be installed. Besides the perl package, OpenWebMail also requires the following perl modules:


Fortunately, the perl package offered by Fedora 8 already contains all the above perl modules.

Openwebmail also requires the following programs:


Fedora 8 has the above 3 programs. So if you have not installed them, you can find them in the installation CD or just use yum to install them.

Now we will begin the OpenWebMail installation. I presume that the OpenWebMail program file is at:


o First change to the apache root directory:

cd    /var/www

o Untar openwebmail-2.53.tar.gz (note the options used).

tar    -zxvBpf    /root/openwebmail-2.53.tar.gz

o Two directories are created after untar:


o Move the openwebmail sub-directory under data to html/

mv    data/openwebmail    html/

o Delete the already empty sub-drectory data:

rmdir    data

o Now we have to edit the OpenWebMail configuration file:

Edit /var/www/cgi-bin/openwebmail/etc/openwebmail.conf, and change the following parameters:

mailspooldir    /var/mail
== >                 /var/spool/mail
ow_cgidir    /usr/local/www/cgi-bin/openwebmail
== >            /var/www/cgi-bin/openwebmail
ow_htmldir    /usr/local/www/data/openwebmail
== >              /var/www/html/openwebmail

Add:   spellcheck   /usr/bin/aspell -a -S -w "-" -d @@@DICTIONARY@@@ -p @@@PDICNAME@@@
           spellcheck_pdicname    .aspell_words

To display the email message in the charset defined in the email header, add:

default_readwithmsgcharset    yes

If your server has quota enabled, then add:


Note that if you want OpenWebMail to use quota, you need to install the perl quota module. You can download the latest source program at:

Execute the following commands:

cd   /var/www/cgi-bin/openwebmail/etc/
cp   defaults/dbm.conf   .
Edit dbm.conf and change:

dbm_ext    .db
dbmopen_ext    none   ==>   .db
dbmopen_haslock    no

Execute the following commands:

cd   /var/www/cgi-bin/openwebmail/etc/
cp   defaults/auth_unix.conf   .
Edit auth_unix.conf

passwdfile_encrypted     /etc/master.passwd
==>                                /etc/shadow
passwdmkdb      /usr/sbin/pwd_mkdb
==>                     none
check_shell     no     ==>     yes

After editing the configuration files, execute:

/var/www/cgi-bin/openwebmail/ --init

This program will initialize openwebmail and will check if "dbm_ext, dbmopn_ext and dbmopen_haslock" are correct. If there is any error, follow the instructions given.

That's all. Now you can link to:

If you find the URI a little too long and just want to type:

then do the following:

cd    /var/www/html/openwebmail
rm    -f    index.html
mv    redirect.html    index.html

If you find that openwebmail is a little too slow, I suggest that you use SpeedyCGI instead of suidperl.

o First, download the source program CGI-SpeedyCGI-2.22.tar.gz at:

o Untar, compile, install:

tar xvfz CGI-SpeedyCGI-2.22.tar.gz
cd   CGI-SpeedyCGI-2.2
perl Makefile.PL

When the message appear: Compile mod_speedycgi (default no)?    just press Enter.
Edit speedy/Makefile. In line 150 (DEFINE = -DSPEEDY_PROGRAM) add -DIAMSUID at the end of the line.

make test

If there is no error:

make install

Or you may want to build an rpm instead. Before building the rpm, edit util/build_rpms.

Line 80: Serial: $serial ==> delete this line
Line 81: Change Copyright ==> License

make package

Warning! 'rpm' may core dump if you are not root.
Hit enter to continue: <ENTER>
Linux distribution [RedHat]: fedora
Distribution version [package redhat-release is not installed]: 8
RPM Release [1]: <ENTER>

This will produce binaries/fedora-8-speedycgi-2.22-1.i386.rpm. Install:

rpm -Uvh fedora-8-speedycgi-2.22-1.i386.rpm

o Openwebmail requires a suid root speedy program. So after installing SpeedyCGI:

cd    /usr/bin
cp   speedy   speedy_suidperl
chmod   4555   speedy_suidperl

Now you will want OpenWebMail to use speedy_suidperl instead of suidperl. Change directory to:

cd   /var/www/cgi-bin/openwebmail

o To use SpeedyCGI you need to change all openwebmail*.pl shebang from:

#!/usr/bin/suidperl -T

and change to:


You can do this manually, of course. But it will take a little time. I suggest that you write a script (named ch2speedy) in /var/www/html/openwebmail:

for name in open*.pl; do
   if [ "$name" != "" ]
      cp -a $name ${name}.old
      sed -e "s@suidperl -T@speedy_suidperl@" < ${name}.old > ${name}

Please refer to:

Make ch2speedy executable:

chmod   700   ch2speedy

Execute ch2speedy:


o Test your openwebmail installation using SpeedyCGI. If everything is working fine, you may delete all *.old files:

rm -f *.old

Fr. Visminlu Vicente L. Chua, S.J.
Updated: 2011/12/14