Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 12.04

Discussion in 'HOWTO-Related Questions' started by mlentink, May 18, 2012.

  1. mlentink

    mlentink New Member

    I have followed the howto to the letter (now for the third time), using cut and paste weherever possible, on a freshly installed Ubuntu 12.04 server with only OpenSSH installed, nothing else.
    For the third time, about a day-and-a-half after installation and working without problems, e-mailclients can no longer login to courier. Evolution tells me the server has apparently gone gone off-line and Thunderbird uses a similar phrase.
    I have looked at the logs, but can see nothing special, only the client trying to login, with nothing else:
    May 18 16:59:07 saiph imapd: Connection, ip=[::ffff:xxx.xxx.xxx.101]
    May 18 16:59:55 saiph imapd: Connection, ip=[::ffff:xxx.xxx.xxx.106]
    May 18 17:00:11 saiph imapd: Connection, ip=[::ffff:xxx.xxx.xxx.106]
    May 18 17:04:14 saiph imapd: Connection, ip=[::ffff:xxx.xxx.xxx.106]

    I can see in the log that Postfix handles incoming mail as it should, pipes it through amavis and passes it on to the maildirs in the home folder of vmail, but the mailclients just can't get to it through some authentication issue.
    What should I do to get my mail back up again?

    I have increased the loggin level a bit and this is what the courier auth daemon tells me:

    May 18 18:23:21 saiph imapd: Connection, ip=[::ffff:xxx.xxx.xxx.106]
    May 18 18:23:21 saiph authdaemond: received auth request, service=imap, authtype=login
    May 18 18:23:21 saiph authdaemond: authmysql: trying this module
    May 18 18:23:21 saiph authdaemond: authmysqllib: connected. Versions: header 50517, client 50522, server 50522
    May 18 18:23:21 saiph authdaemond: SQL query: SELECT email, password, "", 5000, 5000, "/home/vmail", CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/'), quota, "", "" FROM users WHERE email = '[email protected]'
    May 18 18:23:21 saiph authdaemond: password matches successfully
    May 18 18:23:21 saiph authdaemond: authmysql: sysusername=<null>, sysuserid=5000, sysgroupid=5000, homedir=/home/vmail, [email protected], fullname=<null>, maildir=example.tld/martin/, quota=1048576000, options=<null>
    May 18 18:23:21 saiph authdaemond: Authenticated: sysusername=<null>, sysuserid=5000, sysgroupid=5000, homedir=/home/vmail, [email protected], fullname=<null>, maildir=example.tld/martin/, quota=1048576000, options=<null>
    May 18 18:23:29 saiph imapd: Connection, ip=[::ffff:xxx.xxx.xxx.106]
    May 18 18:23:30 saiph authdaemond: received auth request, service=imap, authtype=login
    May 18 18:23:30 saiph authdaemond: authmysql: trying this module
    May 18 18:23:30 saiph authdaemond: SQL query: SELECT email, password, "", 5000, 5000, "/home/vmail", CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/'), quota, "", "" FROM users WHERE email = '[email protected]'
    May 18 18:23:30 saiph authdaemond: password matches successfully
    May 18 18:23:30 saiph authdaemond: authmysql: sysusername=<null>, sysuserid=5000, sysgroupid=5000, homedir=/home/vmail, [email protected], fullname=<null>, maildir=example.tld/martin/, quota=1048576000, options=<null>
    May 18 18:23:30 saiph authdaemond: Authenticated: sysusername=<null>, sysuserid=5000, sysgroupid=5000, homedir=/home/vmail, [email protected], fullname=<null>, maildir=example.tld/martin/, quota=1048576000, options=<null>
    May 18 18:23:36 saiph imapd: Connection, ip=[::ffff:xxx.xxx.xxx.106]
    May 18 18:23:36 saiph authdaemond: received auth request, service=imap, authtype=login
    May 18 18:23:36 saiph authdaemond: authmysql: trying this module
    May 18 18:23:36 saiph authdaemond: authmysqllib: connected. Versions: header 50517, client 50522, server 50522
    May 18 18:23:36 saiph authdaemond: SQL query: SELECT email, password, "", 5000, 5000, "/home/vmail", CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/'), quota, "", "" FROM users WHERE email = '[email protected]'
    May 18 18:23:36 saiph authdaemond: password matches successfully
    May 18 18:23:36 saiph authdaemond: authmysql: sysusername=<null>, sysuserid=5000, sysgroupid=5000, homedir=/home/vmail, [email protected], fullname=<null>, maildir=example.tld/martin/, quota=1048576000, options=<null>
    May 18 18:23:36 saiph authdaemond: Authenticated: sysusername=<null>, sysuserid=5000, sysgroupid=5000, homedir=/home/vmail, [email protected], fullname=<null>, maildir=example.tld/martin/, quota=1048576000, options=<null>
    May 18 18:23:45 saiph imapd: Connection, ip=[::ffff:xxx.xxx.xxx.106]
    May 18 18:23:45 saiph authdaemond: received auth request, service=imap, authtype=login
    May 18 18:23:45 saiph authdaemond: authmysql: trying this module
    May 18 18:23:45 saiph authdaemond: SQL query: SELECT email, password, "", 5000, 5000, "/home/vmail", CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/'), quota, "", "" FROM users WHERE email = '[email protected]'
    May 18 18:23:45 saiph authdaemond: password matches successfully
    May 18 18:23:45 saiph authdaemond: authmysql: sysusername=<null>, sysuserid=5000, sysgroupid=5000, homedir=/home/vmail, [email protected], fullname=<null>, maildir=example.tld/martin/, quota=1048576000, options=<null>
    May 18 18:23:45 saiph authdaemond: Authenticated: sysusername=<null>, sysuserid=5000, sysgroupid=5000, homedir=/home/vmail, [email protected], fullname=<null>, maildir=example.tld/martin/, quota=1048576000, options=<null>

    So even though it authenticates succesfully, I still get the message that it's not connected.

    Can anybody point me in the right direction? Please keep in mind that this behavior started suddenly almost two days of flawless operation

    thx,
    Martin
     
    Last edited: May 18, 2012
  2. mlentink

    mlentink New Member

    I must confess I don't have a clue on what exactly I was doing, but in my desperation I followed the advice in this thread on the Ubuntu forums, which brought my server back up again.

    I'll monitor the situation and report back if I get any more issues.

    Thx for now,

    Martin
     

Share This Page