vmail wrong uid/gid - no mail accounts created

Discussion in 'Installation/Configuration' started by webhunter, Jun 11, 2016.

  1. webhunter

    webhunter Member

    Me again!
    I installed ISPConfig 3, followed this tutorial: https://www.howtoforge.com/tutorial...l-pureftpd-bind-postfix-doveot-and-ispconfig/
    Installation went like a charme. After adding a lot of e-mail accounts to this server and wondering why I can't connect, I found this entry in the e-mail error log:

    Code:
    Jun 11 08:18:27 server100 dovecot: imap: Error: Internal auth failure (client-pid=11084 client-id=1)
    Jun 11 08:22:39 server100 dovecot: auth-worker(13833): Error: sql([email protected],79.198.200.121): Invalid UID value '-1'
    Jun 11 08:22:39 server100 dovecot: auth-worker(13833): Error: sql([email protected],79.198.200.121): Invalid GID value '-1'
    Jun 11 08:22:39 server100 dovecot: auth: Error: sql([email protected],79.198.200.121,<br/BW/w0Ea5Pxsh5>): Invalid UID value '-1'
    Jun 11 08:22:39 server100 dovecot: auth: Error: sql([email protected],79.198.200.121,<br/BW/w0Ea5Pxsh5>): Invalid GID value '-1'
    So, none of the entered e-mail accounts were created on the server. The directory of /var/vmail is empty.
    How can I fix that and how can I get those e-mail accounts being created afterwards? How can I prevent this situation on installation?
     
  2. webhunter

    webhunter Member

    The output of id -g vmail:
    Code:
    root@server100:/# id -g vmail
    5000
    
    and of id -u vmail:
    Code:
    root@server100:/# id -u vmail
    5000
    
    Seems to be okay... :confused:
    The dir /var/vmail is also owned by vmail/vmail.
     
  3. webhunter

    webhunter Member

    It seems that this error affects only ISPConfig 3.1!
    I've done a perfect server setup with Debian Jessie. But iinstead of downloading ISPConfig v3.0 I used v3.1.
    All is fine with Debian Jessie and ISPConfig 3.0 but with 3.1 the same error occured.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    I'll add it to the bugtracker. But my Jesse + ISPConfig 3.1 server has no mail issues
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    I did a fresh install with latest from stable-3.1 branch and there arc no issues with mailuser uid's on the server. Maybe you disabled some php functions which prevented ispconfig from working.

    Never mind, I found the issue. You must have enabled the cluster email uid/gif mapping feature.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    There are 3 possibilities that can have caused your issue:

    1) You did not wait 60 seconds until the server cronjob has written the new uid's.
    2) The server.sh cronjob in ispconfig was not running at all or cron on your server is broken.
    3) You enabled the uid/gid mapping feature on a multiserver system.
     
  7. includes08

    includes08 New Member

    So, how do we solve this as i have the same problem, i've installed 3.1 to and would love to use it. 26mails in que and growing. Next to that i get "(mail transport unavailable)" as well, is it related to this error or is it something else.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    So did you enable the "Use Websites Linux uid for mailbox" setting which is off by default and can cause this error?
     
  9. webhunter

    webhunter Member

    @till:
    Wondering why this error occured two times. On both installations I followed your tutorials step by step.
    It can't be a broken cron and I do not running a multiserver setup. The only thing what could happened, I didn't wait 60 seconds...
    I'll try a new Ubuntu setup again later.

    @includes08:
    For further information, please post your main.cf and follow the steps in the first post by till in this forum.
     
  10. includes08

    includes08 New Member

    Code:
    root@web1:~# id -g vmail
    5000
    root@web1:~# id -u vmail
    5000
    
    I don't even have a clue where this option is. I did 3 or 4 installs and still nothing.
     
  11. includes08

    includes08 New Member

    found the option, and it is indeed just disabled by default.

    Use Websites Linux uid for mailbox
    only in single web and mail-server-setup
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    The uid/gid function which you used works like this: The uid and gid is set to -1 by the interface, the server plugin then tries to resolve the uid and gid locally to match the uid and gid of a website with the same domain name, If it finds a website, then the uid and gid of the website is set, if it does not find a site, the value 5000 is used. It takes up to 60 seconds until the server cron runs, and the mailbox can not be used before the cronjob has run. Personally I would never use this function on a server and that's why it is off by default, it is against the paradigm of a virtual mail system that ISPConfig uses, it is not compatible with multiserver systems, it is likely to break your mailboxes when you have issues with a related website and it allows an attacker of a hacked website to access your emails.
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, so ensure that the setting is off. Which value do you have for uid and gid of the mail account in the mail_user table ?
     
  14. includes08

    includes08 New Member

    I don't have a multiserver system yet (if you mean clustering with that). I'm planning to but the option is still of cause, its default like that i didn't even know about that option before.
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    Please answer my question about the uid and gid in the database.
     
  16. includes08

    includes08 New Member

    Code:
    Jun 14 11:47:36 web1 dovecot: imap: Error: Internal auth failure (client-pid=41007 client-id=1)
    Jun 14 11:47:38 web1 dovecot: auth-worker(39934): Error: sql([email protected],::1): Invalid UID value '-1'
    Jun 14 11:47:38 web1 dovecot: auth-worker(39934): Error: sql([email protected],::1): Invalid GID value '-1'
    Jun 14 11:47:38 web1 dovecot: auth: Error: sql([email protected],::1,<Gno35Tk1ZgAAAAAAAAAAAAAAAAAAAAAB>): Invalid UID value '-1'
    Jun 14 11:47:38 web1 dovecot: auth: Error: sql([email protected],::1,<Gno35Tk1ZgAAAAAAAAAAAAAAAAAAAAAB>): Invalid GID value '-1'
    Jun 14 11:47:38 web1 dovecot: imap: Error: Internal auth failure (client-pid=41009 client-id=1)
    I guess by seeing this its -1,
    how do i look it up in the database exactly?
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    Please enable debugging under System > server config and then run:

    /usr/local/ispconfig/server/server.sh

    and post the output.

    Additionally, post the output of:

    ls -la /usr/local/ispconfig/server/plugins-enabled/
     
  18. includes08

    includes08 New Member

    /usr/local/ispconfig/server/server.sh
    Code:
    root@web1:~# /usr/local/ispconfig/server/server.sh
    14.06.2016-19:02 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    
    
    14.06.2016-19:02 - DEBUG - Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raised by ac                                tion 'server_plugins_loaded'.
    14.06.2016-19:02 - DEBUG - Found 6 changes, starting update process.
    14.06.2016-19:02 - DEBUG - Processed datalog_id 38
    14.06.2016-19:02 - DEBUG - Processed datalog_id 39
    14.06.2016-19:02 - DEBUG - Processed datalog_id 40
    14.06.2016-19:02 - DEBUG - Processed datalog_id 41
    14.06.2016-19:02 - DEBUG - Calling function 'update' from plugin 'apps_vhost_plugin' raised by event 'server_u                                pdate'.
    14.06.2016-19:02 - DEBUG - Calling function 'update' from plugin 'network_settings_plugin' raised by event 'se                                rver_update'.
    14.06.2016-19:02 - DEBUG - Network configuration disabled in server settings.
    14.06.2016-19:02 - DEBUG - Calling function 'update' from plugin 'postfix_server_plugin' raised by event 'serv                                er_update'.
    postconf: warning: /etc/postfix/main.cf: unused parameter: dovecot_destination_recipient_limit=1
    14.06.2016-19:02 - DEBUG - Calling function 'update' from plugin 'xmpp_plugin' raised by event 'server_update'                                .
    14.06.2016-19:02 - DEBUG - Processed datalog_id 42
    14.06.2016-19:02 - DEBUG - Calling function 'update' from plugin 'apps_vhost_plugin' raised by event 'server_u                                pdate'.
    14.06.2016-19:02 - DEBUG - Calling function 'update' from plugin 'network_settings_plugin' raised by event 'se                                rver_update'.
    14.06.2016-19:02 - DEBUG - Network configuration disabled in server settings.
    14.06.2016-19:02 - DEBUG - Calling function 'update' from plugin 'postfix_server_plugin' raised by event 'serv                                er_update'.
    postconf: warning: /etc/postfix/main.cf: unused parameter: dovecot_destination_recipient_limit=1
    14.06.2016-19:02 - DEBUG - Calling function 'update' from plugin 'xmpp_plugin' raised by event 'server_update'                                .
    14.06.2016-19:02 - DEBUG - Processed datalog_id 43
    14.06.2016-19:02 - DEBUG - Calling function 'restartHttpd' from module 'web_module'.
    14.06.2016-19:03 - DEBUG - Restarting httpd: systemctl restart apache2.service
    14.06.2016-19:03 - DEBUG - Calling function 'restartXMPP' from module 'xmpp_module'.
    14.06.2016-19:03 - DEBUG - Restarting xmpp: systemctl restart metronome.service
    14.06.2016-19:03 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    finished.
    
    ls -la /usr/local/ispconfig/server/plugins-enabled/
    Code:
    root@web1:~# ls -la /usr/local/ispconfig/server/plugins-enabled/
    total 100
    drwxr-s---  2 root root 4096 Jun 13 00:12 .
    drwxr-s--- 13 root root 4096 Jun 13 00:12 ..
    lrwxrwxrwx  1 root root   68 Jun 13 00:12 apache2_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php
    lrwxrwxrwx  1 root root   71 Jun 13 00:12 apps_vhost_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/apps_vhost_plugin.inc.php
    lrwxrwxrwx  1 root root   64 Jun 13 00:12 aps_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/aps_plugin.inc.php
    lrwxrwxrwx  1 root root   67 Jun 13 00:12 backup_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/backup_plugin.inc.php
    lrwxrwxrwx  1 root root   65 Jun 13 00:12 bind_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/bind_plugin.inc.php
    lrwxrwxrwx  1 root root   73 Jun 13 00:12 cron_jailkit_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/cron_jailkit_plugin.inc.php
    lrwxrwxrwx  1 root root   65 Jun 13 00:12 cron_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/cron_plugin.inc.php
    -rwxr-x---  1 root root   45 Jun 13 00:12 empty.dir
    lrwxrwxrwx  1 root root   73 Jun 13 00:12 ftpuser_base_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/ftpuser_base_plugin.inc.php
    lrwxrwxrwx  1 root root   68 Jun 13 00:12 getmail_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/getmail_plugin.inc.php
    lrwxrwxrwx  1 root root   72 Jun 13 00:12 maildeliver_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/maildeliver_plugin.inc.php
    lrwxrwxrwx  1 root root   68 Jun 13 00:12 mailman_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/mailman_plugin.inc.php
    lrwxrwxrwx  1 root root   70 Jun 13 00:12 mail_plugin_dkim.inc.php -> /usr/local/ispconfig/server/plugins-available/mail_plugin_dkim.inc.php
    lrwxrwxrwx  1 root root   65 Jun 13 00:12 mail_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/mail_plugin.inc.php
    lrwxrwxrwx  1 root root   75 Jun 13 00:12 mysql_clientdb_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/mysql_clientdb_plugin.inc.php
    lrwxrwxrwx  1 root root   77 Jun 13 00:12 network_settings_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/network_settings_plugin.inc.php
    lrwxrwxrwx  1 root root   75 Jun 13 00:12 postfix_filter_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/postfix_filter_plugin.inc.php
    lrwxrwxrwx  1 root root   75 Jun 13 00:12 postfix_server_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/postfix_server_plugin.inc.php
    lrwxrwxrwx  1 root root   75 Jun 13 00:12 shelluser_base_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/shelluser_base_plugin.inc.php
    lrwxrwxrwx  1 root root   78 Jun 13 00:12 shelluser_jailkit_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/shelluser_jailkit_plugin.inc.php
    lrwxrwxrwx  1 root root   76 Jun 13 00:12 software_update_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/software_update_plugin.inc.php
    lrwxrwxrwx  1 root root   70 Jun 13 00:12 webserver_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/webserver_plugin.inc.php
    lrwxrwxrwx  1 root root   65 Jun 13 00:12 xmpp_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/xmpp_plugin.inc.php
    
     
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats both ok. Now look into the dbispconfig database, the records in mail_user table should have the correct uid now.
     
  20. includes08

    includes08 New Member

    5000 / 5000 but still nothing works, i can't send mail i can't receive mail, and my que gets bigger and bigger. Is there a way that you could take a look over teamviewer if possible? or direct access.
     

Share This Page