install postfix from source code
Requirements
1 |
yum -y install db4 db4-devel |
Create user
1 2 3 |
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.
1 2 3 4 |
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
1 2 3 4 |
make tidy make -f Makefile.init makefiles make make install |
COMPILING WITH MYSQL SUPPORT
1 2 3 4 |
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]]
1 2 3 4 5 6 7 8 9 10 11 |
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
1 2 3 |
[root@linux postfix-2.5.5]# find / -name 'mysql_version.h' /usr/include/mysql/mysql_version.h [root@linux postfix-2.5.5]# |
1 2 3 |
[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
1 |
postqueue -p |
VERYFY MYSQL SUPPORT
1 2 3 4 5 6 7 8 9 10 11 12 |
[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
1 |
echo /usr/sbin/postfix start >> /etc/rc.local |
Commands listed on /etc/rc.local will run on boot.
See postfix