Dovecor doesn't want to start

Discussion in 'Installation/Configuration' started by Spheerys, Dec 8, 2011.

  1. Spheerys

    Spheerys New Member

    I have a problem after following the "The Perfect Server – Debian Squeeze (Debian 6.0) With BIND & Dovecot [ISPConfig 3]" documentation

    But Dovecot doesn't want to start :

    Code:
    # /etc/init.d/dovecot restart
    Restarting IMAP/POP3 mail server: dovecotIf you have trouble with authentication failures,
    enable auth_debug setting. See http://wiki.dovecot.org/WhyDoesItNotWork
    This message goes away after the first successful login.
    .
    
    I read the indicated page, but can't solve the problem.

    When I try to send a mail from command line, I have this on the mail.err log :
    Code:
    Dec  7 07:37:51 osireion dovecot: auth-worker(default): mysql: Connect failed to localhost (dbispconfig): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) - waiting for 1 seconds before retry
    Dec  7 07:37:51 osireion dovecot: auth-worker(default): sql([email protected],190.12.37.90): Password query failed: Not connected to database
    
    What's wrong ?
     
    Last edited: Dec 8, 2011
  2. cbj4074

    cbj4074 Member HowtoForge Supporter

    The first message is just a notice. It's not an error, and as the message says, it will go away after the first successful login. So, Dovecot is not refusing to start; it's starting just fine.

    The problem is a MySQL error. More specifically, the MySQL server is refusing the connection when Dovecot attempts authentication against the database.

    Have a look here:

    http://stackoverflow.com/questions/1420839/cant-connect-to-mysql-server-error-111

    Still have questions? Let us know.
     
  3. Spheerys

    Spheerys New Member

    Thanks for the quick answer :)
    I already have commented the lines :
    Code:
    #skip-networking
    #bind-address = 127.0.0.1
    
    So maybe the solution is with this tip :
    But I'm not sure to understand exactly what I have to do...
    Because normaly, Dovecot should be able to connect itself doesn't it ?
    How can I check the dovecot mysql connection ?
     
    Last edited: Dec 8, 2011
  4. cbj4074

    cbj4074 Member HowtoForge Supporter

  5. Spheerys

    Spheerys New Member

    sorry cbj4074, but on the other thread I used irony (because the solution given by Jolman looks ironic too!!)

    So my problem is still there... :(
     
  6. cbj4074

    cbj4074 Member HowtoForge Supporter

    Oh, hahaha... I see.

    Well, the file you should examine is

    Code:
    /etc/dovecot/dovecot-sql.conf
    
    The credentials that Dovecot uses to connect to the ISPConfig user database are contained at the bottom of that file.

    Normally, all of this is configured automatically, so it sounds like you may have missed/skipped a step or there is an error in the tutorial.

    If you are having problems with Dovecot, it's possible that other services are mis-configured, too, and it may be prudent to have ISPConfig reconfigure all related services automatically (in which case ISPConfig will modify the relevant configuration files accordingly).

    If everything else seems to be working as designed, and you want to tackle only the Dovecot issue, see if you're able to connect to MySQL using the credentials specified in the aforementioned file...
     
  7. Spheerys

    Spheerys New Member

    The other components looks good (I'm running 2 website for now on it)
    There is just a problem with the mail...

    In dovecot-sql.conf, I have this line :
    Code:
    connect = host=localhost dbname=dbispconfig user=ispconfig password=cd77xxxxxxxe4bf912725b1f9xxxxxxxx
    
    I try to connect myselft with this :
    Code:
    mysql -u ispconfig -pcd77xxxxxxxe4bf912725b1f9xxxxxxxx
    That's work !
    I try a "USE dbispconfig" and the change works too

    What can I check else ?
     
  8. cbj4074

    cbj4074 Member HowtoForge Supporter

    Okay, that's good. The problem is not an incorrect MySQL password.

    a.) Is the MySQL server that contains the ISPConfig database running on the same server (same IP address) as Dovecot?

    b.) What command, exactly, are you using to send mail from the command line when you receive the errors cited in your first post?

    c.) When you attempt to send mail via a normal POP/IMAP client, what messages are logged in /var/log/mail.log?
     
  9. Spheerys

    Spheerys New Member

    Yes, I just verify this point

    I use this command :
    Code:
    echo "Test message" | mail -s "Test subject" [email protected]
    Just after, I have this in the mail.log :
    For now, I never try to attempt to send a mail via a normal pop/imap client because in my mind, the first step is to send a mail from the command line with success
    On my others servers, this process works good...
     
    Last edited: Dec 13, 2011
  10. Spheerys

    Spheerys New Member

    OK I have finaly found an issue : I remove Amavis and clamavd and the mails are now working.
    I don't need anti-spam and anti-virus, so for me it's OK :)
    Thanks cbj4074for your presence :)
     

Share This Page