• Uncategorized

    Postfix: Recompile with MySQL support [by celiawessen]

    Mail Service:: Postfix: Recompile with MySQL support
    *postfix and cyrus for Mac OS X Server is heavily integrated with OpenDirectory. Re-compiling postfix with MySQL support may break it. Because of OD, postfix will certainly not work with CyrAdm, unless Apple configures OD to recognize commands from CyrAdm*

    To recompile Postfix with MySQL support, you'll need the Postfix source file, MySQL installed already, and the Developer tools installed also.

    1. Dowload Postfix:

    2. MySQL should already be installed. If not, do so:

    3. In the downloaded Postfix source directory, edit (src/global/dict_mysql.c) by replacing (line 118):

    #include <mysql.h>


    #include </usr/include/mysql/mysql.h>

    4. cd back to the Postfix source directory's root.

    5. Prepare for compilation by running:

    make tidy

    to get rid of miscompiled objects.

    6. Compile by running

    -f Makefile.init makefiles  

    'CCARGS=-DHAS_MYSQL -I/usr/include/mysql'  

         'AUXLIBS=-L/usr/lib/mysql -lmysqlclient -lz -lm'

    7. Install, as a superuser, by running:

    sudo make install

    8. Type


    If you see mysql as a feature, you have succeded.