postfix编译参数和选项选项:1.AUXLIBS
2.CC
3.CCARGS
4.DEBUG
5.OPT
参数:-I ,-D, -L, -R, -r, -l。各个参数的说明如下:
-I 指明某一包的库文件所在的地方
-D The -D option provides a way to define macros at the time you compile Postfix. Add-on packages
for Postfix require that you define a particular macro to tell Postfix to include it when building. For example, if
you want to include support for MySQL, you define the HAS_MYSQL macro:CCARGS='-DHAS_MYSQL'
-L 加入对某一包的额外库的支持。如:AUXLIBS='-L/usr/local/lib'
-l 和-L一块儿使用,具体到某一库。如:AUXLIBS='-L/usr/local/lib -lmysqlclient'
-R -r
The
linker uses an argument to include directories in a runtime search path
for dynamic libraries. The argument differs depending on your linker
and platform. The GNU linker (Linux, FreeBSD) uses -rpath, as does IRIX.
Solaris, on the other hand uses -R, and HP-UX uses +b. Consult the
manpage for your linker, ld(1), to see which argument you should use to
set the runtime library search path.
如:Using the SSL library as an
example, if your libssl.so file is located in /usr/local/lib and you are
building Postfix on FreeBSD or another system that uses rpath, define
AUXLIBS as follows:
AUXLIBS='-L/usr/local/lib -rpath/usr/local/lib -lssl'
下面给出一个例子:可以将它保存成shell,如:install.sh文件
#
# Simple script to create a Makefile to build Postfix.
#
#
# Remember to start by cleaning up or uncomment this line
# to have this script do it every time.
#
#make tidy
#
# Specify all of our options and supporting libraries
#
make makefiles \
CCARGS='-DUSE_SASL_AUTH -DHAS_SSL -DHAS_MYSQL -DHAS_LDAP \
-I/usr/local/include/sasl -I/usr/local/ssl/include \
-I/usr/local/include/mysql -I/usr/local/include' \
AUXLIBS='-L/usr/local/lib -L/usr/local/ssl/lib \
-L/usr/local/lib/mysql -L/usr/local/lib \
-lsasl2 -lcrypto -lssl -lmysqlclient -lz -lm -lldap -llber \
-rpath /usr/local/lib/mysql -rpath /usr/local/lib \
-rpath /usr/local/ssl/lib'
To build Postfix, type:
$
sh build.sh$
make
一個完整的編譯參數,使用時請注意路徑是否與你系統中的軟體一至。
make -f Makefile.init makefiles 'CCARGS=-DHAS_MYSQL -I/usr/include/mysql -DUSE_SASL_AUTH \
-DUSE_CYRUS_SASL -I/usr/local/include/sasl -DUSE_TLS' \
'AUXLIBS=-L/usr/lib/mysql -lmysqlclient -lz -lm -L/usr/local/lib/sasl2
-lsasl2 -lssl -lcrypto'
\,如果你使用的是cyrus认证,不要忘了-DUSE_SASL_AUTH后面的-DUSE_CYRUS_SASL,否则postfix会不支持的
sasl认证的,且maillog里会出现如下此方面的错误日志:
wintim postfix/smtpd[5950]: warning: unsupported SASL server implementation: cyrus
wintim postfix/smtpd[5950]: fatal: SASL per-process initialization failed
wintim postfix/master[31992]: warning: process /usr/libexec/postfix/smtpd pid 5950 exit status 1
阅读(1493) | 评论(0) | 转发(0) |