Changing settings on some mailboxes makes ISPconfig delete them entirely

Discussion in 'General' started by s-andersen, May 6, 2016.

  1. s-andersen

    s-andersen New Member

    I have a rather annoying problem with ISPconfig 3. I'm currently running version, but the problem has always been there.
    Some mailboxes will always be deleted whenever a change is made to the account. It only happens for some accounts, but it seems to happen every time such an account is changed.
    I just got a support ticket from a client, that needed a password reset for a mailbox. I changed the password, it worked instantly, but a couple of minutes later, the account was deleted from /var/vmail/, but not from the database.
    Luckily I took a backup before the password reset, because this has happened to me several times with another account.
    With the other account it was a change of spamfilter settings, that provoked deletion. At that time I tried several things to prevent the account from being deleted (for instance I deleted it from database and created it manually again and backed up the files). But nothing worked so I eventually gave up and decided to make a backup every time I made a change.
    Can someone help me debug this problem. It's rather annoying to have to go through the extra step of taking a backup just for a trivial password reset.
  2. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    You can set the loglevel to debug to get some more informations. But i don`t know why a mailbox is deleted if you only update some values.
  3. felan

    felan Member HowtoForge Supporter

    I am experiencing the same problem here. I have had 3 mail accounts deleted when something in them have been updated.
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Never seen that on any server, maybe the mailbox files were damaged or you changed some global mail settings. As Florian mentioned, you can use the debug mode to find out why this happened.
  5. Jesse Norell

    Jesse Norell Active Member

    This may be completely off-track to the issue, but I had something that sounds similar happen a few days ago in 3.1, but I believe it was in a mail forward -- logged in as a client I was seeing a forward for an address that was on another client's domain, and when viewing (not deleting, I think just changing tabs) it disappeared and I think ended up being owned by the reseller, rather than either client. I can easily attribute that to bad data either from months of 3.1 updates and/or my own mistakes as I learn/experiment, so just ignored it.

    Also possibly pointing to a race condition type issue in a similar area, I was adding some mail accounts to a new domain and I got an SQL error emailed to me; I didn't see it right away so don't know exactly what I did, but I would guess I may have created a mailbox, then deleted it, and recreated it all before cron ran. That doesn't necessarily explain updating an existing account and it deleting, and is in 3.1, but sometimes anecdotes help. The sql error emailed is:

    To: [email protected]
    Subject: 14.09.2016-13:13 - WARNING - Falsche Anfrage / Wro...
    MIME-Version: 1.0
    Content-type: text/plain; charset=utf-8
    From: [email protected]
    Reply-To: [email protected]
    Message-Id: <[email protected]>
    Date: Wed, 14 Sep 2016 11:13:01 -0600 (MDT)
    Content-Transfer-Encoding: quoted-printable
    14.09.2016-13:13 - WARNING - Falsche Anfrage / Wrong QuerySQL-Query =3D R=
    EPLACE INTO `mail_user` (`mailuser_id`,`sys_userid`,`sys_groupid`,`sys_pe=
    kup_interval`,`backup_copies`) VALUES (NULL,NULL,NULL,NULL,NULL,'',NULL,N=
    ULL,NULL,NULL,NULL) -> 1048 (Column 'sys_userid' cannot be null)
  6. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    Maybe there was an error from older installs? If you change a tab, this updates your data (as long as did not change the default in your config).

    Can you try this with the debug-level? stop cron, create a new domain, create a ne mailbox, delete the mailbox, create the mailbox again and run from the command-line?
  7. Jesse Norell

    Jesse Norell Active Member

    I did this and I do not see the same sql error. I did get an email that's probably harmless which says:
    19.09.2016-20:04 - WARNING - Unable to delete file: /var/vmail/
    The other day I got a similar email immediately before that sql error (same second timestamp):
    14.09.2016-13:13 - WARNING - Unable to create symlink to active sieve filter
    Again that's probably harmless in itself, and may just be that I did something different the other day to create the problem, but there wouldn't be a problem where tasks in the queue can get run out of order, or even simultaneously, is there?
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    @Jesse Norell I think your errors are harmless, it's just that a sieve filter can not be added or deleted which might happen, the worst that could happen is that an email filter is not applied or an autoresponder is not send or that a file remained after deleting the mailbox. Tasks in the queue are always run in oder and they never run simultaniously.
  9. leejongsuk2222

    leejongsuk2222 New Member

    If such a data loss is there?
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    No, the sieve messages are not related to data loss and ispconfig. ISPConfig is not deleting any maildirs on update, we tested that and this is not reproducable.

    In case that a maildir is completely corrupted so that its structure is incorrect, then ispconfig moved it to /var/vmail/corrupted/ folder and adds a warning in the log that it found a invalid maildir and that its data was moved to the corrupted folder and that the maildir was recreated with correct structure.

Share This Page