Building the mail server components

Please note that this information is no longer up to date. The content of this site has moved to a new domain DIYMacServer.com which is kept up to date. Apologies for the inconvienince.

The mail-server setup is based on Postfix from Wietse Venema and the Courier IMAP and POP3 server. This mail-server is already included in the standard installation of Mac OSX but it lacks some important features if you want to receive mail from more than one user on different domains. To do that you need some more extensions and added features to de-couple the Postfix user management from the OSX user management, add some virtual domain handling, enable the users to send the mail securely over SSL and don’t open yourself for the dreadful spammer.

To be able to do this you need to compile Postfix with support for MySQL (user management), SASL (authentication), TLS (SSL) and use Courier IMAP (virtual mailboxes) to have people look into their mailbox.

Note:

Many problems I received from people who tried this themselves didn’t start on a cleanly installed OS. They had multiple instances of MySQL installed or had some libraries left over from something else. You need to make sure where the include files and the libraries are of the MySQL installation you are going to use. You can find that out by running the ‘mysql_config’ command which will show you the location of the include files and libraries among some other things. If you used the MySQL.com installation package the output would look like:

# mysql_config
Usage: /usr/local/mysql/bin/mysql_config [OPTIONS]
Options:
        --cflags         [-I/usr/local/mysql/include -Os -arch ppc -fno-common]
        --include        [-I/usr/local/mysql/include]
        --libs           [-L/usr/local/mysql/lib -lmysqlclient -lz -lm]
        --libs_r         [-L/usr/local/mysql/lib -lmysqlclient_r -lz -lm]
        --socket         [/tmp/mysql.sock]
        --port           [3306]
        --version        [5.0.19]
        --libmysqld-libs [-L/usr/local/mysql/lib -lmysqld -lz -lm]
#

Comments are closed, to find out why read this blogpost for the reason and directions to alternatives.