Compiling postfix snapshot (postfix-2.7-20091209) on FreeBSD 6.1
FreeBSD 6.1 only has postfix 2.2.9 in package ports default stock, if i recall correctly. we need downloading source from www.postfix.org
FIrst install all dependencies, In FreeBSD i actually just locate package,cd to package ports directory and then make install clean
e.g :
# locate mysql
This will result bunch of package port directories, for instant we want to install mysql-server, just follow these command accordingly
# locate mysql-server # cd /var/db/pkg/mysql-server-5.1.6_2 # make install clean
Remember, installing from package ports need internet connection
Do it the same way for all dependencies
Extract Postfix tarball
# tar xvzf postfix-2.7-20091209.tar.gz # cd postfix-2.7-20091209
Compile and install postfix source
# make makefiles CCARGS="-DFD_SETSIZE=2048 -DHAS_CDB -DHAS_NIS -DSNAPSHOT -I/usr/local/include -DHAS_PCRE -I/usr/local/include -DHAS_MYSQL -I/usr/local/include/mysql -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/local/include/sasl -DUSE_TLS -DHAS_SSL -I/usr/include/openssl" AUXLIBS="/usr/local/lib/libcdb.a -L/usr/local/lib/mysql -lmysqlclient -lz -lm -L/usr/local/lib -ldb4 -lpcre -lsasl2 -lssl -lcrypto -lpthread" # make # make install
if we need to customize postfix main.cf or master.cf, default configuration will in /etc/postfix/. we can refer to documentations at www.postfix.org site
That’s it 🙂