OK, this will be fun to explain.
I have a large vpopmail install that I'm running this on so the system
is quite busy. I recently converted this system from .cdb to MySQL
authentication. In so doing, we've happened upon a few anomalies, the
strangest one being that qmailadmin functions only worked
intermittently.
We use MySQL replication and have a MySQL master running on a quad Xeon
that is more than adequate hardware wise. We replicate to each mail
server via MySQL replication. Vpopmail is then configured to write
updates to the master and read from the slave on localhost. This works
quite well for vpopmail.
So, upon noticing that qmailadmin wasn't working reliably, we started
poking around and saw that every time we made a change in qmailadmin,
we'd get two updates written to the MySQL master (as observed in
binlog). The first would have all the values we wanted, the second
would end up resetting those values to exactly what they were before
the attempted change was made.
So, a little visit to the qmailadmin source code revealed the culprit
in user.c.
