|
Home > Archive > Courier Server > December 2005 > cannot imap and pop3
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
cannot imap and pop3
|
|
| Adrian Mak 2005-12-10, 7:45 am |
| I setup a mail server using followings components
postfix
sasl
pam-mysql
courier-auth 0.58
courier-imap 4.0.6
mysql 5.0.16
email user is authenicated against mysql backend db
I added a test account in db and I tested the smtp auth and it works (i.e.
can authenticate against db)
but I failed to test with imap and pop3
# telnet localhost 110
Trying 127.0.0.1...
Connected to NS1 (127.0.0.1).
Escape character is '^]'.
+OK Hello there.
user adrian@mydomain.com
+OK Password required.
pass 123456
-ERR Temporary problem, please try again later
Connection closed by foreign host.
the maillog shown
Dec 10 17:37:05 NS1 pop3d: Connection, ip=[::ffff:127.0.0.1]
Dec 10 17:37:17 NS1 pop3d: LOGIN FAILED, user=adrian@mydomain.com,
ip=[::ffff:127.0.0.1]
Dec 10 17:37:17 NS1 pop3d: authentication error: Input/output error
# telnet localhost 143
Trying 127.0.0.1...
Connected to NS1 (127.0.0.1).
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT
THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS] Courier-IMAP
ready. Copyright 1998-2005 Double Precision, Inc. See COPYING for
distribution information.
a login adrian@mydomain 123456
* BYE Temporary problem, please try again later
Connection closed by foreign host.
the maillog shown
Dec 10 17:42:27 NS1 imapd: Connection, ip=[::ffff:127.0.0.1]
Dec 10 17:42:38 NS1 imapd: LOGIN FAILED, user=adrian@mydomain.com,
ip=[::ffff:127.0.0.1]
Dec 10 17:42:38 NS1 imapd: authentication error: Input/output error
authdaemonrc config is, others remains by default values
authmodulelist="authpam authmysql"
authmysqlrc config is
MYSQL_SERVER localhost
MYSQL_USERNAME postfixuser
MYSQL_PASSWORD userpostfix
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_DATABASE postfix
MYSQL_USER_TABLE mailbox
MYSQL_CRYPT_PWFIELD password
MYSQL_LOGIN_FIELD username
MYSQL_HOME_FIELD home
MYSQL_MAILDIR_FIELD maildir
/etc/pam.d/pop3
auth sufficient pam_mysql.so user=postfixuser passwd=userpostfix
host=localhost db=postfix t
able=mailbox usercolumn=username passwdcolumn=password crypt=1
account required pam_mysql.so user=postfixuser passwd=userpostfix
host=localhost db=postfix
table=mailbox usercolumn=username passwdcolumn=password crypt=1
/etc/pam.d/imap
auth sufficient pam_mysql.so user=postfixuser passwd=userpostfix
host=localhost db=postfix t
able=mailbox usercolumn=username passwdcolumn=password crypt=1
account required pam_mysql.so user=postfixuser passwd=userpostfix
host=localhost db=postfix
table=mailbox usercolumn=username passwdcolumn=password crypt=1
| |
| Brian Candler 2005-12-11, 7:45 am |
| On Sat, Dec 10, 2005 at 06:17:21PM +0800, Adrian Mak wrote:
> # telnet localhost 110
> Trying 127.0.0.1...
> Connected to NS1 ([1]127.0.0.1).
> Escape character is '^]'.
> +OK Hello there.
> user [2]adrian@mydomain.com
> +OK Password required.
> pass 123456
> -ERR Temporary problem, please try again later
> Connection closed by foreign host.
>
>
>
> the maillog shown
>
> Dec 10 17:37:05 NS1 pop3d: Connection, ip=[::ffff:[3]127.0.0.1]
> Dec 10 17:37:17 NS1 pop3d: LOGIN FAILED, [4]user=adrian@mydomain.com,
> ip=[::ffff: [5]127.0.0.1]
> Dec 10 17:37:17 NS1 pop3d: authentication error: Input/output error
Turn on authentication debugging for more information. See
http://www.courier-mta.org/authlib/....authdebug.html
Then report back here what's in your debug logs after turning this on.
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
| |
| Adrian Mak 2005-12-11, 8:45 pm |
| This is the debug log of courier-authd
Dec 12 08:41:55 NS1 imapd: Connection, ip=[::ffff:127.0.0.1]
Dec 12 08:42:03 NS1 authdaemond: received auth request, service=imap,
authtype=login
Dec 12 08:42:03 NS1 authdaemond: authpam: trying this module
Dec 12 08:42:03 NS1 authdaemond: authpam: username 'adrian@dmhy.net.cn' not
found in password file
Dec 12 08:42:03 NS1 authdaemond: authpam: REJECT - try next module
Dec 12 08:42:03 NS1 authdaemond: authmysql: trying this module
Dec 12 08:42:03 NS1 authdaemond: SQL query: SELECT username, password, "",
101, 103, home, maildir, "", "", "" FROM mailbox WHERE username = "
adrian@dmhy.net.cn"
Dec 12 08:42:03 NS1 authdaemond: password matches successfully
Dec 12 08:42:03 NS1 authdaemond: authmysql: sysusername=<null>,
sysuserid=101, sysgroupid=103, homedir=/home/mail/virtual/dmhy.net.cn/,
address=adrian@dmhy.net.cn, fullname=<null>, maildir=adrian@dmhy.net.cn/,
quota=<null>, options=<null>
Dec 12 08:42:03 NS1 authdaemond: Authenticated: sysusername=<null>,
sysuserid=101, sysgroupid=103, homedir=/home/mail/virtual/dmhy.net.cn/,
address=adrian@dmhy.net.cn, fullname=<null>, maildir=adrian@dmhy.net.cn/,
quota=<null>, options=<null>
Dec 12 08:42:03 NS1 imapd: chdir adrian@dmhy.net.cn/: Permission denied
uid 101 is postfix user , the user owner of running postfix mail
gid 103 is postfix group
| |
| Adrian Mak 2005-12-11, 8:45 pm |
| Problem solved. It's directory permission problem.
|
|
|
|
|