How to set up Open WebMail in CentOS

Webmail interface is one of must-have services for any mail server. Most of us are used to native email client software, but what if your favorite client software is not available for any reason? For example, you have left your laptop at home, or your phone's data plan just went dry, or maybe you are just travelling. An alternative way to access a mail service in such cases would be to use the webmail interface of your mail server. As long as there is web browser with Internet connectivity, you should be able to use the webmail interface.

Open WebMail is a lightweight, open-source webmail for Linux. The interface may be a bit old school, but Open WebMail provides the following features.

  • Custom folders
  • Mail filters
  • Changing passwords
  • Automatic mail reply (vacation/out of office responders)
  • Contacts
  • Support for large mailboxes

Open WebMail has its own repository for CentOS/RHEL/Fedora. Package for Debian is available in their site as well. However, as of this writing, the package for Debian does not work on Ubuntu due to dependencies issues.

Updating the Repository and Installing Open WebMail on CentOS

As usual, adding Repoforge repository is always recommended. The official repository for Open WebMail is added as well.

# cd /etc/yum.repos.d
# wget http://openwebmail.org/openwebmail/download/redhat/rpm/release/openwebmail.repo

Now, Open WebMail can be easily set up using yum command.

# yum install openwebmail perl-CGI httpd

Configuring Open WebMail

First of all, the file /var/www/cgi-bin/openwebmail/etc/dbm.conf is updated with the following parameters.

# vim /var/www/cgi-bin/openwebmail/etc/dbm.conf
## the previous values are overwritten ##
dbm_ext                 .pag
dbmopen_ext             none
dbmopen_haslock         no

Then Open WebMail can be initialized with an installed script as follows.

# /var/www/cgi-bin/openwebmail/openwebmail-tool.pl --init

The index.html file for Open WebMail is also prepared by using a soft link.

# ln -s /var/www/data/openwebmail/redirect.html /var/www/html/index.html

[Optional] The domain name for the mail server is defined manually to avoid any future mistakes in the @domain part of the mail address.

# vim /var/www/cgi-bin/openwebmail/etc/openwebmail.conf
domainnames             example.tst

The Apache web server is restarted.

# service httpd restart
# chkconfig httpd on

Finally, Open WebMail can be accessed by pointing the browser to the URL of the mail server: http://mail.example.tst OR http://IP-Address-of-Mail-Server

Some screenshots are provided below.

Open WebMail login page:

Open WebMail interface:

Open WebMail preferences:

Troubleshooting Open WebMail

Open WebMail may generate errors or behave abnormally if specific versions of some Perl packages are not installed. Fortunately, the packages are available in Open WebMail repository and are very easy to install. The following demonstrates how to install problematic Perl packages.

A folder is created to store the packages. It could be any folder.

# mkdir /var/www/data/openwebmail/packages
# cd /var/www/data/openwebmail/packages

Packages are downloaded.

# wget http://openwebmail.org/openwebmail/download/packages/CGI.pm-3.05.tar.gz
# wget http://openwebmail.org/openwebmail/download/packages/MIME-Base64-3.01.tar.gz
# wget http://openwebmail.org/openwebmail/download/packages/Text-Iconv-1.2.tar.gz

Install CGI.

# tar zxvf CGI.pm-3.05.tar.gz
# cd CGI.pm-3.05
# perl Makefile.PL; make; make install

Install MIME.

# tar zxvf MIME-Base64-3.01.tar.gz
# cd MIME-Base64-3.01
# perl Makefile.PL; make; make install

Install Text-Iconv.

# tar zxvf Text-Iconv-1.2.tar.gz
# cd Text-Iconv-1.2
# perl Makefile.PL; make; make install

To sum up, Open WebMail interface may be a bit old school, but it is a complete package pre-built with often needed features. Besides, the installation process is easy, and the interface is very lightweight. Open WebMail is certainly a worthy candidate when a simple webmail interface is needed.

Hope this helps.

Subscribe to Xmodulo

Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.

The following two tabs change content below.
Sarmed Rahman is an IT professional in the Internet Industry in Bangladesh. He writes tutorial articles on technology every now and then from a belief that knowledge grows through sharing. During his free time, he loves gaming and spending time with his friends.
Your name can also be listed here. Write for us as a freelancer.

8 thoughts on “How to set up Open WebMail in CentOS

    • Thanks for the information. However, the official site for the project is still openwebmail.org and the last official version was 2.53. Being open source, anyone, even you or I can take the source code of the software and continue developing where the original software was left off. That's the beauty of open source.

      Thanks again for the information.

  1. wow, an ancient webmail system. I am disappointed that LinuxToday points us to something that has not updated its website since 2006.

    why not Horde webmail? A full featured *modern* interface that is actively updated.

    • Thank you for the input. We have already covered a tutorial on RainLoop previously and hope to continue with other webmail interfaces as well. Now we wouldn't want to leave Open WebMail out of it, would we? Yes, Open WebMail is *ancient*, but I believe it is still one of the few open source webmails that can be a complete package.

      Horde is a good suggestion. Hope to cover Horde as well. Thanks for the input again.

  2. Sometimes, simpler is better. This is the case with OpenWebmail, both the older version and the newer version. What some have called "old school", I call "easy for my parents to use".

    Thanks for this article.

    --SYG

  3. We have been using OpenWebmail for 10+ years with my work (small ISP with email service). It works fine on a small scale, but now with over 5000 customers, 20,000 email addresses, it has serious issues scaling beyond 1000 without major tweaks, it is prone to crashes, server restarts and various other issues. Even with the tweaks and using a somewhat recent 3.00_beta4, the same scaling issues continue. This is why we are looking at the other options like Horde and RainLoop as a replacement.

Leave a comment

Your email address will not be published. Required fields are marked *

Current ye@r *