Show options to delete mailbox while deleting mail account

Issue #68 resolved
Zhang Huangbin
repo owner created an issue

We need options to allow domain admin to delete mailboxes while removing mail user, for example:

  • Delete mailbox immediately
  • Delete mailbox in 1 week
  • Delete mailbox in 3 months

With the latest iRedAdmin release, it will log maildir path of deleted mail user in SQL table vmail.deleted_mailboxes (or iredadmin.deleted_mailboxes for OpenLDAP backend). Some improvements are required:

  • Extend existing SQL structure, add new column to store the date when the mailbox should be removed.
  • We need a cron job and a script to actually delete mailboxes, and it must be run as either vmail user or root user. The script queries SQL table to find out which mailbox should be removed today, then remove it.