ozy
The holes are just an observation in some folders. I can't tell for sure that's all what is missing.
Is the database structure documented somewhere, so I can check if file X is in the database and to what folder it belongs?
What I would like is something like this, as I have a lot of backups of the mailserver:
for email_file in directory:
if email_file not in current_database:
mail_added = False
for prev_database in order_descending(prev_databases):
if email_file in prev_database:
add_mail(email_file, current_database, get_folder(prev_database, email_file))
mail_added = True
break
if mail_added is False:
if sender(email_file) == USER:
add_mail(email_file, current_database, 'SENT')
else:
add_mail(email_file, current_database, 'INBOX')
This is of course just pseudo-code. To be able to implement a script like that I need to know how the database is structured. There is a messages table in there, but I don't know how it relates to the filenames.
I had a look in journalctl, I cannot find anything from grommunio, only occasional mariadb errors that a connection was lost and incorrect passwords in the webinterface.
I have an idea what could have caused the issue: For a long time I just updated the Debian server like how you update Debian: apt update / dist-upgrade. But grommunio does not fully integrate itself in the debian package management, it requires it's own update script to update it's database to new versions (why is this not part of the debian packages so it gets run automatically on updating the packages?). I didn't know that until at one point grommunio stopped working. I then run the update script and it worked again, but maybe the database was damaged at that point.