View Single Post
  #1  
Old 18th December 2005, 01:40
SeanG SeanG is offline
Junior Member
 
Join Date: Dec 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Virtual Users And Domains With Postfix, Courier And MySQL: POP/IMAP authentication

Great tutorial.

I set this up on a clean Sarge install. Had a few problems which have been resolved by reading this and other forums. This particular one has had me going for days -I have followed all the steps in related threads on this forum.

I am unable to connect using pop or imap on the LAN (so no firewall issues). The error I get is:

Dec 17 21:48:29 netserver authdaemond.mysql: failed to connect to mysql server (server=localhost , userid=mail_admin)

mysql is up and running and "mysql -h localhost -u mail_admin -p" works just fine. Postfix can connect to the DB because mail is being delivered to the correct place. SASL is not working but I think that this is unrelated and should have no effect.

Here is my /etc/courier/authdaemonrc # comments removed to make it shorter

##VERSION: $Id: authdaemonrc.in,v 1.8 2001/10/07 02:16:22 mrsam Exp $

authmodulelist="authmysql"

authmodulelistorig="authcustom authcram authuserdb authldap authpgsql authmysql authpam"
daemons=5

version=""

authdaemonvar=/var/run/courier/authdaemon



and my /etc/courier/authmysqlrc # comments removed to make it shorter
I have no whitespace at the end of lines and in all cases field and value are separated by a single space.

##VERSION: $Id: authmysqlrc,v 1.17 2004/04/20 01:38:17 mrsam Exp $
#
# authmysqlrc created from authmysqlrc.dist by sysconftool

MYSQL_SERVER localhost
MYSQL_USERNAME mail_admin
MYSQL_PASSWD myownpassword
MYSQL_PORT 0
MYSQL_OPT 0
MYSQL_DATABASE mail
MYSQL_USER_TABLE users
MYSQL_CRYPT_PWFIELD password
# MYSQL_CLEAR_PWFIELD clear
MYSQL_UID_FIELD 5000
MYSQL_GID_FIELD 5000
MYSQL_HOME_FIELD "/home/vmail"
MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
MYSQL_QUOTA_FIELD quota

I am pretty much a LINUX newbie, happ to investigate this myself but need some pointers as to where to start

Thanks
Reply With Quote
Sponsored Links