ispconfig 3.1 server config mail settings

Discussion in 'Installation/Configuration' started by edwintenhaaf, Oct 23, 2016.

  1. edwintenhaaf

    edwintenhaaf New Member

    Hello,
    I had some problems with postfix. Did some edits in master.cf and main.cf and after that I noticed that the mail settings were missing in the ispconfig gui. This gives me several errors, even after filling in the default settings the message "Uid-mapping cannot be changed if there are already mail users." keeps coming back.

    Is there a way to get this working again ? Reset ?
    I cannot configure DKIM because the path is missing. Postfix is running ok now.

    Thanks in advance,
    Edwin

    Maildir Path is empty.
    Invalid maildir path.
    Homedir Path is empty.
    Invalid homedir path.
    Mailuser uid must be >= 2000
    Mailuser gid must be >= 2000
    Mailuser Name is empty.
    Invalid mailuser name.
    Mailuser Group is empty.
    Invalid mailuser group name.
    Uid-mapping cannot be changed if there are already mail users.
     
  2. flyboy320

    flyboy320 New Member

    I did the exact same thing and now the GUI is giving me the errors above. Can anyone post the default settings from the Server Config - Mail page? Any help would be greatly appreciated.
     
  3. flyboy320

    flyboy320 New Member

    I was able to find the default settings in the manual but when I try to save it, I still get the error:

    Uid-mapping cannot be changed if there are already mail users.

    I am running ISPConfig Version: 3.1.1p1 on Ubuntu 12.04 LTS

    I could not find any information online about the above error.

    Thanks in advance.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You enabled uid mailuser connection and this setting can not be undone after you added a mail account on the server as removing it would break the mail accounts.
     
  5. flyboy320

    flyboy320 New Member

    Thanks for the reply. All I did was manually add an RBL in main.cf and the GUI started giving me the errors above. I have not created any new mailboxes in over a year. Is there a way to use the GUI again for system config - mail? I only have a couple of email accounts so deleting them and recreating them is not an issue at this time.
     
  6. eddul

    eddul New Member

    I am also a victim of lost mail settings and couldn't save new ones because of uid-mapping check.
    Running (Debian Jessie) ISPConfig 3.1.1p1

    My problem started after fooling around with doveadm to clear out unwanted mails from a users mailbox, could be coincidence but not much other activity on this testserver.

    Looking at dbispconfig mail_user table I found that somehow that users uid and gid got changed to 0 (was 5000) and both columns maildir and homedir got emptied out. (some should-be-NULL values also got changed to empty text). This is the first mail user created on the server.
    Tried changing the values back in phpMyAdmin but no luck, they soon got messed up again.

    My reverse engineering efforts made me expect to see a section for mail settings in table 'server' column 'config' but there was none on my server.

    One dirty thought I got was to temporarily disable the uid-change validation in /usr/local/ispconfig/interface/lib/classes/validate_server_mail_config.inc.php so I commented out lines 64 to 66 and was able to save some hopefully valid values!

    Checked server config column and there's now a [mail] section present, corrected the corrupted users mail_user columns and tested larching some mails to it and all seems well at time of writing!

    Now to figure out what caused this....... :confused:
    I reckon the missing [mail] section trigger the validation error whatever value you put in, but how did it go missing?

    Long time user first time poster BTW, thanks for this wonderful piece of software! :)
     
  7. flyboy320

    flyboy320 New Member

    Thanks for the info. My fix was a little more hammer and little less scalpel. As my server was due for an OS upgrade from 12.04 LTS to 16.04 LTS, so I just built a new server. The last time I did a Ubuntu OS upgrade from LTS to LTS, it was a catastrophic failure and I ended up rebuilding anyway so it all works in the end.
     
  8. Hi all,
    On a standalone server, this has just happened to me : All fields in System / server config / Mail have becomed blank.
    I took values from another working ISPConfig server and re-entered them.
    I get error :
    Code:
    Uid-mapping cannot be changed if there are already mail users.
    Of course I have NOT checked the
    Code:
    Use Websites Linux uid for mailbox
    I haven't added any email user.
    Server is : Ubuntu 16.04.5 LTS running ISPConfig 3.1.13
    Mail user / group are still vmail/vmail on filesystem.
    Postfix and Dovecot are still running.
    Could you please assist with this ? I'm 'a bit' afraid to reboot the server.

    Edit : log-level set to DEBUG doesn't show anything apart from casual
    Code:
    07.12.2018-12:22 - DEBUG - Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raised by action 'server_plugins_loaded'.
    07.12.2018-12:22 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    Attached picture is what the mail tab looks like.
     

    Attached Files:

    Last edited: Dec 7, 2018
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    The data is stored in .ini format in the 'server' table in mysql, the field is named 'config'. get the [mail] config part from a working server and replace the one on the broken system. You can edit the data in phpmyadmin.

    Rebooting should be no issue, this data is used when you create new mailboxes in ispconfig, that's nothing that is used in boot process. So the worst that could happen is that a new mailbox does not work.
     
    electronico_nc likes this.
  10. Thanks @till
    That's OK now, the complete [mail] section was deleted ...
     
  11. Daniel Sobrinho

    Daniel Sobrinho New Member

    Hello, I had the same problem. When inserting RBL lists I lost all data. I did not make any more changes besides entering the addresses separated by commas, as recommended in the description of the field.
    It is a server in production with active email accounts, I am afraid of the reflexes caused by the loss of settings.
    How should I proceed?
    Please ask for a safe recommendation.

    They acknowledge errors in all fields:

    The maildir's path is blank.
    Maildir path is invalid.
    Homedir's path is blank.
    Homedir path is invalid.
    The UID of the mailuser must be> = 2000.
    The GID of the mailuser must be> = 2000.
    Mailuser user is blank.
    Mailuser path is invalid.
    Group of the mailuser Group is blank.
    Mailuser group is invalid.
    The uid cannot be changed if email accounts already exist.

    --------------------------- PT-BR ------------
    Olá, tive o mesmo problema. Ao inserir listas RBL perdi todos os dados. Não fiz mais nenhuma alteração além de inserir os endereços separados por vírgula, como recomedado na descrição do campo.
    É um servidor em produção com contas de email ativas, tenho receios dos reflexos ocasionados pela perda das configurações.
    Como devo proceder?
    Peço por favor uma recomendação segura.

    Acusam erros em todos os campos:

    Caminho do maildir está em branco.
    Caminho do maildir é inválido.
    Caminho do homedir está em branco.
    Caminho do homedir é inválido.
    A UID do mailuser deve ser >= 2000.
    A GID do mailuser deve ser >= 2000.
    Usuário do mailuser está em branco.
    Caminho do mailuser é inválido.
    Grupo do mailuser Group está em branco.
    Grupo do mailuser é inválido.
    O uid não pode ser alterado se já existir contas de e-mail.
     
  12. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    I'd like to get a little more info from you here; I had a nearly identical scenario recently except it was on the Jailkit section, not mail - I believe (maybe 98% certain) that it saved an empty [jailkit] section header, without any settings under it. I initially thought it was the IDS tripping, but I don't believe so now (the logged IDS level was in the "log" range, not to the "block" level). I actually don't know what triggered the problem, and I've not figured out how to reproduce it.

    What version of ISPConfig are you running (or what timestamp if running 3.1dev)? What browser are you using, and do you have any extensions that might interfere with requests (ad blockers, security plugins, etc.)? What OS version are you running, and what mysql/mariadb version?

    If you're on a recent 3.1 release this is very easy to fix, go to Monitor > Show Data Log History, find the update which applied this change (look for the correct server, an Update to the 'server' table at about the right timestamp), and when you find it (it will show the [mail] section lines in red, indicating they were deleted), go to the bottom and hit the 'Undo action' button.

    If you're on an older release, you will have to either re-enter the old values in the the Server Config ui and save them, or dig up the old values from a database dump and put them back directly in the database table (eg. using phpmyadmin).
     

Share This Page