install postfix from source code

Requirements

yum -y install db4 db4-devel

Create user

groupadd postfix -g 1000
useradd postfix -u 1000 -g 1000
groupadd postdrop

Download and Install

Go to

Advertisement

http://www.postfix.org/download.html

and download latest version of postfix.

cd /usr/local/src
wget http://mirrors.rootservices.net/postfix/official/postfix-2.6.2.tar.gz
tar -zxvf postfix-2.6.2.tar.gz
cd postfix-2.6.2

COMPILING

make tidy
make -f Makefile.init makefiles
make
make install

COMPILING WITH MYSQL SUPPORT

make tidy
make -f Makefile.init makefiles 'CCARGS=-DHAS_MYSQL -I/usr/include/mysql' 'AUXLIBS=-L/usr/lib/mysql -lmysqlclient -lz -lm'
make
make install

Now it ask many questions, just enter for every questions. See [[postfix make install questions]]

    Warning: you still need to edit myorigin/mydestination/mynetworks
    parameter settings in

/etc/postfix/main.cf

    See also http://www.postfix.org/faq.html for information about dialup
    sites or about sites inside a firewalled network.

    BTW: Check your /etc/aliases file and be sure to set up aliases
    that send mail for root and postmaster to a real person, then run
    /usr/bin/newaliases.

PRESS ENTER FOR ALL

error while loading shared libraries: libmysqlclient.so.16

[root@linux postfix-2.5.5]# find / -name 'mysql_version.h'
/usr/include/mysql/mysql_version.h
[root@linux postfix-2.5.5]#
[root@linux postfix-2.5.5]#  find / -name 'libmysqlclient.so'
/usr/lib/mysql/libmysqlclient.so
[root@linux postfix-2.5.5]#

Show mails in queue

postqueue -p

VERYFY MYSQL SUPPORT

[root@linux postfix-2.5.5]# postconf -m
btree
cidr
environ
hash
mysql
nis
proxy
regexp
static
unix
[root@linux postfix-2.5.5]#

START POSTFIX ON BOOT

echo /usr/sbin/postfix start >> /etc/rc.local

Commands listed on /etc/rc.local will run on boot.

Add a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement