Howto Compile Postfix src.rpm with MySQL support

Installing, Configuring, Troubleshooting server daemons such as Web and Mail

Howto Compile Postfix src.rpm with MySQL support

Postby eaperezh » 2005/11/02 18:28:03

Hi there,
I need help with compiling MySQL support in the postfix server that came with CentOS 4. I downloaded the source rpm but I have no idea about how to see what --rebuild options are available.
I'm using http://mirrors.kernel.org/centos/4/os/S ... L4.src.rpm
I tried rpmbuild --rebuild --with mysql postfix-2.1.5-4.2.RHEL4.src.rpm but postfix still complains about :
centos postfix/proxymap[9201]: fatal: unsupported dictionary type: mysql

Thanks for your help.

Erick.

(my offending lines in main.cf )
relay_domains = proxy:mysql:/etc/postfix/mysql_relay_domains_maps.cf
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:89
virtual_mailbox_base = /var/mail/virtual
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 51200000
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 1001
virtual_transport = virtual
virtual_uid_maps = static:89
eaperezh
 
Posts: 1
Joined: 2005/11/02 18:19:03

Re: Howto Compile Postfix src.rpm with MySQL support

Postby xerophyte » 2005/11/04 10:31:49

You need to install the src rpm using

in summary :

1) rpm -Uhv http://mirrors.kernel.org/centos/4/os/S ... L4.src.rpm

2) visit the /usr/src/redhat/SPEC , you will find the spec file for the rpm, Where you will find the build instruction,
under the build section should be able to give the option to build with mysql
3) after you have made the modification you can just run rpmbuild -ba /usr/src/redhat/SPEC/wateverspecfile there


more more info please read the following Guide :
http://fedora.redhat.com/docs/drafts/rpm-guide-en/

hope that helps
xerophyte
 
Posts: 6
Joined: 2005/07/08 12:04:01
Location: Canada

Re: Howto Compile Postfix src.rpm with MySQL support

Postby Evolution » 2005/11/08 21:29:38

This has already been done for you. The postfix rpm you need is in the centosplus repository.
Evolution
 
Posts: 229
Joined: 2005/02/22 16:10:54
Location: Houston Texas

Howto Compile Postfix src.rpm with MySQL support

Postby Emito » 2005/11/30 20:40:19

Here you have postfix with mysql, sasl, etc
http://www.proficuous.com/postfix/4/pos ... 2.2.5.html

Regards, Emiliano.
Emito
 
Posts: 14
Joined: 2005/01/21 19:41:32

Re: Howto Compile Postfix src.rpm with MySQL support

Postby brandonc » 2006/02/21 02:21:48

I've compiled postfix with MySQL support manually like this:

Code: Select all
# yum install dbd dbd-devel pcre pcre-devel openldap-devel
# cd /usr/local/src
# wget ftp://ftp.midvalleyhosting.com/pub/postfix/official/postfix-2.2.8.tar.gz
# tar -xvzf postfix-2.2.8.tar.gz
# cd postfix-2.2.8
# make makefiles   AUXLIBS=' -L/usr/lib -lldap -llber -lpcre \
  -L/usr/lib/sasl2 -lsasl2 -L/usr/kerberos/lib -lssl -lcrypto \
  -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz \
  -L/usr/lib/mysql -lmysqlclient -lz -lm'  CCARGS='-fPIC \
  -DHAS_LDAP -DHAS_PCRE -I/usr/include/pcre  \
  -DUSE_SASL_AUTH -I/usr/include/sasl -DHAS_SSL \
  -I/usr/kerberos/include  -DINET6 -D__ss_family=ss_family \
  -DHAS_MYSQL -I/usr/include/mysql' OPT='-O' DEBUG='-g'
# make
# make install (answer questions as appropriate, I just used defaults on everything)



Thanks,
Brandon Checketts
www.brandonchecketts.com
brandonc
 
Posts: 2
Joined: 2005/08/13 22:18:38


Return to CentOS 4 - Server Support

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest