1

I have installed postfix using the ports tree without making modifications to anything. In my main.cf file i can't specify any 'Mysql:/' arguments because postfix does not have mysql support. Now i want to reinstall postfix with mysql support.

i have tried the following:

make -f Makefile.init makefiles \
'CCARGS=-DHAS_MYSQL -I/usr/local/mysql/include' \
'AUXLIBS_MYSQL=-L/usr/local/mysql/lib -lmysqlclient -lz -lm'

This command outputs 'make: cannot open Makefile.init.'

And when i try to make in custom 'Make' file with this code:

    make makefiles \ 
CCARGS="-DHAS_MYSQL -I/usr/include/mysql \
AUXLIBS="-L/usr/lib/mysql/ -lmysqlclient \

Freebsd outputs: 'don't know how to make makefiles. Stop'

Thanks in advance

2

Note: If you're looking for the recently released Postfix 3.0 series, you should substitute mail/postfix-current for mail/postfix below.

You may manually set configuration options when using the ports tree, but you don't have to. If you installed postfix via pkg, run pkg delete postfix with root privileges. If you installed via local ports tree compilation, do:

cd /usr/ports/mail/postfix
make deinstall

If your ports tree is not located at /usr/ports, substitute the path as necessary.

To compile with MySQL support:

cd /usr/ports/mail/postfix
make config

Then select the 'MYSQL' option and any others you'd like, and

make install clean

If you'd prefer not to use the interactive options, follow the directions here instead.

FreeBSD's extensive handbook is one of its best features (which is saying a lot, because there are a lot of good things to find in FreeBSD. I would suggest reading through the chapter on ports.

Good Luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.