Re: [vchkpw] PostgreSQL auth and "--enable-valias" and/or "--enable-sql-logging" issues

2007-11-15 Thread Rick Widmer



Bruce McAlister wrote:

Hi All,

I am trying to build vpopmail 5.4.25 (have also tried 5.4.26) for use
with a PostgreSQL back end.

The hurdle I am coming up against is if I enable the valias option
and/or the sql logging option.


The PostgreSQL is not as frequently used as CDB and MySQL, and there are 
things missing from its back end.  The error messages you are seeing 
indicate that the needed functions are not defined within the PostgreSQL 
back end.




I have attached the complete configure and gmake output runs for each of
the above configure options just in case it is an issue that you can see
earlier on in the build process.


Thanks for an excellent report!  I wish I had better news for you...

I am working on making all the back ends work the same way, but not 
being a PostgreSQL user, and not seeing all that many people using it, 
it isn't a high priority for me.  I'll get around to it in or soon after 
version 6 hits the street.  That may be a year or more out.


If you want the functions, and you can code c, you should copy the 
needed code from vmysql.c to pgsql.c and vmysql.h to vpgsql.h then 
adjust the queries as needed to work with PostgreSQL.  It should not be 
all that hard to do.  If you submit a patch I'll add it to the next 
release.  If you wanted to sponsor me to do the work, paid work comes 
before open source projects.  (The reason I haven't been seen here for 
so long... :)




On a side note, are there any other PostgreSQL users out there that can
recommend any additional parameters I should use with vpopmail?


There are a few.  I think I've heard from about three other people who 
are using the PostgreSQL back end.  Hopefully someone else will reply...




Also, what do the following configure options do, I've tried to find
documentation on them but am obviously looking in the wrong places:

[1] --enable-ip-alias-domains,


Allows vpopmail to use the incoming (server) IP address to determine 
which domain a user is associated with rather than requiring the user to 
supply it when they attempt to connect.  (Using [EMAIL PROTECTED] instead 
of just user for the  smtp/pop/imap user name in their mail reader.) 
This requires a unique IP address for each incoming domain that can be 
identified by an IP alias.




[2] --enable-qmail-ext


When enabled vpopmail (vdelivermail) will recognize files like 
.qmail-something in user directories.  This lets the user manage 
multiple email addresses like [EMAIL PROTECTED]




Rick

!DSPAM:473c23c132009590110570!



[vchkpw] PostgreSQL auth and "--enable-valias" and/or "--enable-sql-logging" issues

2007-11-15 Thread Bruce McAlister
Hi All,

I am trying to build vpopmail 5.4.25 (have also tried 5.4.26) for use
with a PostgreSQL back end.

The hurdle I am coming up against is if I enable the valias option
and/or the sql logging option.

The error for each individual option are as follows:

--
--enable-valias

/usr/sfw/bin/gcc  -I/usr/sfw/include -Wall   -o valias  valias.o
libvpopmail.a  -L/usr/lib -lpq  -lcrypt
Undefined   first referenced
 symbol in file
valias_select_names_end valias.o
valias_select_names valias.o
valias_select_names_nextvalias.o
ld: fatal: Symbol referencing errors. No output written to valias
collect2: ld returned 1 exit status
gmake[2]: *** [valias] Error 1
gmake[2]: Leaving directory
`/export/home/vzhsxn/build/qmail/vpopmail-5.4.25'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory
`/export/home/vzhsxn/build/qmail/vpopmail-5.4.25'
gmake: *** [all] Error 2

--

--
--enable-sql-logging

/usr/sfw/bin/gcc -I. -I/usr/include/pgsql  -I. -I. -I.-fPIC
-I/usr/sfw/include -Wall -c -o libvpopmail_a-vauth.o `test -f 'vauth.c'
|| echo './'`vauth.c
vauth.c: In function `vauth_deldomain':
vauth.c:393: error: `sqlBufUpdate' undeclared (first use in this function)
vauth.c:393: error: (Each undeclared identifier is reported only once
vauth.c:393: error: for each function it appears in.)
vauth.c:396: warning: implicit declaration of function `PGresultStatus'
vauth.c: In function `vauth_deluser':
vauth.c:446: error: `sqlBufUpdate' undeclared (first use in this function)
gmake[2]: *** [libvpopmail_a-vauth.o] Error 1
gmake[2]: Leaving directory
`/export/home/vzhsxn/build/qmail/vpopmail-5.4.25'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory
`/export/home/vzhsxn/build/qmail/vpopmail-5.4.25'
gmake: *** [all] Error 2

--

I have attached the complete configure and gmake output runs for each of
the above configure options just in case it is an issue that you can see
earlier on in the build process.

If I omit these options the build process goes through successfully,
however, I would like to keep as much info as possible in the database,
so any help in getting this working would be greatly appreciated.

If I enable both the sql logging and valias options and change the auth
module to MySQL then the entire build completes successfully. I did some
searching and it looks like the --enable-valias and --enable-sql-logging
are supposed to be supported by both MySQL and PostgreSQL, I can only
assume then that I am missing something, or I'm doing something wrong.

Unfortunately we are a PostgreSQL shop and I cannot use MySQL here, or
so I've been led to believe, so, again, any help in getting this working
would be much appreciated.

On a side note, are there any other PostgreSQL users out there that can
recommend any additional parameters I should use with vpopmail?

Also, what do the following configure options do, I've tried to find
documentation on them but am obviously looking in the wrong places:

[1] --enable-ip-alias-domains,
[2] --enable-qmail-ext

If I've omitted any important information, please dont hesitate to ask
and I'll try to provide the info.

Your comments/suggestions are greatly appreciated.

Thanks
Bruce


!DSPAM:473c18b232001857993994!
[EMAIL PROTECTED]:/export/home/user/build/qmail/vpopmail-5.4.25 # ./configure \
> --enable-auth-module=pgsql \
> --enable-incdir=/usr/include/pgsql \
> --enable-libdir=/usr/lib \
> --disable-many-domains \
> --enable-valias \
> --enable-learn-passwords \
> CC=/usr/sfw/bin/gcc \
> CFLAGS=-I/usr/sfw/include
checking for a BSD-compatible install... ./install-sh -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking build system type... i386-pc-solaris2.10
checking host system type... i386-pc-solaris2.10
checking for gawk... (cached) nawk
checking for gcc... /usr/sfw/bin/gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/sfw/bin/gcc accepts -g... yes
checking for /usr/sfw/bin/gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of /usr/sfw/bin/gcc... none
checking for a BSD-compatible install... ./install-sh -c
checking for ranlib... ranlib
checking for library containing strerror... none required
checking for crypt in -lcrypt... yes
checking for dirent.h that defin