Обсуждение: Postfix with PostgreSQL
This question is about installing Postfix with PostgreSQL. I am posting on this Forum hoping that somebody has done it and help me out. CentOS 5.3, PostgreSQL-8.3.7, Postfix-2.5.6 I have setup a PostgreSQL Server and PostgreSQL Client under DEFAULT folders. I can connect PostgreSQL Server from PostgreSQL Client. Now I am trying to install Postfix on the pgsql Client machine. Postfix has the following command to 'Building Postfix with PostgreSQL support': % make -f Makefile.init makefiles \ 'CCARGS=-DHAS_PGSQL -I/usr/local/include/pgsql' \ 'AUXLIBS=-L/usr/local/lib -lpq' Since I have pg Server & Client machines, I have no idea where is '-I/usr/local/include/pgsql' & '-L/usr/local/lib -lpq'. Can somebody help. Jennefer PS: My English is poor.
"Just E. Mail" <justemail@imwell-usa.com> writes: > Now I am trying to install Postfix on the pgsql Client machine. Postfix > has the following command to 'Building Postfix with PostgreSQL support': > % make -f Makefile.init makefiles \ > 'CCARGS=-DHAS_PGSQL -I/usr/local/include/pgsql' \ > 'AUXLIBS=-L/usr/local/lib -lpq' If you have installed Postgres from RPMs, just make sure you've installed the postgresql-devel RPM too. Forget about /usr/local --- it should be enough to do % make -f Makefile.init makefiles \ 'CCARGS=-DHAS_PGSQL' \ 'AUXLIBS=-lpq' regards, tom lane
This question is going to be difficult for many to answer, but please help. I am trying to setup a Master/Client server setup to run Postfix. The MASTER server has Postfix & PostgreSQL Client installed on it. The Master machine is at the backend with PostgreSQL Server installed on it. All emails will be held on the backend PostgreSQL Server, which is only accessible from the Postfix/PostgreSQL Server. I hope you get the picture. I am trying to determine whether I use 'dbmail' or 'dovecot'? I am new to both of these applications & they both seems interesting. I am a NEWBIE so it is important to know which one of these two application is easy to install, setup, maintain & feature rich. It will be nice to see URL of a site or Screen shots to see how each of them look. I am sure I am leaving few things out. Please help. I am working on the weekend. Jennifer
Tom & others: I followed Tom's advice with no good luck. Here is what I did: 1. Installed a fresh install of CenbtOS 5.3 2. Installed PostgreSQL Client, as follows: from: *http://yum.pgsqlrpms.org/8.3/redhat/rhel-5Client-i386 <http://yum.pgsqlrpms.org/8.3/redhat/rhel-5Server-i386> *installed: *postgresql-libs-8.3.7-1PGDG.rhel5.i386.rpm <http://yum.pgsqlrpms.org/8.3/redhat/rhel-5Server-i386/postgresql-libs-8.3.7-1PGDG.rhel5.i386.rpm> **postgresql-8.3.7-1PGDG.rhel5.i386.rpm <http://yum.pgsqlrpms.org/8.3/redhat/rhel-5Server-i386/postgresql-8.3.7-1PGDG.rhel5.i386.rpm> **postgresql-devel-8.3.7-1PGDG.rhel5.i386.rpm <http://yum.pgsqlrpms.org/8.3/redhat/rhel-5Server-i386/postgresql-server-8.3.7-1PGDG.rhel5.i386.rpm> * Nothing more for PostgreSQL.* *3. Now I started installing 'Postfix': Downloaded 'postfix-2.5.6.' (& extracted) into '/usr/local/src' % cd /usr/local/src/postfix-2.5.6 ======= this is actual entries on the LINUX Machine =================== [root@rs1 postfix-2.5.6]# make -f Makefile.init makefiles 'CCARGS=-DHAS_PGSQL' 'AUXLIBS=-lpq' make -f Makefile.in MAKELEVEL= Makefiles (echo "# Do not edit -- this file documents how Postfix was built for your machine."; /bin/sh makedefs) >makedefs.tmp No <db.h> include file found. Install the appropriate db*-devel package first. See the RELEASE_NOTES file for more information. make: *** [Makefiles] Error 1 make: *** [makefiles] Error 2 [root@rs1 postfix-2.5.6]# ****=================================== I guess you see the error above. Please note that in my original post, I explained that my setup consists of two machines; the above setup is for the machine which will host the 'Postfix' & 'PostgreSQL' client, but the PostgreSQL server is at the back end, which will contain the data. I know Iamdoing something wrong, but what? a NEWBIE's life is very painful! Jennifer PS: Once I encountered, error while installing 'Postfix', I went back & also installed: * **postgresql-server-8.3.7-1PGDG.rhel5.i386.rpm <http://yum.pgsqlrpms.org/8.3/redhat/rhel-5Server-i386/postgresql-server-8.3.7-1PGDG.rhel5.i386.rpm>* & repeated the same. Same error. Tom Lane wrote: > "Just E. Mail" <justemail@imwell-usa.com> writes: > >> Now I am trying to install Postfix on the pgsql Client machine. Postfix >> has the following command to 'Building Postfix with PostgreSQL support': >> > > >> % make -f Makefile.init makefiles \ >> 'CCARGS=-DHAS_PGSQL -I/usr/local/include/pgsql' \ >> 'AUXLIBS=-L/usr/local/lib -lpq' >> > > If you have installed Postgres from RPMs, just make sure you've > installed the postgresql-devel RPM too. Forget about /usr/local > --- it should be enough to do > > % make -f Makefile.init makefiles \ > 'CCARGS=-DHAS_PGSQL' \ > 'AUXLIBS=-lpq' > > regards, tom lane > >
On Sun, 2009-05-10 at 12:14 -0600, Just E. Mail wrote: > No <db.h> include file found. My postfix spec file requires following packages to build cleanly: libspf2-, db4-devel, pcre-devel postgresql-devel zlib-devel cyrUs-sasl-devel openssl-devel You will need to install these packages before building your postfix. However, my vote is not building Postfix from source. First, download this: http://ftp.wl0.org/official/2.5/SRPMS/postfix-2.5.6-2.src.rpm then run: rpmbuild --rebuild --define "with_pgsql 1" --define "--with-ldap 0" \ --define "with-dovecot 1" --define "--with-sasl 1" \ --define "with_tls 1" postfix-2.5.6-2.src.rpm If it asks you to install packages before building, do install them. Here is an example (output may differ): =========== error: Failed build dependencies: openldap-devel >= 1.2.9 is needed by postfix-2.5.6-2.rhel5.x86_64 openssl-devel is needed by postfix-2.5.6-2.rhel5.x86_64 =========== -HTH Regards, -- Devrim GÜNDÜZ, RHCE devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr http://www.gunduz.org