编译安装POSTFIX必需知道的几个东西

POSTFIX下载源码安装不是一件容易的事,参数相当的复杂,

首先了解一下编译安装后的程序文件默认路径:

parameter nametypical default
command_directory/usr/sbin
config_directory/etc/postfix
default_database_typehash
daemon_directory/usr/libexec/postfix
data_directory/var/lib/postfix
html_directoryno
mail_spool_directory/var/mail
mailq_path/usr/bin/mailq
manpage_directory/usr/local/man
meta_directory/etc/postfix
newaliases_path/usr/bin/newaliases
queue_directory/var/spool/postfix
readme_directoryno
sendmail_path/usr/sbin/sendmail
shlib_directory/usr/lib/postfix

下面是本人使用的POSTFIX源码安装脚本:

once=
postfix=2.11.1
if [ $once ];
then
groupadd -g 3000 postfix &&
groupadd -g 3001 postdrop &&
useradd -c "Postfix Daemon User" -d /var/spool/postfix -g postfix \
        -s /bin/false -u 3000 postfix &&
chown -v postfix:postfix /var/mail
apt-get build-dep postfix
fi
if [ $postfix ];
then
cd /root/src
rm -rf ./postfix*
wget ftp://ftp.cuhk.edu.hk/pub/packages/mail-server/postfix/official/postfix-$postfix.tar.gz
tar zxf postfix-$postfix.tar.gz
cd postfix-$postfix
make -f Makefile.init makefiles \
        CCARGS="-DHAS_MYSQL -I/usr/include/mysql \
                -DUSE_TLS -I/usr/include/openssl/ \
                -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" \
        AUXLIBS="-L/usr/include/mysql/mysql -lmysqlclient -lz -lm \
                -lssl -lcrypto -lsasl2"
make
sh postfix-install -non-interactive \
   html_directory=/usr/share/doc/postfix-2.11.1/html \
   readme_directory=/usr/share/doc/postfix-2.11.1/readme
fi

网友评论1

  1. 0楼
    ashu:

    AUXLIBS_MYSQL

    2015-10-29 21:03 [回复]

发表评论

表情
还能输入210个字