Topic: Sogo backup script error
Hello!
We are monitoring all of the scheduled scripts and their exit codes in our mail server and we realized that the sogo backup script (/var/vmail/backup/backup_sogo.sh) sometimes exits with exit code 1 which generates an alert for us.
The reason of the error is the following lines from the end of the script:
# Try to remove empty directory.
rmdir ${REMOVED_BACKUP_MONTH_DIR} 2>/dev/null
rmdir ${REMOVED_BACKUP_YEAR_DIR} 2>/dev/null
When the related directories are empty there is no problem but if the rmdir can't remove the non-empty directory it returns with 1 and there is no additional exit code after that in the script so it will exit with exit code 1 too.
We temporary corrected this in our instance but could you fix this in the next release please? We would prefer to use the original scripts to avoid any problems.
Thank you for your help!
Best regards,
Adam
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.