Drupal + Postfix Integration Under Ubuntu 8.04 (Hardy) - Page 4
On this page
Drupal Installation and Configuration
We will download and install Drupal 6.x. Then we will download and install Mailfix module (http://drupal.org/project/mailfix) which as of this writing is only available for Drupal version 6.x.
Drupal files will be unpacked in /var/www/example.com.
As of this writing, current version is 6.4, thus the target file would be drupal-6.4.tar.gz. Just keep in mind that you must replace the 6.x part with the appropriate Drupal version.
tar -xvzf drupal-6.x.tar.gz
mv drupal-6.x example.com
mkdir -p sites/all/modules
tar -xvzf mailfix-6.x-1.1.tar.gz
chown -R www-data.www-data example.com
Now we need to create the Drupal database, which will be named as drupal_example_com in our tutorial and will be accessible with full privileges by user [email protected]:
mysql> create database drupal_example_com;
Query OK, 1 row affected (0.00 sec)
mysql> grant all privileges on drupal_example_com.* to drupal_example_com @localhost identified by 'secret' with grant option;
Query OK, 0 rows affected (0.00 sec)
Web interface configuration can proceed by accessing http://www.example.com directly. Follow the instructions on screen to setup your Drupal site.
The next task to accomplish is to create your first Drupal account, which will be granted total administrative privileges. Remember we asked you to write down your Drupal credentials before? Well, this is where you're expected to apply them.
Then we configure cron entry for Drupal self-maintenance:
# Example Drupal site cron 49 * * * * /usr/bin/wget -O - -q http://www.example.com/cron.php &> /dev/null
The &> /dev/null part is intended to reduce mail alerts issued by crontab.
Now we configure uploaded files directory. This is also a matter of personal taste. We prefer those files to be transferred by Drupal, so they must reside outside the /var/www/example.com directory. We create /var/drupal_files directory for this purpose and make it writable by Apache daemon:
mkdir -p drupal_files/example.com
chown -R www-data.www-data drupal_files/
Inside Drupal we configure the File System with this structure in mind:
- File System Path: /var/drupal_files/example.com
- Download Method: Private
You may proceed to install and configure the Mailfix module:
- Go to Administer ? Site building ? Modules
- Enable the Mailfix module
From here you may add all mail domains your Drupal system is intended to control:
- Go to Administer ? Site Configuration ? Mailfix domains
- Then go to Add domains
The Mailfix documentation is self-explanatory.