PostFix


1
Oct
2005

Finally found some spare time to have a look at how to compile Postfix on my Mac mini. When looking around for information on configuring Postifx on the Mac I also bookmarked all the information regarding compiling Postfix. Most of the info I found was out of date or targeted older versions. So I had to combine and try out what still worked and what not.

By the way this is just a quick write down on the things I found out, it’s not a complete guide. I’m planning to write a step by step guide on how to compile and configure a proper Postfix mail server on your Mac mini.

Via some backdoor (can’t remember how I found it) located this article on AFP548.com. It’s for an older version of Postfix and OS X (panther) but it’s got some nice pointers on the stuff you have to do. You have to remember that I’m not an Unix guru and just have fumbled my own current Postfix installation into a working environment. This time it’s going to be a repeatable effort and I’m looking for all the info I can get.

I’m including PCRE into the Postfix build as well as it’s faster than regexp for contect filtering. I’m not sure if I’m going to use this but it was quite easy to do. It was as simple as downloading the source from http://www.pcre.org/, extracting, running ./configure, make and make install. Done.

Installing SASL was a bit more complex because of the compiler errors I got when trying to compile the latest release. But to cut a long story short, I got it compiled when using version 2.1.18 of the source. I’ve still got to find out which is the latest version that compiles without a problem.

Compiling Postfix was also not nuch of a problem. Just getting the latest version of the source (2.2.5 in this case) and getting the first make command working with the options needed. We wanted MySQL support (what all this effort was about) and include PCRE ad SASL. So you end up with a command looking like:

make -f Makefile.init makefiles \
CCARGS='-DUSE_SASL_AUTH -I/usr/local/include/sasl \
-DHAS_MYSQL -I/Library/Mysql/include/mysql'  \
AUXLIBS='-L/usr/lib -lldap -L/usr/lib -llber -L/usr/lib -lsasl2 \
-L/Library/MySQL/lib/mysql -lmysqlclient -lz -lm'

I’m using the Server Logistics package for MySQL (as told here), if you are sing a package from a different source your path to the mysql.h file might be different. Please check it before compiling.

If the above make command worked for you then issue it, followed by a make and make update command and everything should be up to date and installed. To check if we got MySQL tables in this version run the following command and look for MySQL in the output:

# postconf -m
btree
cidr
environ
hash
mysql
pcre
proxy
regexp
static
unix

Next step is the IMAP server and configuration but that is for another time, now I’m happy I got this done. Just taking one step at a time.

25
Sep
2005

I’ve been trying to get Postfix with IMAP folders working on my Mac mini for some time now. I even got to the point where I was willing to spend money on the Postfix Enabler just to get it working. But yesterday I found out why this isn’t going to work for me, it’s all about user authentication and management. It seems that Postfix and UW IMAP (the IMAP implementation from the Univesity of Washington) are build with Apple’s idea of user management. Which means that each user of my mail server must be created as an actual user on the Mac mini and can not be authorized or managed by a seperate administration.

I found this out while having a talk with Bernard Teo from CutEdgeSystems.com on if the postfix enabler supported virtual domains. Bernard was and is one of the fastest email responders I ever encountered when asking support on a piece of software, he responded within 5 minutes. He explained that, despite claims in several forums that it wouldn’t work, I could configure virtual domains with the Postfix enabler as long as each user on each domain had a seperate mailbox and that was not what I was looking for. I want mailboxes for as many users as it takes while having just one user enabled on my Mac. It’s going to be a web server for many small domains and I want to be able to handle the e-mail traffic for all those domains with a minimum of hassle like I have on my current Debian servers.

I now will start looking for the best place to get the source code for Postfix with installation and configuration help. I guess that now I’m going to compile it I will use all the other features I wanted to use from the beginning like MySQL support and for the Courier IMAP server , which in turn would mean that I can provide web based email services using SquirrelMail.

Wish me luck…

14
Sep
2005

Bummer, I thought it was included in the default package, but somehow the configuration I used (copied from my Sun) didn’t work. I got an error message:

postfix/pickup[11145]: fatal: unsupported dictionary type: mysql

I started googling the error message and to find out how I could see which kind of lookup tables are support in the default package installed in OS X. The command I found and used was:

postconf -m

The result was that the following tables are supported:

static
sdbm
cidr
regexp
environ
proxy
btree
unix
hash

Next I will start the configuration process again from scratch to see if I can get it all working via configuration files. I hope I can get the IMAP folders working, I thought that was supported.

I can off course get the sourcecode for Postfix and recompile the whole thing to get everything working as I wanted (with MySQL support for instance) but I really would like to use standard software and not go out and compile everything myself. If someone knows of a standard package I can install like the packages for Apache, MySQL and PHP please let me know !

13
Sep
2005

I remember I had a hard time configuring Postfix on my Sun running Debian Linux, all those loose config files which don’t make a lot of sense from the beginning. On top of that I wanted IMAP folders (easier to use web based mail and use multiple computers to read mail), virtual domains and use MySQL for account administration. It took me quite some time but I got it done, with lots of espresso and some major googling on error messages and configuration.

There are a lot of HowTo’s and FAQ files to be found on the internet, each for a specific configuration and a specific operating system. Just have a look at postfix.org’s document section to see some of the “official” ones. There are more just google for them.

I tried to collect some information on using and configuring Postfix on OS X but it is hard to come by. When asking around I got pointed to the Postfix Enabler which is a great solution if you’d want a simpel server with one domain, but as far as I could see it doesn’t work if you’d want to setup multiple domains.

Others suggested to install OS X server, it’s got the same basic software installed, but it comes with nice GUI based tools for configuring it all. A shame they can’t be downloaded somewhere. I’m not going to go the server route, not on my Mac mini, maybe later on a true Xserver.

I’m now even more determined to get it working on the Mac just the way I want it done. I’ve got most sites covering this bookmarked to keep googling to a minimum. I’m going to document as much as possible and put it on this site so others can benefit from my expirience doing this. I hope it will help others to get it running in a shorter time frame than I will.

Keep coming back for more info on the subject. I will publish any progress I make.

« Previous Page