Hi Team,
Here is my scenario. ZCS 8.6, 3K+ Users. We have Marketing and Com' Department broadcasting to all users, tons of mail per day; Including embedded images or attachments. The result of course is that, the Server's storage just gets saturated very quickly.
How to delete all the emails coming from the Com' Dept. on an well given earlier period. For example, delete from all accounts, emails dating from January 1st to December 31st 2016 ?
Massive delete mails from specific sender
-
- Posts: 2
- Joined: Mon Jan 23, 2017 9:23 am
Massive delete mails from specific sender
I am using zimbra and we have around 1500 uses configured and they are also part of some distribution list as well.
we want to delete all old mails older than 1 year, I have gone through posts to delete older mails and they are suggesting to delete mails by using zmmailbox command
But it can possible with one mailbox as per given in example and I have list of users is more than 1500 accounts configured on zimbra,
can someone please suggest how do I perform mass volume deletion.
Thanks in Advance
we want to delete all old mails older than 1 year, I have gone through posts to delete older mails and they are suggesting to delete mails by using zmmailbox command
But it can possible with one mailbox as per given in example and I have list of users is more than 1500 accounts configured on zimbra,
can someone please suggest how do I perform mass volume deletion.
Thanks in Advance
Re: Massive delete mails from specific sender
Did you have any update since ?
-
- Posts: 41
- Joined: Sat Sep 13, 2014 3:54 am
- Location: Indonesia
- Contact:
Re: Massive delete mails from specific sender
Here's the example command for deleting all email in queue by sender, you may change it by your self for timerange filter.
(this command must be ran as root user)
(this command must be ran as root user)
Code: Select all
/opt/zimbra/postfix/sbin/postqueue -p | tail -n +2 | awk 'BEGIN { RS = "" } / sender@mail\.com/ { print $1 }' | tr -d '*' | /opt/zimbra/postfix/sbin/postsuper -d -
Re: Massive delete mails from specific sender
What I am looking for is to :
Have you any idea how to script that ?delete all mails, in all accounts, received from a specific sender, from a certain period.