MySQL


10
Oct
2005

Again I made some small progress in getting a fully functional IMAP based mail server running on my Mac mini. After getting Postfix compiled with MySQL support I needed to get started on the IMAP end of things.

First downloading the source code as I couldn’t find any ready made packages I could just install. You can get Courier IMAP from here and the authentication library from here. I used version 4.0.6 of the IMAP server and version 0.57 of the authlib daemon.

The authlib daemon was as easy as ./configure, make and then as root do a ‘make install’ and ‘make install-configure’ and then tweak some of the configuration files. The IMAP server took more effort. It needed some parameters during the configuration stage, I took some values on a best guess effort but I still need to find out what they do exactly. I’ve got it compiled and running with:

./configure --prefix=/usr/local --with-authpwd=YES  --without-authcram
make
make install

Now I can read my emails from the server, still needed some configuration tweaking but more on that later. Still while trying to send mail to myself the mail address gets bounced in Postfix, I need to find out why. But to end on a positive note, my mail was copied into the send mail folder on the IMAP server !

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.

7
Sep
2005

At first I thought that I just needed to install
MySQL
on my new Mac mini to get the complete stack for building PHP/MySQL based websites as is this one. But somehow it didn’t just fit together as expected so I started to look around the internet for other sources which might solve my issues now and in the future.

I found 3 sources which were referenced by many others:

After looking around at all three websites the one I liked the most was Server Logistics. Basically I choose them because of the fact they run all their own servers with the package they provide as a download. You could install all the packages seperatly (MAMP has one package) which is helpfull if one item in the stack gets an update. Installing the packages from Server Logistics was as easy as downloading, clicking and installing. No configuration issues or other issues, they even came with Preferences Panels.

I’ve got it running for a couple of days now and it’s running smoothly ever since. I’m migrating all my sites to the Mac mini to see if I run into any problems. If that’s finished and everything keeps working then the next stop will be the firewall and mailserver.

« Previous Page