[Postfixbuch-users] [OT] Courier: MYSQL_SELECT_CLAUSE
Thomas Schwenski
postfixbuch at thomas-schwenski.de
Fr Okt 12 22:24:16 CEST 2007
Kann es sein, dass Du MYSQL_SELECT_CLAUSE und MYSQL_WHERE_CLAUSE vermischst?
> Dazu kann ich wenig sagen.. Wenn ich Dich richtig verstanden habe
> möchtest Du aber so Optionen wie "MYSQL_LOGIN_FIELD" oder
> "MYSQL_CRYPT_PWFIELD" ersetzen. Ich frage mich, wie Du das überhaupt
> machen willst, da Dir ja die Werte, die Du in der Datenbank suchst, an
> der MYSQL_SELECT_CLAUSE Stelle gar nicht zur Verfügung stehen.
>
Das steht bei mir zum Thema in der Vorlage:
##NAME:
MYSQL_SELECT_CLAUSE:0
#
#
(EXPERIMENTAL)
# This is optional, MYSQL_SELECT_CLAUSE can be set when you have a
database,
# which is structuraly different from proposed. The fixed string
will
# be used to do a SELECT operation on database, which should return
fields
# in order specified
bellow:
#
# username, cryptpw, clearpw, uid, gid, home, maildir, quota, fullname,
options
#
# The username field should include the domain (see example
below).
#
# Enabling this option causes ignorance of any other
field-related
# options, excluding default
domain.
#
# There are two variables, which you can use. Substitution will be
made
# for them, so you can put entered username (local part) and domain
name
# in the right place of your query. These variables
are:
# $(local_part), $(domain),
$(service)
#
# If a $(domain) is empty (not given by the remote user) the default
domain
# name is used in its
place.
#
# $(service) will expand out to the service being authenticated: imap,
imaps,
# pop3 or pop3s. Courier mail server only: service will also expand out
to
# "courier", when searching for local mail account's location. In this
case,
# if the "maildir" field is not empty it will be used in place
of
# DEFAULTDELIVERY. Courier mail server will also use esmtp when
doing
# authenticated
ESMTP.
#
# This example is a little bit modified adaptation of
vmail-sql
# database
scheme:
#
# MYSQL_SELECT_CLAUSE SELECT CONCAT(popbox.local_part, '@',
popbox.domain_name),
\
# CONCAT('{MD5}', popbox.password_hash),
\
# popbox.clearpw,
\
# domain.uid,
\
# domain.gid,
\
# CONCAT(domain.path, '/', popbox.mbox_name),
\
# '',
\
# domain.quota,
\
# '', \
#
CONCAT("disableimap=",disableimap,",disablepop3=",
\
#
disablepop3,",disablewebmail=",disablewebmail,
\
# ",sharedgroup=",sharedgroup)
\
# FROM popbox, domain
\
# WHERE popbox.local_part = '$(local_part)'
\
# AND popbox.domain_name = '$(domain)'
\
# AND popbox.domain_name = domain.domain_name
Thomas
Mehr Informationen über die Mailingliste Postfixbuch-users