ECMÊMail Server System for OSX Server 10.4+ (TIGER)

MySql ¥ Exim ¥ Exiscan ¥ CourierIMAP ¥ SpamAssassin ¥ Clam AntiVirus

Download the following packages:

Follow step 1 through 5 before installing all of these packages!

Exim-MTA 4.60
(contains Exim Startup files)

Courier-IMAP 3.0.8
(contains IMAP and POP Startup files)

SA Startup
(contains SpamAssassin startup and config files)

Clam AntiVirus 0.88
(includes Startup files)

GMP 4.1.4
(Neccassary for ClamAV)

MailAdmin (Rev. 5-15-05)

DBI_1.48

DBD_Mysql-3.0002

1. Exim-MTA

Install Exim package. You have to make sure that no other smtp or pop/imap server is running on your computer. Remove the following file from the "LaunchDaemons" folder '/System/Library/LaunchDaemons/org.postfix.master.plist'.

(Exim is based on this build instructions)

2. CourierIMAP

Install the Courier Package.

DO NOT create directories for user accounts and/or domains inside mail folder. They will be created automatically upon the arrival of the first email sent to the users, listed in the mysql setup.

(Courier is based on this build instructions)

3. MailAdmin (Rev. 5-15-05)

Download and unpack mailAdmin.tgz package. Open "connection.inc.php" and edit the "$connection" line with your database username and password. It also contains a file called "email_db.sql" - move it to your home (root) directory. Move the rest of the folder to wherever you serve files via apache.

Open terminal, login as root. (I assume you do have some familiarity with MySql)

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

Test it by pointing your browser to http://www.yourdomain.com/mailAdmin/. If you're able to add or delete records to all four categories then proceed to step 4.

4. SpamAssassin (Site-wide)

You're going to need Apple Developer Tools (Xcode). Comes with both Tiger Client and Server, so all you have to do is just install it.

(Login as "root") If this is a new Tiger installation, you'll have to initialize perl and install a few modules before you can install SpamAssassin:

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

Install DBI_1.48 and DBD_Mysql-3.0002 packages (or build yourself) before you continue installing SpamAssassin via terminal.

sudo cpan
install Mail::SpamAssassin
quit

Download and install SpamAssassin start up and config files. (Link above)

5. Clam AntiVirus

Install ClamAV packages. ClamAV requires that you install GMP (GMP 4.1.4 link above).

(ClamAV is based on this build instructions)

6. Configure files

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

open -e /usr/exim/configure

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

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

In order to activate bouncing messages above certain score points generated by SpamAssassin, you have to uncomment the following lines in exim configure file and set the condition to reject value "{100}" to whatever you desire. (Actually it is multiplied by ten. Example: If you want to bounce spam at 7.8, than you multiply it by ten, which will result in {78}) You should uncomment these three lines in exim configure file if you want to start rejecting mail.

# deny message = This message scored $spam_score points. Congratulations!
# spam = nobody:true
# condition = ${if >{$spam_score_int}{200}{1}{0}}

Exim "configure" file example.

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

open -e /usr/courier-imap/etc/authmysqlrc

MYSQL_USERNAME username
MYSQL_PASSWORD password

SPAMASSASSIN: Open SA's "local.cf" file and enter database username/password:

open -e /private/etc/mail/spamassassin/local.cf

user_scores_sql_username username
user_scores_sql_password password

MAILADMIN: Open "connection.inc.php" file and enter database username/password:

open -e /Library/WebServer/mailAdmin/connection.inc.php

MYSQL_USERNAME
MYSQL_PASSWORD

7. RESTART COMPUTER

At this point everything should be working. Just setup an account and check. To log in via email client apps you must use full email address as the username and the client must be capable of and enabled for smtp authentication.


Ñby George SzekelyÊÊÊÊÊ