> Actually, I think a much better way of doing this is to give
> DBMail a few 'keywords' that can be used in configurable auth queries.
Absolutely -- this is exactly what I had in mind. I only thing the queries
that relate to determining a user's user_idnr are the ones that need to be
customizable. The ones relating the internal mail structure shouldn't need
configuring.
I had a fresh look at the 2.0 CVS (been a while since I really examined the
CVS), and the structure with the auth/ looks great, as I'm guessing that
would be the only place we need to play. Worst case, I guess a custom
authsql.c could be written with our custom queries. Only about 10 queries
are used by the looks of it. It would certainly be nice to implement this
into the main tree though.
/Mark
> [AUTH]
> auth_user_exists = SELECT name AS %user_name%, uid AS %user_idnr% FROM
> radius.usernames WHERE name = %auth_user_name% AND ipaddr =
> %auth_ip_address%
>
> Something like that. Basically, DBMail would run this query with the
> %variable% names replaced with (quoted if necessary) internal
> values. So the
> AS clauses would force the return columns to have the names
> that DBMail
> expects, while the WHERE clause can still use the native
> naming. (I just
> tested this on MySQL 4.0.16).