LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   courier imap can't auth. imap and pop3 (https://www.linuxquestions.org/questions/linux-software-2/courier-imap-cant-auth-imap-and-pop3-391231/)

adrianmak 12-10-2005 07:20 AM

courier imap can't auth. imap and pop3
 
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

acid_kewpie 12-11-2005 04:22 PM

try enabling the "debug" option on the relevant pam lines and see if it kicks anything into dmesg or /var/log/messages.


All times are GMT -5. The time now is 03:05 AM.