back

        ECM2 on Intel based Leopard (OS X 10.5.2+) Server

Apple missed the header files for MySql from the Leopard Server DVD. Download and follow it's instruction.
http://www.opensource.apple.com/darwinsource/other/MySQL-43.binaries.tar.gz
Download and install Xcode 3.00.
Turn on Mysql and php5 via Server Admin.

1. Download and install the following Intel Leopard based packages:

package

exim_4.69

 

package

courier-authlib-0.62.2

 

package

Courier-IMAP_4.4.1

 
package

sqwebmail_5.3.1

 

package

ClamAV_0.95.1

 

package

ecm2Admin 5-1-2008

 

package

sa_startup

 

package

GMP_4.2.2

 

package

PCRE-7.6

 

2. Login to terminal as root to initialize perl and install some required modules:

cpan
install Bundle::CPAN
install HTML::Parser
install Net::DNS
quit

 Build and install DBI-1.604 and DBD-mysql-4.006:

curl -O http://cpan.mirror.clemson.edu/authors/id/T/TI/TIMB/DBI-1.604.tar.gz
gunzip DBI-1.604.tar.gz
tar -xvf DBI-1.604.tar
cd DBI-1.604
perl Makefile.PL
make
make test
make install

To build DBD-mysql-4.006, create a database called "test" and replace 'testpassword' with your mysql root password.

curl -O http://ftp.daum.net/CPAN/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.006.tar.gz
gunzip DBD-mysql-4.006.tar.gz
tar -xvf DBD-mysql-4.006.tar
cd DBD-mysql-4.006
perl Makefile.PL --testdb=test --testuser=root --testpassword=secret
make
make test
make install

Install PEAR and PEAR DB:

curl http://pear.php.net/go-pear > go-pear.php
php -q go-pear.php

During PEAR installation you can type in the name of the directory where you want PEAR installed. Alter the location for prefix and binaries as follows:

1. Installation prefix ($prefix) : /usr/lib/php

3. Binaries directory : /usr/bin

Towards the end of the installation process confirm "Y" to add an include_path to your php.ini file.

Would you like to alter php.ini </private/etc/php.ini>? [Y/n] : y

Which will add the following to php.ini.

include_path=".:/usr/lib/php/PEAR"

Continue to install PEAR DB

pear install DB

3. Installng SpamAssassin

sudo cpan
install Mail::SpamAssassin
quit

4. ECM2Admin

ecm2Admin should be in your home (root) directory unpacked:

Set up MySql database via terminal:

mysql -u root -p
mysql> CREATE database ecm2_db; 
mysql> use ecm2_db;
mysql> \. /private/var/root/ecm2Admin/ecm2_db.sql
mysql> quit

After you finished with mysql installation, move the "ecm2Admin" folder to wherever you serve files via apache.

5. Configuration files

EXIM: Open exim "configure" file and edit the top part of "Main configuration Setting":

open -e /usr/local/exim/configure

Fill in username and password, server ip number and your primary hostname:

SERVER_IP = 0.0.0.0
primary_hostname = example.com
hide mysql_servers =
localhost::(/var/mysql/mysql.sock)/ecm2_db/username/password

COURIER (Authlib): Open courier "authmysqlrc" file to edit the following lines near the top:

open -e /usr/local/courier-authlib/etc/authlib/authmysqlrc
MYSQL_USERNAME username
MYSQL_PASSWORD password

SPAMASSASSIN: Open SA's "local.cf" file and edit with appropriate values:

open -e /private/etc/mail/spamassassin/local.c
MYSQL_USERNAME
MYSQL_PASSWORD

ECM2ADMIN: Open "config.inc.phpf" file and enter database username/password:

open -e /Library/WebServer/ecm2Admin/config/config.inc.php
MYSQL_USERNAME
MYSQL_PASSWORD

6. Fixing logging for courier

Apple's mail.log needs to be fixed in order to show courier logging. Login as root to your terminal and open syslog.conf file.

open -e /private/etc/syslog.conf

Replace 'crit' with '*' after mail.

mail.*			/var/log/mail.log

REBOOT

After you finished with the installation you can log in via web browser at http://yourdomain.com/ecm2Admin.
Inital username/password will be username: siteadmin and password: change in order to gain access as an administrator to set up admins and domains.

When ECM2 is installed and correctly functioning, it sends a new email to the postmaster and/or users upon creation of their accounts. The initial email can be customized within the config file (config.inc.php) for ecm2Admin.