Hi Charles,

Probably your /var/vpopmail/etc/vpopmail.mysql isn't readable by the user the 
apache-server runs under. As a matter of fact, you might not want it to be 
readable by the apache user. If it's a public server, this would allow 
everyone who can write cgi scripts or the like to read the login information 
to your vpopmail database.

I've worked around this by hacking the password in the vpopmail source code 
(can post a patch if people are interested, but it's really very simple), but 
it should be clear that this is really a *very* *dirty* solution.

Greetings,
On Wednesday 19 October 2005 19:25, Charles Collicutt wrote:
> Hi,
>
> I have written a CGI program in C for web-based administration of a
> vpopmail setup. It duplicates some of the functionality of Qmailadmin
> but I have written it in order to test some ideas and learn more about
> Vpopmail before I write a more complicated program.
>
> When I run it from the command line it works perfectly - no problems at
> all. However, when it is called as a CGI program by Apache it seems to
> have a problem with vauth_getpw() - it returns NULL even for valid
> users. I am using the MySQL backend.
>
> I have no problems with vpopmail normally, and even this program works
> fine when called from the command line (with the appropriate input and
> environment variables as if it were a CGI program), but vauth_getpw()
> just doesn't seem to work when the program is invoked by Apache. There
> isn't anything in Apache's error.log either.
>
> Does anyone have any idea what's going wrong?
>
> Thanks for your help.

-- 
grtz
Tijs Zwinkels

... A bus station is where the bus stops. A train station is where the train 
stops. On my desk I have a workstation.....

Reply via email to