--- Stefan Hornburg <[EMAIL PROTECTED]> wrote:

> Stephen Liu wrote:
> > Hi folks,
> > 
> > 
> > Debian Etch
> > Postfix
> > openssl
> > Courier-IMAP
> > MySQL
> > SASL - libsasl2
> > amavis-new
> > ClamAV
> > Spam Assassin
> > postgrey
> > 
> > 
> > remote mail client - Evolution
> > 
> > 
> > I followed;
> > http://flurdy.com/docs/postfix/edition5.html
> > 
> > 
> > building the mail server running postfix virtual.  The server is
> > running, sending/receiving mails without problem.  But Evolution
> can't
> > login in the server to send and download mails.
> > 
> > 
> > # tail /var/log/mail.log
> > Nov 18 02:52:16 xen05 imapd: LOGIN: ip=[::ffff:192.168.0.110],
> > command=CAPABILITY
> > Nov 18 02:52:16 xen05 imapd: LOGIN: ip=[::ffff:192.168.0.110],
> > command=AUTHENTICATE
> > Nov 18 02:52:16 xen05 authdaemond: received auth request,
> service=imap,
> > authtype=cram-md5
> > Nov 18 02:52:16 xen05 authdaemond: authmysql: trying this module
> > Nov 18 02:52:16 xen05 authdaemond: cram:
> >
>
challenge=PDQyOEM4MTA3MTdCNTdDMkNDOURCNkI2MkE2MjdGN0QyQHhlbjA1LnNhdGltaXMuY29tPg==,
> > response=c2F0aW1pcyAzYjBiMGQ3MTljNjA5MmJkODk2NjNhYzhlYTZiZmI2MQ==
> > Nov 18 02:52:16 xen05 authdaemond: cram: decoded
> challenge/response,
> > username 'satimis'
> > Nov 18 02:52:16 xen05 authdaemond: failed to connect to mysql
> server
> > (server=<null>, userid=mail): Access denied for user
> 'mail'@'localhost'
> > (using password: YES)
> > Nov 18 02:52:16 xen05 authdaemond: authmysql: TEMPFAIL - no more
> > modules will be tried
> > Nov 18 02:52:16 xen05 imapd: LOGIN FAILED, method=CRAM-MD5,
> > ip=[::ffff:192.168.0.110]
> > Nov 18 02:52:16 xen05 imapd: authentication error: Input/output
> error
> > * end *
> 
> Configure authdaemon to use the correct credentials for accessing
> MySQL
> database.


Hi Racke,


Thanks for your advice.


I have been trying 2 days without solution.


# cat /etc/courier/authdaemonrc
##VERSION: $Id: authdaemonrc.in,v 1.13 2005/10/05 00:07:32 mrsam Exp $
version=""

authmodulelist="authmysql"

authmodulelistorig="authuserdb authpam authpgsql authldap authmysql
authcustom authpipe"

daemons=5

##NAME: authdaemonvar:2
authdaemonvar=/var/run/courier/authdaemon

##NAME: DEBUG_LOGIN:0
DEBUG_LOGIN=1

##NAME: DEFAULTOPTIONS:0
DEFAULTOPTIONS=""

##NAME: LOGGEROPTS:0
LOGGEROPTS=""
* end *


# cat /etc/courier/authmysqlrc
##VERSION: $Id: authmysqlrc,v 1.18 2004/11/14 02:58:16 mrsam Exp $

##NAME: LOCATION:0

MYSQL_SERVER           localhost
MYSQL_USERNAME          mail
MYSQL_PASSWORD          mailpass

##NAME: MYSQL_SOCKET:0
MYSQL_SOCKET            /var/run/mysqld/mysqld.sock

##NAME: MYSQL_PORT:0
MYSQL_PORT             0  ##

##NAME: MYSQL_OPT:0
MYSQL_OPT              0   ##

##NAME: MYSQL_DATABASE:0
MYSQL_DATABASE          maildb

##NAME: MYSQL_USER_TABLE:0
MYSQL_USER_TABLE        users

##NAME: MYSQL_CRYPT_PWFIELD:0
MYSQL_CRYPT_PWFIELD     crypt

##NAME: MYSQL_CLEAR_PWFIELD:0
MYSQL_CLEAR_PWFIELD    clear

##NAME: MYSQL_UID_FIELD:0
#
MYSQL_UID_FIELD                uid  ##

##NAME: MYSQL_GID_FIELD:0
#
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='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
#
# MYSQL_MAILDIR_FIELD   maildir
MYSQL_MAILDIR_FIELD     concat(home,'/',maildir)


##NAME: MYSQL_WHERE_CLAUSE:0
#
# MYSQL_WHERE_CLAUSE    server='mailhost.example.com'
MYSQL_WHERE_CLAUSE      enabled=1
* end *


'mail' is NOT a system user.  Mails sent to [EMAIL PROTECTED] were all
rejected.  'satimis' is a system as well as user on MySQL maildb_users
table.  Mails sent to [EMAIL PROTECTED] were received by the Mail
Server.  But Evolution, the remote client, can't login satimis to
download mails.


Tests;

1) login as [EMAIL PROTECTED] with password

# tail /var/log/mail.log
Nov 18 14:14:44 xen05 imapd: LOGIN: ip=[::ffff:192.168.0.110],
command=LOGIN
Nov 18 14:14:44 xen05 imapd: LOGIN: ip=[::ffff:192.168.0.110],
[EMAIL PROTECTED]
Nov 18 14:14:44 xen05 imapd: LOGIN: ip=[::ffff:192.168.0.110],
password=x05satimis
Nov 18 14:14:44 xen05 authdaemond: received auth request, service=imap,
authtype=login
Nov 18 14:14:44 xen05 authdaemond: authmysql: trying this module
Nov 18 14:14:44 xen05 authdaemond: SQL query: SELECT id, crypt, "",
uid, gid, home, concat(home,'/',maildir), "", "", "" FROM users WHERE
id = "[EMAIL PROTECTED]" AND (enabled=1)
Nov 18 14:14:44 xen05 authdaemond: supplied password does not match
encrypted password
Nov 18 14:14:44 xen05 authdaemond: authmysql: REJECT - try next module
Nov 18 14:14:44 xen05 authdaemond: FAIL, all modules rejected
Nov 18 14:14:44 xen05 imapd: LOGIN FAILED, [EMAIL PROTECTED],
ip=[::ffff:192.168.0.110]


2) login as satimis

# tail /var/log/mail.log
Nov 18 14:17:35 xen05 imapd: LOGIN: ip=[::ffff:192.168.0.110],
username=satimis
Nov 18 14:17:35 xen05 imapd: LOGIN: ip=[::ffff:192.168.0.110],
password=x05satimis
Nov 18 14:17:35 xen05 authdaemond: received auth request, service=imap,
authtype=login
Nov 18 14:17:35 xen05 authdaemond: authmysql: trying this module
Nov 18 14:17:35 xen05 authdaemond: SQL query: SELECT id, crypt, "",
uid, gid, home, concat(home,'/',maildir), "", "", "" FROM users WHERE
id = "satimis" AND (enabled=1)
Nov 18 14:17:35 xen05 authdaemond: zero rows returned
Nov 18 14:17:35 xen05 authdaemond: no password available to compare
Nov 18 14:17:35 xen05 authdaemond: authmysql: REJECT - try next module
Nov 18 14:17:35 xen05 authdaemond: FAIL, all modules rejected
Nov 18 14:17:35 xen05 imapd: LOGIN FAILED, user=satimis,
ip=[::ffff:192.168.0.110]


Both fail.


However 'mail' with its password can login phpmyadmin on browser NOT
root.  root can't login.  This surprises me.  I don't know why.


Please help.  TIA


B.R.
Stephen L

Send instant messages to your online friends http://uk.messenger.yahoo.com 

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Courier-imap mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap

Reply via email to