Exim 4.68 on TIGER (OS X 10.4+) Server or Client

Whenever you compile from source code it is necessary to have the latest Xcode installed. It's free from ADC.

Login as root on you terminal and create a system user for Exim:

dscl . -create /Users/exim
dscl . -create /Users/exim RealName "Exim User"
dscl . -create /Users/exim UniqueID 90
dscl . -create /Users/exim PrimaryGroupID 20
dscl . -create /Users/exim PASSWORD "*"

Download the source code for Exim:

curl -O ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/exim-4.68.tar.gz
gnutar -xvzf exim-4.68.tar.gz
cd exim-4.68
cp src/EDITME Local/Makefile 
open -e Local/Makefile

change the following lines in the Makefile:

EXIM_USER=exim

SUPPORT_MAILDIR=yes
SUPPORT_MAILSTORE=yes
SUPPORT_MBX=yes


# LOOKUP_DBM=yes
LOOKUP_LSEARCH=yes

# LOOKUP_CDB=yes
# LOOKUP_DNSDB=yes
# LOOKUP_DSEARCH=yes
# LOOKUP_IBASE=yes
# LOOKUP_LDAP=yes
LOOKUP_MYSQL=yes
# LOOKUP_NIS=yes
# LOOKUP_NISPLUS=yes
# LOOKUP_ORACLE=yes
# LOOKUP_PASSWD=yes
# LOOKUP_PGSQL=yes
# LOOKUP_WHOSON=yes
# LOOKUP_WILDLSEARCH=yes
# LOOKUP_NWILDLSEARCH=yes


LOOKUP_INCLUDE=-I /usr/include/mysql
LOOKUP_LIBS=-L/usr/lib/mysql/ -lmysqlclient -lz

#EXIM_MONITOR=eximon.bin

WITH_CONTENT_SCAN=yes

AUTH_CRAM_MD5=yes
AUTH_PLAINTEXT=yes
AUTH_SPA=yes

SUPPORT_TLS=yes
TLS_LIBS=-lssl -lcrypto

TLS_LIBS=-L/usr/include/openssl -lssl -lcrypto

TLS_INCLUDE=-I/usr/include/openssl/

LOG_FILE_PATH=/var/spool/exim/log/exim_%s.log

CHOWN_COMMAND=/usr/sbin/chown
make
sudo make install

The following symlinks will make your exim logs available for viewing them via "Console".

sudo ln -s /private/var/spool/exim/log/exim_main.log /var/log/exim_main.log
sudo ln -s /private/var/spool/exim/log/exim_reject.log /var/log/exim_reject.log
sudo ln -s /private/var/spool/exim/log/exim_panic.log /var/log/exim_panic.log
sudo ln -s /private/var/spool/exim/log/exim_vacation.log /var/log/exim_vacation.log
touch /var/spool/exim/db/vacation.db
chown -R exim /var/spool/exim/db/vacation.db

This will make exim look like sendmail for other apps like php, perl ...

rm /usr/bin/sendmail
rm /usr/sbin/sendmail
ln -s /usr/exim/bin/exim-4.68-1 /usr/sbin/sendmail
ln -s /usr/exim/bin/exim-4.68-1 /usr/bin/sendmail