PDA

View Full Version : Courier Issues


gnosti
28th August 2009, 14:51
Okay so I was messing around in things that I shouldn't have been and now I've smegged something.

I decided I was going to setup dns so that my ispconfig could be the authoritative nameserver. I knew that mydns was installed but couldn't find the db for it so I decided to create one and changed the mydns.conf file to reflect the new db. shortly thereafter I discovered that the ispconfig db had all of this stuff in it. Well I had already erased the password that was in the mydns.conf for the ispconfigdb so I (for some reason) decided to change the password in the ispconfig db. As you can probably guess this completely broke everything.

I went in and fixed everything and replaced the old password in every conf file that I could find that referenced it to the new password.

I have everything working except for courier apps. pop, imap.

I replaced the password in /etc/courier/authmysqlrc however this didn't seem to help.

When I attempt to login to squirrelmail it gives me
ERROR: Connection dropped by IMAP server.


I check the contents of /var/log/mail.err and have

Aug 28 05:41:53 server1 authdaemond: failed to connect to mysql server (server=localhost, userid=ispconfig): Access denied for user 'ispconfig'@'localhost' (using password: YES)
Aug 28 05:41:53 server1 imapd: authentication error: Input/output error

The same thing occurs when attempting with pop,


Aug 28 05:48:58 server1 authdaemond: failed to connect to mysql server (server=localhost, userid=ispconfig): Access denied for user 'ispconfig'@'localhost' (using password: YES)
Aug 28 05:48:58 server1 pop3d: authentication error: Input/output error


I telnet to 143 without issue


telnet localhost 143
Trying 127.0.0.1...
Connected to localhost.
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-2008 Double Precision, Inc. See COPYING for distribution information.


and mutt imap://localhost/ seems to respond without issue as well.

I'm almost positive that this has to do with some config somewhere that still has the old password but I'm not at all sure which one and I am looking for pointers, because at this point I'm thoroughly defeated.


Also I've verified the password is correct in all the files that I've changed including /etc/courier/authmysqlrc

Any ideas would be most appreciable.

Thanks in advance.

till
28th August 2009, 14:58
The mysql login details are not correct or you did not restart mysql.

Test the details that you entered in the /etc/courier/authmysqlrc with:

mysql -h localhost -u ispconfig

gnosti
28th August 2009, 15:10
Thanks for the quick reply! :)



mysql -h localhost -u ispconfig -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 154
Server version: 5.0.51a-24+lenny1-log (Debian)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>



the password was pasted directly from authmysqlrc info

which i will paste here (minus the pw of course) in case there is a typo that I'm just not seeing from looking at the thing for so long.



# cat /etc/courier/authmysqlrc
MYSQL_SERVER localhost
MYSQL_USERNAME ispconfig
MYSQL_PASSWORD ******************************************
MYSQL_PORT 0
MYSQL_DATABASE dbispconfig
MYSQL_USER_TABLE mail_user
MYSQL_CRYPT_PWFIELD password
#MYSQL_CLEAR_PWFIELD password
MYSQL_UID_FIELD uid
MYSQL_GID_FIELD gid
MYSQL_LOGIN_FIELD email
MYSQL_HOME_FIELD homedir
MYSQL_MAILDIR_FIELD maildir
#MYSQL_NAME_FIELD
MYSQL_QUOTA_FIELD quota
MYSQL_QUOTA_FIELD concat(quota,'S')
#MYSQL_WHERE_CLAUSE access='y'
MYSQL_AUXOPTIONS_FIELD concat('disableimap=',disableimap,',disablepop3=', disablepop3)



I greatly appreciate the help.

gnosti
29th August 2009, 07:58
Okay, so I've now created a new dbuser named ispdbuser and granted all privileges for the ispconfig db and am still getting the same behavior from courier-authdaemond.

I have quadruple checked the password in the config and have gone through the same trouble shooting steps over and over and am at a complete and total loss now. If anybody has any ideas I would be most appreciative.

Thanks in advance.

gnosti
29th August 2009, 11:36
Okay I finally got it resolved. I made backups of my courier configs and killed all courier services. I then purged all courier services and re-installed fresh, made the appropriate changes to the configs and specified

MYSQL_PORT 0

as

MYSQL_PORT 3306

restarted the services and WALLAH! everything is up and running as it should be.