Installing SquirrelMail on server without shell and administrative access.
Check [SquirrelMail requirements]
You should be able to
- add files to webserver document directory
- execute php scripts. See TestPHPSettings
- PHP scripts should be able to connect to your IMAP, SMTP and other used servers.
Optional features:
- Control of PHP settings with .htaccess files
- Access to some SQL database.
You will need
- address and type of IMAP server
- address of SMTP server
Install SquirrelMail files
SquirrelMail is installed by copying scripts to webserver. You should be able to do that with FTP, SFTP or FTP-SSL client programs.
Create configuration file
If you have perl on your own machine, you can run SquirrelMail configuration script (conf.pl) on your machine, adjust your configuration, save it and later upload the file to the webserver. Be sure to put the file into the config folder.
If you don't have perl on your machine, copy config_default.php to config.php and open it in your favorite text editor such as notepad or nano, or in a php editor such as [htmlkit]. You must save the file as plain text, do not use a word processor's document format.
Editing the config file is pretty easy, the comments in the config file do a good job of explaining what each setting is for. Keep in mind that the config file is actually a php program and must contain valid code. Bascially this means that you should only change values that are in quotes and do not alter anything else, especially make sure that you leave the semicolons at the end of the lines. Always save a copy of the original file in case you make a mistake and need to start over.
Unless you used the perl script You will have to change some settings in the config.php file in order to use it on your machine.
1. Default Domain: This is for the email address someone@yourdomain.com
2. Paths to data and attachment directories. They are set in $data_dir and $attachment_dir settings. These MUST be the full path from the root directory of your hard disk, not a path that is relative to your web or ftp directory. The web server MUST have write permission to these directories (your ftp access permissions are not the same as the web server's access permissions). See the comments in the config file for more information about setting the directory permissions.
3. Address of IMAP server. It is set in $imapServerAddress variable. For example:
$imapServerAddress = 'imap.example.org';
4. You may use encryption on IMAP connections, to do this you will have to modify $imapPort and $use_imap_tls settings. For example:
// use imaps port and encryption
$imapPort = 993;
$use_imap_tls = true;
5. Address of SMTP server, SMTP port and SMTP connection encryption settings. You must set $smtpServerAddress, $smtpPort and $use_smtp_tls settings. It is similar to IMAP settings. Encrypted SMTP uses 465 port.
6. Check doc/presets.txt file in SquirrelMail package. If your server is listed there, adjust other settings according to the ones that match your server.
7. Enable administrator's plugin
Find
/**
* To install plugins, just add elements to this array that have
* the plugin directory name relative to the /plugins/ directory.
* For instance, for the 'sqclock' plugin, you'd put a line like
* the following.
* $plugins[0] = 'sqclock';
* $plugins[1] = 'attachment_common';
*/
// Add list of enabled plugins here
in config file and add line with
$plugins[0] = 'administrator';
This line should be added after "// Add list of enabled plugins here" line.
After configuration file is created, upload it to webserver.
Test your configuration
After you uploaded config.php, go to http://your-server/path-to-squirrelmail/src/configtest.php and check if the configuration is correct. Script must pass IMAP connection test.
First login
Go to http://your-server/path-to-squirrelmail/src/login.php and try logging in.You should use login name and password that works in set IMAP server.
Activate administrator plugin
Create a file named admins with your username in it and upload it to the SquirrelMail config directory. Check SquirrelMail options page. If your login matches the one that is written in admins file, you should see administration block in SquirrelMail options page.