Is there a fast and proper way to delete a message in all account ?
I'm used to a script like this one :
Code: Select all
#!/bin/bash
for acct in $(zmprov -l gaa) ; do
echo "Searching "$acct""
for msg in $(zmmailbox -z -m "$acct" s -l 999 -t message "From:account date:theDate subject:theSubject" | awk 'NR > 4 {print $2}');
do
echo -e "Removing "$msg" from "$acct"\n"
zmmailbox -z -m $acct dm $msg
zmmailbox -z -m $acct -A ddi $msg
done
done
Is there a way to properly delete the message ? Does anyone has a faster script ?
Regards