LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-07-2006, 08:15 AM   #1
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
courier-imap


Hey,

Could anyone give me a hand debugging my courier-imap problem? I've set up Postfix and courier-imap to replace Qmail and it's not letting me log in. I'll post some basics of my setup, I'm using MySQL for authlib.

Running daemons (checked with ps):
mysqld
courier-authlib
courier-imapd-ssl
postfix

authdaemonrc:
Code:
authmodulelist="authmysql"
authmodulelistorig="authuserdb authshadow authpgsql authldap authmysql authcustom"
daemons=5
authdaemonvar=/var/run/courier
DEBUG_LOGIN=2
DEFAULTOPTIONS=""
authmysqlrc:
Code:
MYSQL_CRYPT_PWFIELD	password
MYSQL_DATABASE		****
MYSQL_GID_FIELD		'73'
MYSQL_HOME_FIELD	'/var/spool/mail/'
MYSQL_LOGIN_FIELD	username
MYSQL_MAILDIR_FIELD	maildir
MYSQL_NAME_FIELD	name
MYSQL_OPT		0
MYSQL_PASSWORD		****
MYSQL_SERVER		localhost
MYSQL_UID_FIELD		'73'
MYSQL_USERNAME		****
MYSQL_USER_TABLE	mailbox
Sample log when I try to log in (verbose isn't in these guys dictionary):
Code:
Jun  7 22:56:24 marvin imapd-ssl: Connection, ip=[::ffff:192.168.1.1]
Jun  7 22:56:24 marvin imapd-ssl: LOGIN FAILED, method=PLAIN, ip=[::ffff:192.168.1.1]
Jun  7 22:56:29 marvin imapd-ssl: LOGIN FAILED, user=me@camdaniel.com, ip=[::ffff:192.168.1.1]
Jun  7 22:56:37 marvin imapd-ssl: LOGOUT, ip=[::ffff:192.168.1.1], rcvd=101, sent=352
I've tried connecting directly on the port using openssl and it won't let me login. The database schema is referred to correctly in authmysqlrc, the file contains no spaces (only tabs) and in the database I'm using boring old MD5() for the password. Any ideas at all? Even a way to make it print semi-useful logs, I've been at this for hours and I can't make any sense of it, the password is correct I'm 100% sure of that.

I'm hoping I'm over looking something simple, Postfix works fine I can see in the logs that it's receiving mail fine but I just can't login to the IMAP server to read it

Any ideas, tips, pointers would be greatly appreciated
 
Old 06-08-2006, 03:34 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
A quick guess would be something wrong somewhere in your conf's because it appears to be trying to login using "Plain" authentication (that's how I read it anyway).

What I would do is narrow it down:

I'd go basic, and gradually more complex. So, I would:

Switch to basic authentication, for me this was pam:
authdaemonrc:
authmodulelist="authpam"

Adjust your other conf's to agree with this change, and check it. If it doesn't work then either, and you are getting the same error, then the problem may not be with the auth, but somewhere else (maybe an oversite in Postfix's setup, some settings for mysql are in there).

Just my quick thoughts, I hate when I have these things happen to me! Good luck, and please follow up if you get it going, it's always nice to have these kinds of things documented and easy to find.

Cool
 
Old 06-09-2006, 01:52 AM   #3
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Original Poster
Rep: Reputation: 57
I figured it out today
Quote:
Originally Posted by mysql
I'm using boring old MD5() for the password.
I was sure I read a guide somewhere that claimed Courier supported a few different hashing methods and could automatically detect which one was being used based on hash length and some other things so I picked MD5 because I've used it before for a lot of things. Turns out either that was incorrect or the Frugalware version of courier-authlib is compiled funny but changing the passwords in the DB to ENCRYPT()'ed fixed the problem :/

Either way I'm happy, now I have IMAP which means I can host my parents email as they travel a bit these days and prefer webmail
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
posfix with courier maildrop and courier-imap Anuragn Linux - Enterprise 4 01-17-2007 04:33 AM
courier imap can't auth. imap and pop3 adrianmak Linux - Software 1 12-11-2005 04:22 PM
qmail-ldap + courier-imap woes (imap capability) syahid Linux - General 1 10-12-2005 12:03 AM
Configuring courier-imap courier-pop redsky Debian 1 06-02-2004 03:09 PM
Configuring courier-imap courier-pop redsky Linux - Software 0 06-01-2004 12:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration