At 20.18 27/01/2006, you wrote:
> Yes, here are changes. I've already tried them and it works. Just
studying the name of calls it may be adapted to Postgres also (it should
be enough to use vauth_open() ).
> In chkuser_settings.h enable
> #define CHKUSER_ENABLE_VAUTH_OPEN
> and add one of the following lines:
> /* use this if you are using replicated MySQL, with read access */
#define CHKUSER_VAUTH_OPEN_CALL vauth_open
> /* use this if you are using standalone MySQL, with readwrite access */
#define CHKUSER_VAUTH_OPEN_CALL vauth_open_update
FYI - with MySQL it's vauth_open_read not vauth_open.
Yes, sorry, the correct name is vauth_open_read with replica enabled
and read access.
Just a memory problem (age starts to work :-) ).
I'm thinking of
submitting a patch to vpopmail to unify the call, so that it can be
published globally. It would be nice if vauth_open would work no matter
what the backend auth mechanism...
That is what I was expecting for a while (as told here a lot of time
ago), but probably priorities of development have been others (I do
not blame them of course).
But, as different DB have different kind of calls (vauth_open would
only work for read operation on one, while it would work for all the
operations on the other) It could be enough simply adding a common
#define for the routine opening the database (in read mode or the
best equivalent mode).
So chkuser will simply call that define (better, will call that
#define if that #define exists), simplifying any further operation.
> Another comment on side effects of restarting MySQL.
> Courier auth daemon must be restarted, because it does not try to reopen
any MySQL connection.
> It would be nice to have a simple perl script monitoring MySQL (an
attach every x minutes), and in case of problem:
> - running a script for shutting down Courier and other mail
> - stopping/restarting MySQL
> - running a script for restarting all mail services
Does authdaemon die if it loses its connection to MySQL? If so why not
just run it under daemontools. If not, perhaps it should...
No, authdaemon seems to be simply opening a connection when starting
and then trying the same connection for all future operations. So,
after MySQL has been stopped, that connection cannot work anymore.
SJGames MIB #5273 - OGRE AI Testing Division
You can't win; You can't break even; You can't even quit the game.
- Layman's translation of the Laws of Thermodynamics