[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

select distinct query in readlocals should use enabled field



I'm thinking that the "SELECT DISTINCT" queries in the readlocals() function of
sql.c should ignore records where the enabled field is false, and probably also
records that fall outside the active time range. If I disable an entire
domain's email with a query that sets all the enabled fields for that domain to
false, then qmail-sql still accepts mail for that domain.

Also, I'm using the users table for applications other than qmail-sql (like
authenticating a web site), and I have multiple "enabled" fields. For example,
"can_mail" is a boolean field that qmail-sql uses as its "enabled" field, while
"can_auth" is a second boolean field that Apache uses as its "enabled" field.
This way, I can control access to the web site and email separately -- and I
can have web site users that don't have email. However, in that situation, I
don't want qmail-sql to start accepting emails for that domain.

Michael, I will be making this mod myself unless you beat me to it. Should I
make it have this behavior in all cases, or control it with a variable from the
sqlserver file?

-- 
Alex Howansky
Wankwood Associates
http://www.wankwood.com/