Squirrelmail Package!

Discussion in 'Tips/Tricks/Mods' started by bkrausz, Jun 16, 2006.

  1. bkrausz

    bkrausz New Member

    Well, this forum (and ISPConfig in general) made my life loads easier, so I figured it was time to give back to the community. Well, actually, I wanted to get SquirrelMail installed, and it was pretty easy to make a package.

    http://nerdlife.net/ispconfig/squirrelmail.pkg

    Tested on the latest release of ISPConfig under Debian Sarge. It doesn't conflict with other webmail packages, so feel free to install it for the sake of poking around.

    How's it work for you guys?

    --Brian
     
  2. till

    till Super Moderator

    Thanks for the package :)

    May I make the package available for download on the ISPConfig website?
     
  3. alexnz

    alexnz New Member

    working perfectly, thank you!
     
  4. bkrausz

    bkrausz New Member

    no problem...that's why i made it.

    fyi this package uses the full email address for logins...it looks at virtusertable (vlogin mod)
     
    Last edited: Jun 19, 2006
  5. Brenton

    Brenton New Member

    Ubuntu 5.10

    Hi

    Would this work on a Perfect Install - Ubuntu 5.10 as is? Or would I have to make any adjustments to the .pak file?

    Been waiting for this. Thank you very much for making this available.

    Regards
    Brenton
     
  6. till

    till Super Moderator

    The .pkg files are working for all linux distributions and can be installed with the ISPConfig update function.
     
  7. Brenton

    Brenton New Member

    Thanks for your reply till, I've installed the .pkg file and it works great.

    One more question, if I want http://mail.domain.com to point to the Squirrelmail how would I go about it?

    I apologise for these basic questions, but I'm doing this on a production server and am having to be very careful.

    Regards
    Brenton
     
  8. falko

    falko Super Moderator

    You can do it with a PHP header redirect:

    PHP:
    <?php
    header
    ("Location: https://www.example.com:81/squirrelmail"); /* Redirect browser */

    /* Make sure that code below does not get executed when we redirect. */
    exit;
    ?> 
    Replace squirrelmail with the real directory.
     
  9. bkrausz

    bkrausz New Member

    You can also just setup a forward in the co-domains option to redirect mail.something.com to that site.

    What I've been wondering is if there's a way to do this for all mail.*, so that all clients can go to mail.theirdomain.com and be redirected without having to manually set it.
     
  10. todvard

    todvard ISPConfig Developer

    you can create a virtualhost in Apache (not in ISPConfig) with this content:

    <VirtualHost 192.168.1.1:80>
    ServerName mail.*:80
    ServerAdmin webmaster@domain.com

    DocumentRoot /var/www/sharedip

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^webmail..+..+$ [NC]
    RewriteCond %{HTTP_HOST} !^mail.domain.com$
    RewriteRule ^(.*)$ https://webmail.domain.com$1 [R=301]

    </VirtualHost>

    It will redicrect all incoming querys from http://mail.* to https://webmail.domain.com (of course, "webmail" hosname in domain.com domain should exist, and "mail" host in all domains too, you can create them in DNS Manager)
     
    Last edited: Jun 21, 2006
  11. falko

    falko Super Moderator

  12. monster

    monster New Member

    Do i have to insert this for every domain i add?
     
  13. till

    till Super Moderator

    No, only once for every IP you use for webhosting on your server.
     
  14. todvard

    todvard ISPConfig Developer

    no, only once as a new apache virtualhost:

    STEP 1.: create a new web in ISPconfig, with name mail.YOURDOMAIN.COM. Install Squirrelmail into this web. Make sure it is working, accessible from outside and you can log in. Create SSL certificate for this website if you would like to log in to webmail through HTTPS.

    STEP 2. create a new virtualhost in apache (eg.: /etc/apache2/sites-available/webmail.conf) with this content:

    Code:
    <VirtualHost 192.168.1.1:80>
    ServerName mail.*:80
    ServerAdmin [email]webmaster@YOURDOMAIN.COM[/email]
    
    DocumentRoot /var/www/sharedip
    
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^webmail..+..+$ [NC]
    RewriteCond %{HTTP_HOST} !^mail.YOURDOMAIN.COM$
    RewriteRule ^(.*)$ https://mail.YOURDOMAIN.COM$1 [R=301]
    
    </VirtualHost>
    Note: replace IP address with your IP address and YOURDOMAIN.COM with your domain name. If you dont want to server webmail over HTTPS replace
    RewriteRule ^(.*)$ https://mail.YOURDOMAIN.COM$1 [R=301] with
    RewriteRule ^(.*)$ http://mail.YOURDOMAIN.COM$1 [R=301]

    STEP 3. link it to sites-enabled:
    Code:
    ln -s /etc/apache2/sites-available/webmail.conf /etc/apache2/sites-enabled/webmail.conf
    STEP 4. go back to ISPconfig - DNS Manager and create "webmail" host for every domain which should access your webmail site through webmail.OTHERDOMAIN.COM
     
  15. admiral

    admiral New Member

    Great package, but still have a small question on allowing other domains to use. In the directions outlined below, Step 1 states the following:

    Install Squirrelmail into this web. Make sure it is working, accessible from outside and you can log in.

    What do you mean install Squirrelmail into this web. If you install the pkg through ISPConfig, it is installed just once. How do you install it per domain? Thanks.
     
  16. till

    till Super Moderator

    Todvard did not use the .pkg file available for ISPConfig. He created a website in ISPConfig and installed the tar.gz version of Squirrelmail available on the squirrelmail project page.
     
  17. Hans

    Hans Moderator

    squirrelmail package on ispconfig website

    I guess Till is a very busy man ;)
    He still did not put the squirrelmail package on http://www.ispconfig.org/downloads.htm

    To put it there would be nice or ...
     
  18. falko

    falko Super Moderator

  19. till

    till Super Moderator

    Sorry, I totally forgot it.
     
  20. Hans

    Hans Moderator

    Thanks a lot Falko & Till.
     

Share This Page