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

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.

See postfix

Need help with Linux Server or WordPress? We can help!

Leave a Reply

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