HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   General (
-   -   HELP with symlink to webmail (

jbryner 29th June 2009 06:48

HELP with symlink to webmail
This might be a completely backwards way of going about it, but I was trying to get set up so that the users could get to webmail by going to

So, I created a link in the users web directory that points to /var/www/webmail/

Now here's the catch I run into.

I have 5 domains set up, and some work with

there are 2 domains that won't load the login for squirrel mail, they return a 403, forbidden error page.

This seems really odd to me, and I haven't been able to track it down, as the domains are set up identically except for name, and it wouldn't seem that the permissions would foul up one, and not the other.

Any help would be greatly appreciated, as the domains that wont load the webmail sections are for my "high maintenance" clients. It figures I suppose.

I really want to be off the windows server I have been running up til now, and a solution for this one will allow me to get away from Bill and hte gang..

Thanks guys.

till 29th June 2009 09:43

You can use symlinks only on webspaces were you use either mod_php or php-cgi / fcgi without suexec. Otherwise you will get a permission error as the security settings in suphp and suexec prevent the execution of code that is outside of a website.

jbryner 30th June 2009 06:17

Thanks Till
Makes sense, and after testing works like a charm. I did come up with another solution in searching, and it is found in this thread

Near the end of the first page of the thread, fastgrav explains that adding the following


add the following lines in /etc/apache2/conf.d/apache2-doc

Alias /webmail /usr/share/squirrelmail/

<Directory "/usr/share/squirrelmail/">
Options Indexes FollowSymlinks
AllowOverride None
Order allow,deny
Allow from all
AddDefaultCharset off

and every virtual domain will have a

and it works great without relying on having to worry too much about the settings per domain.

till 30th June 2009 10:34

But this has the same limitations then the other solution. It wont work with suphp and it wornt work with suexec as it relys on the settings of the domain were you call it trough.

voidzero 5th July 2009 13:20

My solution is this:
  • The maildomain (MX) is
  • When this domain is opened you normally get /var/www/index.html saying 'It Works!'
  • So I added this .htaccess file and set the default config to AllowOverride All (since it's only editable by root anyway):

RewriteEngine On
RewriteBase /
Options +FollowSymlinks
RewriteCond %{HTTP_HOST} ^mail\. [NC]
RewriteRule .* http://my-main-ispconfig-url/webmail/src/login.php [R=301,L]

Redirect /mail http://my-main-ispconfig-url/webmail/src/login.php

Now people can open the URL at and also, unconfigured but working domains can be opened at

Hope this helps! :cool:

All times are GMT +2. The time now is 21:03.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.