Virtual Users And Domains With Postfix, Courier And MySQL...

Discussion in 'HOWTO-Related Questions' started by binjured, Jun 11, 2006.

  1. binjured

    binjured New Member

    Dear GOD I am going insane! I have followed two tutorials so far, wiped my entire Debian install once, and this tutorial is the second that has failed to work correctly! When trying to authenticate with the secure pop3 server I get an error returned "-ERR: Login Failed" in Evolution. I checked the syslog and found out this is why:
    Jun 11 17:04:53 toolbox pop3d-ssl: Connection, ip=[::ffff:]
    Jun 11 17:04:53 toolbox authdaemond.mysql: failed to connect to mysql server (server=localhost, userid=mail_admin)
    Jun 11 17:04:58 toolbox pop3d-ssl: LOGIN FAILED, ip=[::ffff:]
    Jun 11 17:05:00 toolbox pop3d-ssl: LOGOUT, ip=[::ffff:]
    I have restarted mysql, ensured it is running by simply logging in with the mysql command, checked for whitespace in the authdmysql (or w/e) file... what is going on?? Please help; I was supposed to have this mail server up two days ago :(

  2. EvanCarroll

    EvanCarroll New Member HowtoForge Supporter

    Pay attention to
    You're not connected to mysql. Make sure you have a user called mail_admin and that your server is running -- and at that, accepting ip connections.
  3. binjured

    binjured New Member

    Yes, that's why I posted that section of the log. I am certain the mail_admin user exists, that it can log in, and that the mysql server is running because I have a php script that calls mysql_connect('localhost','mysql_admin','password'); and succeeds. I can also login from the comand line just fine.
  4. binjured

    binjured New Member

    Okay, I figured out the problem was that the auth-mysql package wasn't compatible with mysql 5.0. Unfortunately, I am still screwed because it keeps telling me "LOGIN FAILED" in syslog with no further information!

    I tried with Evolution... pop server is "", postfix myhostname is ""... what the hell is wrong? Yes, I used ENCRYPT on the password and yes, I know my password :p ... I need to find exactly what values are coming out of there, i.e. what it is checking with against the tables... if it's using the wrong e-mail or something...


    This appears to be the query
    SELECT email, password, "", 5000, 5000, "/home/vmail", CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/'), quota, "", "" FROM users WHERE email = "admin"
    notice "WHERE email="admin"... it should be "[email protected]", -r flag to saslauthd PID not working? ...
    Last edited: Jun 12, 2006
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Which howto did you use?
  6. falko

    falko Super Moderator ISPConfig Developer

    Which distribution do you use? Did you follow the tutorial as close as possible?
  7. oriain

    oriain New Member

    Same Problem..and Maybe a solution

    I also noticed as you said auth-mysql package wasn't compatible with mysql 5.0. ..I didnt follow the tutorial as close as possible:eek: (virtual_postfix_mysql_quota_courier)

    What I remember doing to get it to work was :

    I changed the mysql password for the user 'mail_admin' I used the OLD_PASSWORD('')

    mysql> SET PASSWORD FOR 'mail_admin'@'localhost' = OLD_PASSWORD('***');

    I edited the /etc/courier/authmysqlrc

    # The server name, userid, and password used to log in.
    MYSQL_USERNAME mail_admin

    /etc/init.d/courier-authdaemon restart
    /etc/init.d/courier-imap restart
    /etc/init.d/courier-imap-ssl restart
    /etc/init.d/courier-pop restart
    /etc/init.d/courier-pop-ssl restart

    Extra Info---
    Debian 3.1
    MySql: Server version = 5.0.22-standard
    Postfix: mail_version = 2.1.5

    Thank you Falko. for the tutorial.

Share This Page