Move or upload the file to your public_html folder, and extract:
tar -zxvf dracMail-0.1_beta.tar.gz
After PHP, Apache and MySQL have been properly installed and configured, the last step is configuring dracMail itself.
Prepare the MySQL Server:
Login with the root user (or a user with CREATE permissions):
mysql -u root -p
Add a new user: CREATE USER 'WEBMAIL_USERNAME'@'localhost' IDENTIFIED BY 'PASSWORD';
Create a new database: CREATE DATABASE WEBMAIL_DATABASE_NAME;
Select the new database: USE 'WEBMAIL_DATABASE_NAME';
Load the database tables from 'dracmail.sql', found in './api/SQL/': SOURCE ./api/SQL/dracmail.sql;
Add SELECT, INSERT, DELETE and UPDATE permissions for the new user: GRANT SELECT, INSERT, UPDATE, DELETE ON
WEBMAIL_DATABASE_NAME.* TO WEBMAIL_USERNAME@localhost;
Flush privileges: FLUSH PRIVILEGES;
Quit mysql: QUIT;
NOTES: | WEBMAIL_USERNAME, WEBMAIL_DATABASE_NAME and PASSWORD should be changed to your own. |
Change the current directory to the API directory:
cd ./api/
Prepare the configuration file:
cp configuration.php.sample configuration.php
Edit using your favourite editor, and change the following settings:
IMAP Server configuration:
define('IMAP_SERVER_HOST', "
localhost"); // Your server hostname, default to 'localhost'
define('IMAP_SERVER_PORT', "
143"); // Your server port, default to 143
MySQL Server configuration:
define('MYSQL_HOST', '
localhost'); // Your MySQL server hostname, default to 'localhost'
define('MYSQL_USER', '
WEBMAIL_USERNAME'); // Your webmail username
define('MYSQL_PASS', '
PASSWORD'); // Your webmail user password
define('MYSQL_DB', '
WEBMAIL_DATABASE_NAME'); // Database name, default to 'dracmail'
NOTES: | First time login will create default user folders if they do not exist. To configure the process you can have a look at the $folderMapping variable in the configuration file. |
| Once the installation is done, be sure to remove the sample configuration file (api/configuration.php.sample). |
That's it. The installation is done.