Postfix/Dovecot not working, configuration problem?

Discussion in 'Installation/Configuration' started by elCorazon, Sep 26, 2013.

  1. elCorazon

    elCorazon New Member


    I have set up a server some time ago according to the setup in "The Perfect Server - Ubuntu 12.04 LTS (Apache2, BIND, Dovecot, ISPConfig 3)" - but did not need the mail setup until now. Now I would need the mail part, but it doesn't work.

    I think I may have found the cause in the table "mail_user" in the ISPConfig database. Most columns look ok, but these are suspicious to me (compared to the queries in dovecot-sql.conf and postfix/mysql*.cf):

    • uid and gid are initially "0" - then dovecot complains with: "dovecot: imap: Error: user [email protected]: Invalid settings in userdb: userdb returned 0 as uid"
      Setting the uid and gid to 5000 resolves that (but new users are still created with the value of "0")
    • Next issue is that the column "server_id" was set to "0", but the query for postfix checks for "1" and the server_id in the table server is also "1". Therefore postfix can not find the recipient "Recipient address rejected: User unknown in local recipient table"
      After manually setting the server_id to "1", mails can be received but...
    • Next issue is that the .quotausage file can not be found: "Sep 26 22:06:26 myserver dovecot: imap([email protected]): Error: file dict commit: file_dotlock_open(/var/vmail/myserver/useralias/.quotausage) failed: No such file or directory"

    I'm stuck at resolving that and also at resolving the root cause of the other issues. The configuration of the server looks OK to me - under the server config tab "Mail" the Mailuser UID and GID is 5000, the Mailuser Name and Group is vmail, the IMAP Daemon is "Dovecot" etc.

    I'd be very thankful for any hint pointing me to the right direction on how to resolve this issue!

    Last edited: Sep 26, 2013
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    If you want to enable mail services on this server, you will have to do these steps:

    1) run all commands of the mail confguration chapters on the perfect setup.
    2) download the ispconfig tar.gz, unpack it and run the script, which is in the install folder. Choose to reconfigure services during update.
    3) then enable the mail checkbox under System > server services.

    it is important that yu do thes etseps before you add the first email domain or mailbox to the system or otherwise all mail accounts are invalid and will not work. If you added already mail domains or mailboxes, then tehse have to be deleted first.
  3. elCorazon

    elCorazon New Member


    Thanks Till for the quick response and great help!

    I had already done all steps of the setup tutorial, only needed to 1. delete all users and 2. run "php update.php"

    Additionally I had to change one configuration error (probably on my side) because the server name was listed in postfix as myhostname and in mydestination. Removing the hostname from mydestination finally enabled receiving emails.

Share This Page