On 1/9/2011 10:03 PM, Wietse Venema wrote:
Steve Jenkins:
Up to now, we've been running Postfix 2.3.3 that was installed on a number
of CentOS 5.5 production servers with a simple "yum install postfix"

We want to run an updated version, so I compiled 2.7.2 from source using the
information at http://postfix.wl0.org/en/building-rpms/

When creating the postfix.spec file, the only additional option I explicitly
added was:

export POSTFIX_PCRE=1

Everything seemed to go fine and the CentOS 5.5 test box I built and
installed it on appears to be sending test mails as expected. However, I
want to compile in the same options that are included in the "default" 2.3.3
version that we're running on our production servers.

However, I couldn't find a postconf option in the docs to show which options
were included at compile time. Is there a command that will show them, or a
list somewhere that shows which ones were included in Postfix 2.3.3
installed by yum on CentOS 5?
Postfix from postfix.org stores the compile-time options in
/etc/postfix/makedefs.out.  If your vendor distributes that
file, look for the EXPORT line. Here is an example:

EXPORT  = AUXLIBS=' -L/usr/local/lib -lpcre' CCARGS=' -DHAS_PCRE 
-I/usr/local/include -DSNAPSHOT' OPT='-O' DEBUG='-g'

The AUXLIBS and CCARGS are what you would specify on the "make
makefiles" command line.

        Wietse

You can just use the options from 2.3.3 by getting a source rpm and searching for the "make makefiles" line; however, the changes in between 2.3 and 2.7 are probably different enough to add new makefiles options.

With postfix 2.7.2, centos 5.5, with dovecot sasl,mysql, openssl, and dovecot lda, we use:

make makefiles \
CCARGS='-DUSE_TLS -DUSE_SSL -DUSE_SASL_AUTH -DHAS_MYSQL \
-DDEF_SERVER_SASL_TYPE=\"dovecot\" -DPREFIX=\"/usr\"  \
-DHAS_PCRE -DSNAPSHOT \
-I/usr/include/openssl -I/usr/include/sasl  \
-I/usr/include/msyql -I/usr/include' \
OPT='-O'
DEBUG='-g'
AUXLIBS='--L/usr/lib64 -L/usr/lib64/openssl -L/usr/lib64/mysql \
-lssl -lcrypto-lsasl2 -lpcre -lmysqlclient -lz -lm -lldap -llber \
-Wl,-rpath,/usr/lib64/openssl -Wl,-rpath,/usr/lib64/mysql'

If you dont use x86_64, you will need to remove any 64 addition, such as /usr/lib64 to /usr/lib.

Dovecot is not a compile-time parameter but a main.cf configuration parameter; so, if you dont want to use Dovecot LDA, you dont have to change anything above BUT, if you want to use Cyrus SASL, change SERVER_SASL_TYPE to\" cyrus_sasl\".

anything else you dont want to use, take out the appropriate color and make sure CCARGS, AUXLIBS are contained within quotations (' ') and parse out anything that uses quotations, like the SERVER_SASL_TYPE i gave you above.

we dont use pcre but I added the pcre CVARS from the post from wieste Venema to the above. This is using all OTHER rpm packages that come with the centos repository, as dependencies for compiling above. These packages, in addition to the standard development libraries, include:

mysql-devel
cyrus-sasl (if you want to use other than dovecot sasl)
cyrus-sasl-devel
openssl-devel
openssl








Jerrale G.
SC Senior Admin

Reply via email to