Nov 172009
 

I've seen someone asking for postfix TCP_TABLE support on centos at mailing list.Actually that was easy to achieved.I'm gonna explain how to build postfix rpm package with TCP_TABLE support.There's great tutorial on how to build postfix RPM package maintain by Simon J Mudd.

I'm gonna used Simon J mud's postfix source RPM package to build the binary.

First download the latest postfix SRPM package

$ rpm -Uvh postfix-2.6.5-1.src.rpm
$ cd `rpm --eval '%{_sourcedir}'`

$ export POSTFIX_SMTPD_MULTILINE_GREETING=1
$ export POSTFIX_LDAP=1
$ export POSTFIX_MYSQL_REDHAT=1
$ export POSTFIX_PCRE=1
$ export POSTFIX_PGSQL=1
$ export POSTFIX_RBL_MAPS=1
$ export POSTFIX_SASL=2
$ export POSTFIX_TLS=1
$ export POSTFIX_VDA=1
$ export POSTFIX_DB=4


You can customize to whatever options you like. here's the references.

$ sh `rpm --eval '%{_sourcedir}'`/make-postfix.spec
$ cd `rpm --eval '%{_specdir}'`
$ vi postfix.spec

Search for CCARGS variable (line 376)

Default value is empty.

modify to this:

CCARGS="-DSNAPSHOT"

$ rpmbuild -ba postfix.spec
$ rpm -Uvh `rpm --eval '%{_rpmdir}'`/i386/postfix-...i386.rpm

done.

Now test if tcp is compiled with postconf -m

$ postconf -m
btree
cdb
cidr
environ
hash
ldap
mysql
nis
pcre
pgsql
proxy
regexp
static
tcp
unix

Good luck 🙂

  18 Responses to “Centos 5 Compile Postfix With Tcp Table Support”

Comments (18)
  1. your postfix not supporting tcp_table, try postconf -m , you’ll see what lookup table types supported on your installation.
    what version of postfix dou yo have?

  2. Hi friend, im running zpanel and centos 6, because zpanel cant install on centos 5

    i cant recompile the postfix for use TCP tables

    show this erros, is there any way to get running on centos 6???
    thanks in advance, look the error below:

    If this procedure does not allow you to produce a working package, please
    let me know.

    ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR
    + exit 1
    error: Bad exit status from /var/tmp/rpm-tmp.xSmlrZ (%prep)

    RPM build errors:
    line 144: prereq is deprecated: PreReq: chkconfig, initscripts, shadow-utils
    line 145: prereq is deprecated: PreReq: /etc/init.d, /sbin/service, chkconfig >= 1.3
    Bad exit status from /var/tmp/rpm-tmp.xSmlrZ (%prep)

  3. try commented out PreReq in postfix.spec

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)


*