Simple rezolution to domain.tld/webmail to mail.domain.tld

Discussion in 'Installation/Configuration' started by robilaur, Mar 6, 2009.

  1. robilaur

    robilaur New Member


    Many of u ar tryng to change the domain.tld/webmail to webmail.domain.tld.
    So I have tryed for adout a week to come up fith something ar the results.

    After installing squirrlemail there is a comand line in the how to install ISPConfi 3 tutorial and namely this
    ln -s /usr/share/squirrelmail/ /var/www/webmail
    . ok u can make that comand and configure you mail client. After that make a new client in ISPConfig with a new site and the domain webmail.domain.tld.
    After this the folder /var/clients/client(nr)/web(nr)/web is creted "where nr is number".
    ln -s /usr/share/squirrelmail/* /var/clients/client(nr)/web(nr)/web
    Now seting permisions
    chmod +x /var/lib/squirrelmail/*
    chown -R web(nr) /var/lib/squirrelmail
    So thats about it.

    Hope it works for u to.

    If this works send some feedback or thanx :D
    Last edited: Mar 13, 2009
  2. Up2NoGood

    Up2NoGood New Member

    Some additions

    Hi All

    Firstly thank you Robilaur for this great post, I have been trying for a while to sort this. I hope you do not mind but may I make some additions to your post that may help others that are trying to achieve this and also enable Squirrelmail over HTTPS.

    firstly I have posted my system spec so that if any one has similar then they will now that this works:

    Debian 5 Lenny
    ISPConfig 3 RC2
    Falkos (Perfect server setup for the above operating system)

    I followed Robilaurs instructions but just to clarify some things.

    ln -s /usr/share/squirrelmail/* :/var/clients/client(nr)/web(nr)/web
    On a Dabian system you have to include /www in the symlink.

    ln -s /usr/share/squirrelmail/* :/var/www/clients/client(nr)/web(nr)/web
    Also following Squirellmail's recommendations the command:
    chmod +x /var/lib/squirrelmail/*
    Should be:
    chmod 775 /var/lib/squirrelmail/
    And you should also change the permissions of the users .pref folder otherwise you will get an error when trying to log in

    So change the .pref folder to:
    chmod 664 [email protected]
    Now if you enable a site to have SSL then create an SSL certificate for it.

    now create a redirect by selecting redirect type (R) and redirecting to Https:// This means that if a user types in Http by accident it will auto direct to Https.

    You can now delete the old /webmail folder as it is no longer used.
    rm -r /var/www/webmail
    That's it.... just for cleanliness sake only, restart Apache just to be on the safe side
    /etc/init.d/apache2 restart
    I hope this clarifies a few things and also helps out others in the same boat.

  3. Antennipasi

    Antennipasi ISPConfig Developer ISPConfig Developer

    this is due recent change of default webfolder location.
    change was made 02-Mar-2009. if one has not updated from SVN after that, Robilaur's original symlink works.
  4. robilaur

    robilaur New Member

    Hy all..... well thanx for the addition that u made...i was hoping that some of u whould come with additions so ve can make this work as good as it can.
    Thanx again
  5. id10t

    id10t Member

    Even better would be a rewrite rule on the webserver level -

    RewriteEngine on
    RewriteCond    %{REQUEST_FILENAME}  -d
    RewriteRule    ^(.+[^/])$           $1/  [R]
    RewriteRule   ^/webmail/ [R,L]
    Stick this in the "optional" section at the bottom of the site page in ispconfig and it will take all requests to a directory with no trailing / (this converts /webmail to /webmail/), and then takes /webmail/, and /webmail/* and redirects them to
    Last edited: Mar 9, 2009

Share This Page