1

Topic: mail clean up in admin panel

==== Required information ====
- iRedMail version (check /etc/iredmail-release):
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

iRedAdmin-Pro has option to remove domain accounts and then provides additional drop down of how long to keep the e-mail like a day, week, month, etc.  Queued the removal of some accounts at the domain level and also just at account level.  However, get this notification via email.
* <<< WARNING >>> Invalid or missing timestamp in maildir path (/var/vmail/vmail1/virtual_domain_tld/user_account/), skip.
* <<< WARNING >>> Invalid or missing timestamp in maildir path (/var/vmail/vmail1/virtual_domain_tld/user_account/), skip.
* <<< WARNING >>> Invalid or missing timestamp in maildir path (/var/vmail/vmail1/virtual_domain_tld/user_account/), skip.
* <<< WARNING >>> Invalid or missing timestamp in maildir path (/var/vmail/vmail1/virtual_domain_tld/user_account/), skip.
* <<< WARNING >>> Invalid or missing timestamp in maildir path (/var/vmail/vmail1/virtual_domain_tld/user_account/), skip.

* <<< WARNING >>> Invalid or missing timestamp in maildir path (/var/vmail/vmail1/virtual_domain_tld/user_account/), skip.
* <<< WARNING >>> Invalid or missing timestamp in maildir path (/var/vmail/vmail1/virtual_domain_tld/user_account/), skip.
* <<< WARNING >>> Invalid or missing timestamp in maildir path (/var/vmail/vmail1/virtual_domain_tld/user_account/), skip.
* <<< WARNING >>> Invalid or missing timestamp in maildir path (/var/vmail/vmail1/virtual_domain_tld/user_account/), skip.
* <<< WARNING >>> Invalid or missing timestamp in maildir path (/var/vmail/vmail1/virtual_domain_tld/user_account/), skip.
* <<< WARNING >>> Invalid or missing timestamp in maildir path (/var/vmail/vmail1/virtual_domain_tld/user_account/), skip.
* <<< WARNING >>> Invalid or missing timestamp in maildir path (/var/vmail/vmail1/virtual_domain_tld/user_account/), skip.
* <<< WARNING >>> Invalid or missing timestamp in maildir path (/var/vmail/vmail1/virtual_domain_tld/user_account/), skip.
* <<< WARNING >>> Invalid or missing timestamp in maildir path (/var/vmail/vmail1/virtual_domain_tld/user_account/), skip.
* <<< WARNING >>> Invalid or missing timestamp in maildir path (/var/vmail/vmail1/virtual_domain_tld/user_account/), skip.
* <<< WARNING >>> Invalid or missing timestamp in maildir path (/var/vmail/vmail1/virtual_domain_tld/user_account/), skip.
* <<< WARNING >>> Invalid or missing timestamp in maildir path (/var/vmail/vmail1/virtual_domain_tld/user_account/), skip.
* <<< WARNING >>> Invalid or missing timestamp in maildir path (/var/vmail/vmail1/virtual_domain_tld/user_account/), skip.
* <<< WARNING >>> Invalid or missing timestamp in maildir path (/var/vmail/vmail1/virtual_domain_tld/user_account/), skip.

I've gone back and done a touch on both the a time and the m time but this does not seem to change anything regarding the clean up (removal of email) of system.

Is this in fact looking at one of the timestamp values?  What am I missing here?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: mail clean up in admin panel

You can check comment lines in file file "tools/delete_mailboxes.py" under iRedAdmin-Pro directory to understand this "issue". Quote below:

# Available arguments:
#
#   * --delete-without-timestamp:
#
#       [RISKY] If no timestamp string in maildir path, continue to delete it.
#
#       With default iRedMail settings, maildir path will contain a timestamp
#       like this: <domain.com>/u/s/e/username-<20160817095303>/
#       (20160817095303 is the timestamp), this way all created maildir paths
#       are unique, even if you removed the user and recreate it with same
#       mail address.
#
#       Without timestamp in maildir path (e.g. <domain.com>/u/s/e/username/),
#       if you removed a user and recreate it someday, this user will see old
#       emails in old mailbox (because maildir path is same as old user's). So
#       it becomes RISKY to remove the mailbox if no timestamp in maildir path.
#
#   * --delete-null-date:
#
#       Delete mailbox if SQL column `deleted_mailboxes.delete_date` is null.

The maildir used by your users don't have a timestamp in maildir PATH. If you really want to remove the mailboxes, update root's cron job and append option "--delete-without-timestamp" for task "delete_mailboxes.py".

3

Re: mail clean up in admin panel

ZhangHuangbin wrote:

You can check comment lines in file file "tools/delete_mailboxes.py" under iRedAdmin-Pro directory to understand this "issue". Quote below:

# Available arguments:
#
#   * --delete-without-timestamp:
#
#       [RISKY] If no timestamp string in maildir path, continue to delete it.
#
#       With default iRedMail settings, maildir path will contain a timestamp
#       like this: <domain.com>/u/s/e/username-<20160817095303>/
#       (20160817095303 is the timestamp), this way all created maildir paths
#       are unique, even if you removed the user and recreate it with same
#       mail address.
#
#       Without timestamp in maildir path (e.g. <domain.com>/u/s/e/username/),
#       if you removed a user and recreate it someday, this user will see old
#       emails in old mailbox (because maildir path is same as old user's). So
#       it becomes RISKY to remove the mailbox if no timestamp in maildir path.
#
#   * --delete-null-date:
#
#       Delete mailbox if SQL column `deleted_mailboxes.delete_date` is null.

The maildir used by your users don't have a timestamp in maildir PATH. If you really want to remove the mailboxes, update root's cron job and append option "--delete-without-timestamp" for task "delete_mailboxes.py".


Thank you.

Ran    delete_mailboxes.py --delete-without-timestamp

Appears to have removed the user accounts.
Did leave the domain in place /var/vmail/vmail1/domain_name
but guessing that is called from another script...?

4

Re: mail clean up in admin panel

pbf343 wrote:

Did leave the domain in place /var/vmail/vmail1/domain_name
but guessing that is called from another script...?

No. No script to remove domain directory.

5

Re: mail clean up in admin panel

ZhangHuangbin wrote:
pbf343 wrote:

Did leave the domain in place /var/vmail/vmail1/domain_name
but guessing that is called from another script...?

No. No script to remove domain directory.

OK Thank you.  Removed the directory by hand for now.