ma...@intron.ac wrote:
I have the same sense. What Simone wrote into authmysqlrc would
take effect in SQL command as:
SELECT '/usr/local/virtual','1001','1001' FROM mailbox WHERE ...
Obviously, your data table hasn't fields "'/usr/local/virtual'"
and "'1001'".
This actually works. This is a valid mysql statement.
SELECT 'foo';
returns 'foo'.
I suggess you to:
1. Add a field "home" into your table "mailbox".
2. Write the three lines as followed:
MYSQL_HOME_FIELD home
MYSQL_UID_FIELD uid
MYSQL_GID_FIELD gid
He doesn't need to add unnecessary columns.
Actually, only a field "home" is enough, which implies every user's
maildir as "$HOME/Maildir". No need to specify "maildir" respectively.
no, his home is constant. he thus needs to define a maildir field,
either in his sql table or use something like
MYSQL_MAILDIR_FIELD concat(domain, '/', username, '/')
(I'm not sure what's in his 'username' field though...).
Besides debugging method introduced by Jay, you may also run MySQL
server in debug mode. In this case, MySQL server will log all submitted
SQL commands in trace file. See the section "Creating Trace Files" (F.1.2
or E.1.2) in MySQL Reference Manual.
P.S. To secure your MySQL server, you may run it with
"--skip-networking" to disable TCP port at all. In authmysqlrc, you may
use "MYSQL_SOCKET" to specify MySQL server's UNIX domain socket entry
instead of "MYSQL_SERVER" for "127.0.0.1".
127.0.0.1 may help in chrotted environments. also, some systems have a
broken implementation of unix sockets.