Using OpenWebMail 2.50 & Apache Alias's

modem

Verified User
Joined
Apr 7, 2004
Messages
355
Hello all,

I've ran into an issue that is maybe a bit unque to my situation. I'm wanting to install a new webmail/email program to allow my customers a better way of getting email. SquirrelMail and UebiMiau!, which while they work, I like OpenWebmail (www.openwebmail.org) much better, has much better handling of mail files etc.

I installed OpenWebMail just fine into the /var/www/cgi-bin/openwebmail area. My goal is to have OpenWebMail work like the other mail programs by having some sort of an Alias or ScriptAlias or something similiar inside of httpd.conf to redirect to the openwebmail.pl cgi file. That way a user can goto his or her browser and type in: www.mydomain.com/openwebmail and have OpenWebMail load just fine. Currently on my system SquirrelMail and UebiMiau use this manner for being accessable as you can see in the alias below:

Alias /webmail /var/www/html/webmail/
Alias /squirrelmail /var/www/html/squirrelmail/

This works great for these webmail systems because they are html/php based so a simple redirect to their installation folders. What I have discovered with OpenWebmail is that it's a CGI-BIN based webmail program and there isn't any index.html/php type of files to point directly too in a folder. The default file that is the login page is openwebmail.pl. I have tried creating some of the following lines inside of apache, running the command #service httpd restart and seeing if it works... to no avail.

Alias /openwebmail /var/www/html/openwebmail/
ScriptAlias /openwebmail /var/www/cgi-bin/openwebmail/openwebmail.pl
ScriptAliasMatch ^/cgi-bin/openwebmail/(.*) /var/www/cgi-bin/openwebmail/$1

Since this is a CGI program I know I can't make everyone's ScriptAlias /cgi-bin/ go from /home/username/domains/domainname.com/public_html/cgi-bin to /var/www/cgi-bin because that'd really mess up stuff.

I can't figure out how using Apache to create a global Alias that redirects to the /var/www/cgi-bin/openwebmail/openwebmail.pl file. I would like for this to be global so that each new virtual domain that is added down the road for each new customer is given the ability to use OpenWebMail.

Any ideas? Thoughts? Suggestions? Help?

Brad
 
Last edited:
As for CGI scripts this ain't going to work. CGI scripts are executed with suexec as the user. And because of the basedir restrictions he won't be able to access /var/www. Further more the cgi files aren't owned by that specific user so they can't access them..
 
You can setup the following in /etc/httpd/conf/httpd.conf

ScriptAlias /cgi-sys/ /var/www/cgi-bin/

give the cgi the following permissions:

chmod 4755

The problem I have run into is that I have to comment out /user/group in the respective domain/user's httpd.conf

I just started playing with thos tonight. I believe there is a better way to do this and keep suexec intact.
 
Sorry, I see you problem. I have openwebmail setup the way you want on a different system. There is a custom cgi (index.cgi) that supplies the neccessary info and invokes openwebmail.pl

Have you looked on the openwebmail forum? I do not like openwebmail as it is a resource hog and is only a mail program. But it is a good one. I am installing the new Horde/IMP on my DA servers.

Try this link:

http://openwebmail.org/forum/viewtopic.php?t=723&highlight=global+cgi

http://openwebmail.org/forum/viewtopic.php?t=937&highlight=scriptalias
 
Last edited:
Back
Top