Drupal + Postfix Integration Under Ubuntu 8.04 (Hardy) - Page 2
Install All Required Packages
You can use either apt-get or aptitude. We prefer aptitude. First of all update your repository tree ("u" command). Then ensure that the following packages are installed:
amavisd-new apache2 build-essential cabextract clamav-daemon debhelper dovecot-imapd dovecot-pop3d dpatch elinks fakeroot libcdb-dev libclass-dbi-mysql-perl phpmyadmin libapache2-mod-php5 libdb-dev libgdbm-dev libldap2-dev libmysqlclient15-dev libpam-mysql libpam-smbpass libpcre3-dev libpq-dev libsasl2-2 libsasl2-modules libsasl2-modules-sql libsasl2-dev libssl-dev mutt mysql-server nomarch openssl pax php5 php5-dev php5-mysql php-pear postfix postfix-doc postfix-mysql sasl2-bin spamassassin squirrelmail squirrelmail-decode vim vim-runtime
When asked about configuration options proceed as follows (replace example.com with appropriate domain):
MySQL root password: opensesame
Postfix Configuration: Internet Site
System Mail Name: example.com
phpMyAdmin Configuration: apache2
If you are a vim user, you may want to enable vim syntax highlighting by uncommenting the syntax on line in /etc/vim/vimrc configuration file:
vim /etc/vim/vimrc
syntax on
Apply the Quota Patch to Postfix
We need to download Postfix sources, apply the quota patch, build new .deb packages and install them.
cd /usr/src
apt-get source postfix
Now we download the Postfix Virtual Delivery Agents (VDA) patches by Anderson Nadal (http://vda.sourceforge.net/). Keep sure you are downloading the appropriate version for your server. If in doubt, the following command will display your Postfix version:
postconf | grep ^mail_version
mail_version = 2.5.1
In our case we download the patch for version 2.5.1:
wget http://vda.sourceforge.net/VDA/postfix-2.5.1-vda-ng.patch.gz
gunzip postfix-2.5.1-vda-ng.patch.gz
This should unpack the postfix-2.5.1-vda-ng.patch file which must be applied in order to have support for user quota.
cd postfix-2.5.1
patch -p1 < ../postfix-2.5.1-vda-ng.patch
dpkg-buildpackage
If you see the following message once the compilation ends, don’t worry, it’s as expected:
dpkg-buildpackage: warning: Failed to sign .dsc and .changes file
Now move to the upper directory, where the freshly genereated .deb files reside:
cd ..
ls -1 *.deb
postfix_2.5.1-2ubuntu1.1_i386.deb
postfix-cdb_2.5.1-2ubuntu1.1_i386.deb
postfix-dev_2.5.1-2ubuntu1.1_all.deb
postfix-doc_2.5.1-2ubuntu1.1_all.deb
postfix-ldap_2.5.1-2ubuntu1.1_i386.deb
postfix-mysql_2.5.1-2ubuntu1.1_i386.deb
postfix-pcre_2.5.1-2ubuntu1.1_i386.deb
postfix-pgsql_2.5.1-2ubuntu1.1_i386.deb
(The actual versions of your compiled packages may differ slightly.)
Then we install patched postfix and postfix-mysql packages:
dpkg -i postfix_2.5.1-2ubuntu1.1_i386.deb
dpkg -i postfix-mysql_2.5.1-2ubuntu1.1_i386.deb