This is a discussion on Re: [courier-users] Courier-authlib-mysql within the Courier-Imap forums, part of the Mail Servers and Related category; This is a multi-part message in MIME format. --===============1344326954== Content-Type: multipart/alternative; boundary="----=_NextPart_000_0001_01C84BDD.D742E440" This ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
This is a multi-part message in MIME format.
--===============1344326954== Content-Type: multipart/alternative; boundary="----=_NextPart_000_0001_01C84BDD.D742E440" This is a multi-part message in MIME format. ------=_NextPart_000_0001_01C84BDD.D742E440 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable here is the authmysqlrc ##VERSION: $Id: authmysqlrc,v 1.19 2007/02/10 02:51:07 mrsam Exp $ # # Copyright 2000-2007 Double Precision, Inc. See COPYING for # distribution information. # # Do not alter lines that begin with ##, they are used when upgrading # this configuration. # # authmysqlrc created from authmysqlrc.dist by sysconftool # # DO NOT INSTALL THIS FILE with world read permissions. This file # might contain the MySQL admin password! # # Each line in this file must follow the following format: # # field[spaces|tabs]value # # That is, the name of the field, followed by spaces or tabs, followed by # field value. Trailing spaces are prohibited. =20 ##NAME: LOCATION:0 # # The server name, userid, and password used to log in. MYSQL_SERVER 127.0.0.1 MYSQL_USERNAME=20 MYSQL_PASSWORD=20 MYSQL_DATABASE postfix MYSQL_USER_TABLE mailbox MYSQL_LOGIN_FIELD username MYSQL_NAME_FIELD name MYSQL_CRYPT_PWFIELD password #MYSQL_CLEAR_PWFIELD password MYSQL_MAILDIR_FIELD maildir MYSQL_QUOTA_FIELD concat(quota,'S') MYSQL_HOME_FIELD '/home/vmail' MYSQL_UID_FIELD '5000' MYSQL_GID_FIELD '5000' ##NAME: SSLINFO:0 # # The SSL information. # # To use SSL-encrypted connections, define the following variables (available # in MySQL 4.0, or higher): # # # MYSQL_SSL_KEY /path/to/file # MYSQL_SSL_CERT /path/to/file # MYSQL_SSL_CACERT /path/to/file # MYSQL_SSL_CAPATH /path/to/file # MYSQL_SSL_CIPHERS ALL:!DES =20 =20 ##NAME: MYSQL_SOCKET:0 # # MYSQL_SOCKET can be used with MySQL version 3.22 or later, it specifies the # filesystem pipe used for the connection # # MYSQL_SOCKET /var/run/mysqld/mysqld.sock =20 =20 ##NAME: MYSQL_PORT:0 # # MYSQL_PORT can be used with MySQL version 3.22 or later to specify a port to # connect to. MYSQL_PORT 0 ##NAME: MYSQL_OPT:0 # # Leave MYSQL_OPT as 0, unless you know what you're doing. MYSQL_OPT 0 ##NAME: MYSQL_DATABASE:0 # # The name of the MySQL database we will open: MYSQL_DATABASE mj ##NAME: MYSQL_USER_TABLE:0 # # The name of the table containing your user data. See README.authmysqlrc # for the required fields in this table. MYSQL_USER_TABLE mailbox ##NAME: MYSQL_CRYPT_PWFIELD:0 # # Either MYSQL_CRYPT_PWFIELD or MYSQL_CLEAR_PWFIELD must be defined. Both # are OK too. crypted passwords go into MYSQL_CRYPT_PWFIELD, cleartext # passwords go into MYSQL_CLEAR_PWFIELD. Cleartext passwords allow # CRAM-MD5 authentication to be implemented. MYSQL_CRYPT_PWFIELD crypt ##NAME: MYSQL_CLEAR_PWFIELD:0 # # # MYSQL_CLEAR_PWFIELD clear =20 =20 ##NAME: MYSQL_DEFAULT_DOMAIN:0 # # If DEFAULT_DOMAIN is defined, and someone tries to log in as 'user', # we will look up 'user@DEFAULT_DOMAIN' instead. # # =20 =20 ##NAME: MYSQL_UID_FIELD:0 # # Other fields in the mysql table: # # MYSQL_UID_FIELD - contains the numerical userid of the account # MYSQL_UID_FIELD uid ##NAME: MYSQL_GID_FIELD:0 # # Numerical groupid of the account MYSQL_GID_FIELD gid ##NAME: MYSQL_LOGIN_FIELD:0 # # The login id, default is id. Basically the query is: # # SELECT MYSQL_UID_FIELD, MYSQL_GID_FIELD, ... WHERE id=3D'loginid' # MYSQL_LOGIN_FIELD id ##NAME: MYSQL_HOME_FIELD:0 # MYSQL_HOME_FIELD home ##NAME: MYSQL_NAME_FIELD:0 # # The user's name (optional) MYSQL_NAME_FIELD name ##NAME: MYSQL_MAILDIR_FIELD:0 # # This is an optional field, and can be used to specify an arbitrary # location of the maildir for the account, which normally defaults to # $HOME/Maildir (where $HOME is read from MYSQL_HOME_FIELD). # # You still need to provide a MYSQL_HOME_FIELD, even if you uncomment this # out. # # MYSQL_MAILDIR_FIELD maildir MYSQL_MAILDIR_FIELD maildir ##NAME: MYSQL_DEFAULTDELIVERY:0 # # Courier mail server only: optional field specifies custom mail delivery # instructions for this account (if defined) -- essentially overrides # DEFAULTDELIVERY from ${sysconfdir}/courierd # # MYSQL_DEFAULTDELIVERY defaultdelivery =20 =20 ##NAME: MYSQL_QUOTA_FIELD:0 # # Define MYSQL_QUOTA_FIELD to be the name of the field that can optionally # specify a maildir quota. See README.maildirquota for more information=20 # # MYSQL_QUOTA_FIELD quota MYSQL_QUOTA_FIELD concat(quota,'S') ##NAME: MYSQL_AUXOPTIONS:0 # # Auxiliary options. The MYSQL_AUXOPTIONS field should be a char field that # contains a single string consisting of comma-separated "ATTRIBUTE=3DNAME" # pairs. These names are additional attributes that define various per-account # "options", as given in INSTALL's description of the "Account OPTIONS" # setting. # # MYSQL_AUXOPTIONS_FIELD auxoptions # # You might want to try something like this, if you'd like to use a bunch # of individual fields, instead of a single text blob: # # MYSQL_AUXOPTIONS_FIELD CONCAT("disableimap=3D",disableimap,",disablepop3= 3D",disablepop3,",disab= lew ebmail=3D",disablewebmail,",sharedgroup=3D",shared group) # # This will let you define fields called "disableimap", etc, with the end result # being something that the OPTIONS parser understands. =20 =20 ##NAME: MYSQL_WHERE_CLAUSE:0 # # This is optional, MYSQL_WHERE_CLAUSE can be basically set to an arbitrary # fixed string that is appended to the WHERE clause of our query # # MYSQL_WHERE_CLAUSE server=3D'mailhost.example.com' =20 =20 ##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=3D",disableimap,",disablepop3= 3D", \ # disablepop3,",disablewebmail=3D",disablewebmail, \ # ",sharedgroup=3D",sharedgroup) \ # FROM popbox, domain \ # WHERE popbox.local_part =3D '$(local_part)' \ # AND popbox.domain_name =3D '$(domain)' \ # AND popbox.domain_name =3D domain.domain_name =20 =20 ##NAME: MYSQL_ENUMERATE_CLAUSE:1 # # {EXPERIMENTAL} # Optional custom SQL query used to enumerate accounts for authenumerate, # in order to compile a list of accounts for shared folders. The query # should return the following fields: name, uid, gid, homedir, maildir, options # # Example: # MYSQL_ENUMERATE_CLAUSE SELECT CONCAT(popbox.local_part, '@', popbox.domain_name), \ # domain.uid, \ # domain.gid, \ # CONCAT(domain.path, '/', popbox.mbox_name), \ # '', \ # CONCAT('sharedgroup=3D', sharedgroup) \ # FROM popbox, domain \ # WHERE popbox.local_part =3D '$(local_part)' \ # AND popbox.domain_name =3D '$(domain)' \ # AND popbox.domain_name =3D domain.domain_name =20 =20 ##NAME: MYSQL_CHPASS_CLAUSE:0 # # (EXPERIMENTAL) # This is optional, MYSQL_CHPASS_CLAUSE can be set when you have a database, # which is structuraly different from proposed. The fixed string will # be used to do an UPDATE operation on database. In other words, it is # used, when changing password. # # There are four 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. There variables are: # $(local_part) , $(domain) , $(newpass) , $(newpass_crypt) # # If a $(domain) is empty (not given by the remote user) the default domain # name is used in its place. # $(newpass) contains plain password # $(newpass_crypt) contains its crypted form # # MYSQL_CHPASS_CLAUSE UPDATE popbox \ # SET clearpw=3D'$(newpass)', \ # password_hash=3D'$(newpass_crypt)' \ # WHERE local_part=3D'$(local_part)' \ # AND domain_name=3D'$(domain)' # =20 =20 =20 -----Ursprungligt =20 meddelande----- Fr=E5n: jlee@gtest.pbu.edu [mailto:jlee@gtest.pbu.edu] F=F6r Jay Lee Skickat: den 31 december 2007 17:52 Till: mattias =C4mne: Re: [courier-users] Courier-authlib-mysql On 12/31/07, mattias <mj@mjw.se> wrote:=20 I try tu use mysql with courier But i can't get it to work My database exist and my user have full rights to it Post the contents of your authlib/authmysqlrc file.=20 My log follow Dec 31 16:59:50 mjw imapd: authentication error: Input/output error Dec 31 17:05:24 mjw authdaemond: authmysql: mysql_select_db(mj.) error: Incorrect database name 'mj.' Dec 31 17:05:24 mjw imapd: authentication error: Input/output error=20 Dec 31 17:08:10 mjw authdaemond: authmysql: mysql_select_db(mj.) error: Incorrect database name 'mj.' Dec 31 17:08:10 mjw imapd: authentication error: Input/output error Please help! Set DEBUG=3D1 in authlib/authdaemonrc and repost this log (it will be = more verbose)=20 Jay --=20 Jay Lee Network / Systems Administrator Information Technology Dept. Philadelphia Biblical University=20 ------=_NextPart_000_0001_01C84BDD.D742E440 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Diso-8859-1"> <TITLE>Meddelande</TITLE> <META content=3D"MSHTML 6.00.2900.3199" name=3DGENERATOR></HEAD> <BODY> <DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN = class=3D906204817-31122007>here=20 is the authmysqlrc</SPAN></FONT></DIV> <DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN = class=3D906204817-31122007><FONT=20 size=3D2> <P>##VERSION: $Id: authmysqlrc,v 1.19 2007/02/10 02:51:07 mrsam Exp = $</P> <P>#</P> <P># Copyright 2000-2007 Double Precision, Inc. See COPYING for</P> <P># distribution information.</P> <P>#</P> <P># Do not alter lines that begin with ##, they are used when = upgrading</P> <P># this configuration.</P> <P>#</P> <P># authmysqlrc created from authmysqlrc.dist by sysconftool</P> <P>#</P> <P># DO NOT INSTALL THIS FILE with world read permissions. This file</P> <P># might contain the MySQL admin password!</P> <P>#</P> <P># Each line in this file must follow the following format:</P> <P>#</P> <P># field[spaces|tabs]value</P> <P>#</P> <P># That is, the name of the field, followed by spaces or tabs, = followed by</P> <P># field value. Trailing spaces are prohibited.</P> <P> </P> <P>##NAME: LOCATION:0</P> <P>#</P> <P># The server name, userid, and password used to log in.</P> <P>MYSQL_SERVER 127.0.0.1</P> <P>MYSQL_USERNAME </P> <P>MYSQL_PASSWORD </P> <P>MYSQL_DATABASE postfix</P> <P>MYSQL_USER_TABLE mailbox</P> <P>MYSQL_LOGIN_FIELD username</P> <P>MYSQL_NAME_FIELD name</P> <P>MYSQL_CRYPT_PWFIELD password</P> <P>#MYSQL_CLEAR_PWFIELD password</P> <P>MYSQL_MAILDIR_FIELD maildir</P> <P>MYSQL_QUOTA_FIELD concat(quota,'S')</P> <P>MYSQL_HOME_FIELD '/home/vmail'</P> <P>MYSQL_UID_FIELD '5000'</P> <P>MYSQL_GID_FIELD '5000'</P> <P>##NAME: SSLINFO:0</P> <P>#</P> <P># The SSL information.</P> <P>#</P> <P># To use SSL-encrypted connections, define the following variables=20 (available</P> <P># in MySQL 4.0, or higher):</P> <P>#</P> <P>#</P> <P># MYSQL_SSL_KEY /path/to/file</P> <P># MYSQL_SSL_CERT /path/to/file</P> <P># MYSQL_SSL_CACERT /path/to/file</P> <P># MYSQL_SSL_CAPATH /path/to/file</P> <P># MYSQL_SSL_CIPHERS ALL:!DES</P> <P> </P> <P> </P> <P>##NAME: MYSQL_SOCKET:0</P> <P>#</P> <P># MYSQL_SOCKET can be used with MySQL version 3.22 or later, it = specifies=20 the</P> <P># filesystem pipe used for the connection</P> <P>#</P> <P># MYSQL_SOCKET /var/run/mysqld/mysqld.sock</P> <P> </P> <P> </P> <P>##NAME: MYSQL_PORT:0</P> <P>#</P> <P># MYSQL_PORT can be used with MySQL version 3.22 or later to specify = a port=20 to</P> <P># connect to.</P> <P>MYSQL_PORT 0</P> <P>##NAME: MYSQL_OPT:0</P> <P>#</P> <P># Leave MYSQL_OPT as 0, unless you know what you're doing.</P> <P>MYSQL_OPT 0</P> <P>##NAME: MYSQL_DATABASE:0</P> <P>#</P> <P># The name of the MySQL database we will open:</P> <P>MYSQL_DATABASE mj</P> <P>##NAME: MYSQL_USER_TABLE:0</P> <P>#</P> <P># The name of the table containing your user data. See = README.authmysqlrc</P> <P># for the required fields in this table.</P> <P>MYSQL_USER_TABLE mailbox</P> <P>##NAME: MYSQL_CRYPT_PWFIELD:0</P> <P>#</P> <P># Either MYSQL_CRYPT_PWFIELD or MYSQL_CLEAR_PWFIELD must be defined. = Both</P> <P># are OK too. crypted passwords go into MYSQL_CRYPT_PWFIELD, = cleartext</P> <P># passwords go into MYSQL_CLEAR_PWFIELD. Cleartext passwords = allow</P> <P># CRAM-MD5 authentication to be implemented.</P> <P>MYSQL_CRYPT_PWFIELD crypt</P> <P>##NAME: MYSQL_CLEAR_PWFIELD:0</P> <P>#</P> <P>#</P> <P># MYSQL_CLEAR_PWFIELD clear</P> <P> </P> <P> </P> <P>##NAME: MYSQL_DEFAULT_DOMAIN:0</P> <P>#</P> <P># If DEFAULT_DOMAIN is defined, and someone tries to log in as = 'user',</P> <P># we will look up 'user@DEFAULT_DOMAIN' instead.</P> <P>#</P> <P>#</P> <P> </P> <P> </P> <P>##NAME: MYSQL_UID_FIELD:0</P> <P>#</P> <P># Other fields in the mysql table:</P> <P>#</P> <P># MYSQL_UID_FIELD - contains the numerical userid of the account</P> <P>#</P> <P>MYSQL_UID_FIELD uid</P> <P>##NAME: MYSQL_GID_FIELD:0</P> <P>#</P> <P># Numerical groupid of the account</P> <P>MYSQL_GID_FIELD gid</P> <P>##NAME: MYSQL_LOGIN_FIELD:0</P> <P>#</P> <P># The login id, default is id. Basically the query is:</P> <P>#</P> <P># SELECT MYSQL_UID_FIELD, MYSQL_GID_FIELD, ... WHERE = id=3D'loginid'</P> <P>#</P> <P>MYSQL_LOGIN_FIELD id</P> <P>##NAME: MYSQL_HOME_FIELD:0</P> <P>#</P> <P>MYSQL_HOME_FIELD home</P> <P>##NAME: MYSQL_NAME_FIELD:0</P> <P>#</P> <P># The user's name (optional)</P> <P>MYSQL_NAME_FIELD name</P> <P>##NAME: MYSQL_MAILDIR_FIELD:0</P> <P>#</P> <P># This is an optional field, and can be used to specify an = arbitrary</P> <P># location of the maildir for the account, which normally defaults = to</P> <P># $HOME/Maildir (where $HOME is read from MYSQL_HOME_FIELD).</P> <P>#</P> <P># You still need to provide a MYSQL_HOME_FIELD, even if you uncomment = this</P> <P># out.</P> <P>#</P> <P># MYSQL_MAILDIR_FIELD maildir</P> <P>MYSQL_MAILDIR_FIELD maildir</P> <P>##NAME: MYSQL_DEFAULTDELIVERY:0</P> <P>#</P> <P># Courier mail server only: optional field specifies custom mail = delivery</P> <P># instructions for this account (if defined) -- essentially = overrides</P> <P># DEFAULTDELIVERY from ${sysconfdir}/courierd</P> <P>#</P> <P># MYSQL_DEFAULTDELIVERY defaultdelivery</P> <P> </P> <P> </P> <P>##NAME: MYSQL_QUOTA_FIELD:0</P> <P>#</P> <P># Define MYSQL_QUOTA_FIELD to be the name of the field that can=20 optionally</P> <P># specify a maildir quota. See README.maildirquota for more = information </P> <P>#</P> <P># MYSQL_QUOTA_FIELD quota</P> <P>MYSQL_QUOTA_FIELD concat(quota,'S')</P> <P>##NAME: MYSQL_AUXOPTIONS:0</P> <P>#</P> <P># Auxiliary options. The MYSQL_AUXOPTIONS field should be a char = field=20 that</P> <P># contains a single string consisting of comma-separated = "ATTRIBUTE=3DNAME"</P> <P># pairs. These names are additional attributes that define various=20 per-account</P> <P># "options", as given in INSTALL's description of the "Account = OPTIONS"</P> <P># setting.</P> <P>#</P> <P># MYSQL_AUXOPTIONS_FIELD auxoptions</P> <P>#</P> <P># You might want to try something like this, if you'd like to use a = bunch</P> <P># of individual fields, instead of a single text blob:</P> <P>#</P> <P># MYSQL_AUXOPTIONS_FIELD=20 CONCAT("disableimap=3D",disableimap,",disablepop3= 3D",disablepop3,",disab= lewebmail=3D",disablewebmail,",sharedgroup=3D",sha redgroup)</P> <P>#</P> <P># This will let you define fields called "disableimap", etc, with the = end=20 result</P> <P># being something that the OPTIONS parser understands.</P> <P> </P> <P> </P> <P>##NAME: MYSQL_WHERE_CLAUSE:0</P> <P>#</P> <P># This is optional, MYSQL_WHERE_CLAUSE can be basically set to an=20 arbitrary</P> <P># fixed string that is appended to the WHERE clause of our query</P> <P>#</P> <P># MYSQL_WHERE_CLAUSE server=3D'mailhost.example.com'</P> <P> </P> <P> </P> <P>##NAME: MYSQL_SELECT_CLAUSE:0</P> <P>#</P> <P># (EXPERIMENTAL)</P> <P># This is optional, MYSQL_SELECT_CLAUSE can be set when you have a=20 database,</P> <P># which is structuraly different from proposed. The fixed string = will</P> <P># be used to do a SELECT operation on database, which should return=20 fields</P> <P># in order specified bellow:</P> <P>#</P> <P># username, cryptpw, clearpw, uid, gid, home, maildir, quota, = fullname,=20 options</P> <P>#</P> <P># The username field should include the domain (see example = below).</P> <P>#</P> <P># Enabling this option causes ignorance of any other = field-related</P> <P># options, excluding default domain.</P> <P>#</P> <P># There are two variables, which you can use. Substitution will be = made</P> <P># for them, so you can put entered username (local part) and domain = name</P> <P># in the right place of your query. These variables are:</P> <P># $(local_part), $(domain), $(service)</P> <P>#</P> <P># If a $(domain) is empty (not given by the remote user) the default=20 domain</P> <P># name is used in its place.</P> <P>#</P> <P># $(service) will expand out to the service being authenticated: = imap,=20 imaps,</P> <P># pop3 or pop3s. Courier mail server only: service will also expand = out=20 to</P> <P># "courier", when searching for local mail account's location. In = this=20 case,</P> <P># if the "maildir" field is not empty it will be used in place of</P> <P># DEFAULTDELIVERY. Courier mail server will also use esmtp when = doing</P> <P># authenticated ESMTP.</P> <P>#</P> <P># This example is a little bit modified adaptation of vmail-sql</P> <P># database scheme:</P> <P>#</P> <P># MYSQL_SELECT_CLAUSE SELECT CONCAT(popbox.local_part, '@',=20 popbox.domain_name), \</P> <P># CONCAT('{MD5}', popbox.password_hash), \</P> <P># popbox.clearpw, \</P> <P># domain.uid, \</P> <P># domain.gid, \</P> <P># CONCAT(domain.path, '/', popbox.mbox_name), \</P> <P># '', \</P> <P># domain.quota, \</P> <P># '', \</P> <P># CONCAT("disableimap=3D",disableimap,",disablepop3= 3D", \</P> <P># disablepop3,",disablewebmail=3D",disablewebmail, \</P> <P># ",sharedgroup=3D",sharedgroup) \</P> <P># FROM popbox, domain \</P> <P># WHERE popbox.local_part =3D '$(local_part)' \</P> <P># AND popbox.domain_name =3D '$(domain)' \</P> <P># AND popbox.domain_name =3D domain.domain_name</P> <P> </P> <P> </P> <P>##NAME: MYSQL_ENUMERATE_CLAUSE:1</P> <P>#</P> <P># {EXPERIMENTAL}</P> <P># Optional custom SQL query used to enumerate accounts for = authenumerate,</P> <P># in order to compile a list of accounts for shared folders. The = query</P> <P># should return the following fields: name, uid, gid, homedir, = maildir,=20 options</P> <P>#</P> <P># Example:</P> <P># MYSQL_ENUMERATE_CLAUSE SELECT CONCAT(popbox.local_part, '@',=20 popbox.domain_name), \</P> <P># domain.uid, \</P> <P># domain.gid, \</P> <P># CONCAT(domain.path, '/', popbox.mbox_name), \</P> <P># '', \</P> <P># CONCAT('sharedgroup=3D', sharedgroup) \</P> <P># FROM popbox, domain \</P> <P># WHERE popbox.local_part =3D '$(local_part)' \</P> <P># AND popbox.domain_name =3D '$(domain)' \</P> <P># AND popbox.domain_name =3D domain.domain_name</P> <P> </P> <P> </P> <P>##NAME: MYSQL_CHPASS_CLAUSE:0</P> <P>#</P> <P># (EXPERIMENTAL)</P> <P># This is optional, MYSQL_CHPASS_CLAUSE can be set when you have a=20 database,</P> <P># which is structuraly different from proposed. The fixed string = will</P> <P># be used to do an UPDATE operation on database. In other words, it = is</P> <P># used, when changing password.</P> <P>#</P> <P># There are four variables, which you can use. Substitution will be = made</P> <P># for them, so you can put entered username (local part) and domain = name</P> <P># in the right place of your query. There variables are:</P> <P># $(local_part) , $(domain) , $(newpass) , $(newpass_crypt)</P> <P>#</P> <P># If a $(domain) is empty (not given by the remote user) the default=20 domain</P> <P># name is used in its place.</P> <P># $(newpass) contains plain password</P> <P># $(newpass_crypt) contains its crypted form</P> <P>#</P> <P># MYSQL_CHPASS_CLAUSE UPDATE popbox \</P> <P># SET clearpw=3D'$(newpass)', \</P> <P># password_hash=3D'$(newpass_crypt)' \</P> <P># WHERE local_part=3D'$(local_part)' \</P> <P># AND domain_name=3D'$(domain)'</P> <P>#</P> <P> </P> <P> </P> <P> </P></FONT></SPAN></FONT></DIV> <BLOCKQUOTE style=3D"MARGIN-RIGHT: 0px"> <DIV></DIV> <DIV class=3DOutlookMessageHeader lang=3Dsv dir=3Dltr = align=3Dleft><FONT face=3DTahoma=20 size=3D2>-----Ursprungligt <SPAN class=3D906204817-31122007><FONT = face=3DArial=20 color=3D#0000ff> </FONT></SPAN></FONT></DIV> <DIV class=3DOutlookMessageHeader lang=3Dsv dir=3Dltr = align=3Dleft><FONT face=3DTahoma=20 size=3D2><SPAN=20 = class=3D906204817-31122007> </SPAN>meddelande-----<BR><B>Fr=E5n:</B>= =20 jlee@gtest.pbu.edu [mailto:jlee@gtest.pbu.edu] <B>F=F6r </B>Jay=20 Lee<BR><B>Skickat:</B> den 31 december 2007 17:52<BR><B>Till:</B>=20 mattias<BR><B>=C4mne:</B> Re: [courier-users]=20 Courier-authlib-mysql<BR><BR></DIV></FONT>On 12/31/07, <B=20 class=3Dgmail_sendername>mattias</B> <<A=20 href=3D"mailto:mj@mjw.se">mj@mjw.se</A>> wrote: <DIV><SPAN class=3Dgmail_quote></SPAN> <BLOCKQUOTE class=3Dgmail_quote=20 style=3D"PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: = rgb(204,204,204) 1px solid">I=20 try tu use mysql with courier<BR>But i can't get it to work<BR>My = database=20 exist and my user have full rights to it</BLOCKQUOTE> <DIV><BR><BR>Post the contents of your authlib/authmysqlrc file.=20 <BR></DIV><BR> <BLOCKQUOTE class=3Dgmail_quote=20 style=3D"PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: = rgb(204,204,204) 1px solid">My=20 log follow<BR>Dec 31 16:59:50 mjw imapd: authentication error: = Input/output=20 error<BR>Dec 31 17:05:24 mjw authdaemond: authmysql: = mysql_select_db(mj.)=20 error:<BR>Incorrect database name 'mj.'<BR>Dec 31 17:05:24 mjw = imapd:=20 authentication error: Input/output error <BR>Dec 31 17:08:10 mjw=20 authdaemond: authmysql: mysql_select_db(mj.) error:<BR>Incorrect = database=20 name 'mj.'<BR>Dec 31 17:08:10 mjw imapd: authentication error: = Input/output=20 error<BR>Please help!</BLOCKQUOTE> <DIV><BR><BR>Set DEBUG=3D1 in authlib/authdaemonrc and repost this log = (it will=20 be more verbose) <BR></DIV><BR></DIV><BR clear=3Dall>Jay<BR>-- <BR>Jay = Lee<BR>Network / Systems Administrator<BR>Information Technology=20 Dept.<BR>Philadelphia Biblical University </BLOCKQUOTE></BODY></HTML> ------=_NextPart_000_0001_01C84BDD.D742E440-- --===============1344326954== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ --===============1344326954== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ courier-users mailing list courier-users@lists.sourceforge.net Unsubscribe: https://lists.sourceforge.net/lists/.../courier-users --===============1344326954==-- |
![]() |
| Thread Tools | |
| Display Modes | |
|
|