Web Server forum
Back To The Forum Home!Search!Private Messaging System

This is Interesting: Free IT Magazines Now Free shipping to   
Web Server Talk Web Server Talk > Email Servers > Courier Server > cannot imap and pop3




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    cannot imap and pop3  
Adrian Mak


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-10-05 12:45 PM

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=ORDEREDSUBJ
ECT
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






[ Post a follow-up to this message ]



    Re: cannot imap and pop3  
Brian Candler


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-11-05 12:45 PM

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.co
m,
>    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





[ Post a follow-up to this message ]



    Re: cannot imap and pop3  
Adrian Mak


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-12-05 01:45 AM

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






[ Post a follow-up to this message ]



    Re: cannot imap and pop3  
Adrian Mak


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-12-05 01:45 AM

Problem solved. It's directory permission problem.






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 05:50 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 

Back To The Top
Home | Usercp | Faq | Register