• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Squirrelmail as primary webmail app

mr_exclusive

Basic Pleskian
Hi,

Could someone write a small "HOW TO" install Squirrelmail as primary webmail app?
webmail is not working for me anymore and i don't know how to get squerremail working as primary app. :(

my system suse 10.0x64 plesk 8.1
 
Hi,

You have to know how to use the shell ( like tar, cp, mv, etc), a text editor and a little bit of php.

1. Download and extract squirrelmail in a directory of your choice ( I did in /opt ). Don't forget to install the locales if necessary.

2. Add a new config to apache. For example Create the file /etc/httpd/conf.d/squirrelmail.conf

Code:
<VirtualHost WRITE_YOUR_IP_HERE:80 >
	DocumentRoot /opt/squirrelmail
	Alias /squirrelmail/ /opt/squirrelmail/
	Alias /webmail/ /opt/squirrelmail/
	ServerName sqmail
	ServerAlias sqmail.*
	ServerAlias squirrelmail.*
	UseCanonicalName Off
</VirtualHost>

3. Tell Horde to redirect to sqmail.yourdomain.com by editing the index.php of Horde. You know what file it is by viewing the zz_010_psa...conf file in some apache config dir.

4. Configure squirrelmail with config/config_local.php. Here's a copy pasted sample of mine. Confiugre the VHOST_PATH constant.

PHP:
//Définition du domaine indépendament du préfixe (www, webmail,etc)
// pattern remplacement body
$recherche = "^.*\.(.*\..*)$";
$domaine = EREGI_REPLACE($recherche,"\\1", $_SERVER['SERVER_NAME']);

// Le chemin des vhosts
define ("VHOST_PATH", "/var/www/vhosts/");

/*
 * Data dir
 * C'est le chemin ou sont stockées les infos.
 * Exemple : /var/www/vhosts/domaine.tld/squirrelmail
 * Si il n'existe pas, il est créé
 */

$data_dir = VHOST_PATH .  $domaine . '/squirrelmail' ;
//Have to mkdir the squirrelmail subfolder in each domain folder

5. Create a squirrelmail subfolder in each domain folder to put user prefs and address books.

6 I think that's it !
 
thx for help, squirrelmail is working but it runs only from:

myIPadres/squirrelmail



not working from
mydomain.squirrelmail

and

squirrelmail.mydomain

i have added this:

<VirtualHost WRITE_YOUR_IP_HERE:80 >
DocumentRoot /opt/squirrelmail
Alias /squirrelmail/ /opt/squirrelmail/
Alias /webmail/ /opt/squirrelmail/
ServerName sqmail
ServerAlias sqmail.*
ServerAlias squirrelmail.*
UseCanonicalName Off
</VirtualHost>

of course i have the path changed to location of my sqmail
 
Do you still see Horde instead ?

If this is the case you will have to force Horde to redirect to our squirelmail

vi /usr/share/psa-horde/index.php

$recherche = "^.*\.(.*\..*)$";
$domaine = EREGI_REPLACE($recherche,"\\1", $_SERVER['SERVER_NAME']);
header( 'Location: http://squirrelmail.'. $domaine ) ;
exit;

It is impossible tu use webmail.yourdomain.com because it is already used by Plesk in its config file. You can edit Plesk's config file but your changes will be overwritten next time you add/remove a domain.
 
Hi,

I'm glad to have helped you until now.

Actually I did not install any plugin. I can't help you anymore.

Btw, you should be more precise, what kind of error ? copy/paste is good.
 
Warning: main(../plugins/image_buttons/config.php) [function.main]: failed to open stream: No such file or directory in /srv/www/htdocs/squirrelmail/plugins/image_buttons/setup.php on line 11

Warning: main() [function.include]: Failed opening '../plugins/image_buttons/config.php' for inclusion (include_path='.:/usr/share/php5:/usr/share/psa-horde/pear:/usr/share/php5/PEAR') in /srv/www/htdocs/squirrelmail/plugins/image_buttons/setup.php on line 11
 
Found myself getting frustrated with my inability to seize control of the webmail.* subdomain for use with SquirrelMail (instead of Horde IMP). So instead of utilizing a standalone "squirrelmail.conf" file in the conf.d directory, I used a symlink to hack SquirrelMail into Horde's place. Thus:
Code:
mv /usr/share/psa-horde /usr/share/psa-horde-bak

ln -s /opt/squirrelmail-1.4.9a /usr/share/psa-horde
Voila! True, future Plesk updates might crush my symlink -- but it'll be easy enough to correct at that time.
 
Back
Top