Delete Mails in Webmail

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
User avatar
manfred.gipp
Advanced member
Advanced member
Posts: 51
Joined: Tue Feb 03, 2015 7:08 am
Location: Germany
ZCS/ZD Version: Zimbra 8.8.6_GA_1906 (build 2017113
Contact:

Delete Mails in Webmail

Postby manfred.gipp » Tue Jul 12, 2016 2:30 pm

Hello,
I discovered that Mails which are deleted in Webmail (also deleted in Trash Folder) remain on Filesystem.
Is there an automatic "garbage collection" after some time?
Does anybody know how to delete these Mails from File-System of the Zimbra-Server?
/opt/zimbra/store/0/.....

Many thanks for any help
Manfred


User avatar
manfred.gipp
Advanced member
Advanced member
Posts: 51
Joined: Tue Feb 03, 2015 7:08 am
Location: Germany
ZCS/ZD Version: Zimbra 8.8.6_GA_1906 (build 2017113
Contact:

Re: Delete Mails in Webmail

Postby manfred.gipp » Wed Jul 13, 2016 6:47 am

It seems to be the Definition of Dumpster

You can operate Dumpster with the next 4 settings:

    zimbraDumpsterEnabled – TRUE/FALSE determines if the dumpster feature is enabled or disabled.
    zimbraDumpsterPurgeEnabled – TRUE/FALSE determines if the users can empty/purge their dumpster.
    zimbraDumpsterUserVisibleAge – n, where n is the number of days to allow users to view and recover the messages stored in the dumpster.
    zimbraMailDumpsterLifetime – n, where n is the number of days to keep items stored in the dumpster before automatically purging them.
My Config:
    zimbraDumpsterEnabled=TRUE
    zimbraDumpsterPurgeEnabled=TRUE
    zimbraDumpsterUserVisibleAge=30d
    zimbraMailDumpsterLifetime=30d
The above Definitions applies to COS and User.
But Mails are not purged. The List of recoverable Mails are longer than 30 days.
Manually purging ist possible with follwing Command:

Code: Select all

zmmailbox -z -m user@domain.de -A emptyDumpster

This command empties the dumpster of the selected user.
Is there a way to automate this?

Many thanks for help
Manfred
User avatar
L. Mark Stone
Elite member
Elite member
Posts: 1993
Joined: Wed Oct 09, 2013 11:35 am
Location: Portland, Maine
ZCS/ZD Version: 8.8.12 Network Edition
Contact:

Re: Delete Mails in Webmail

Postby L. Mark Stone » Wed Jul 13, 2016 1:17 pm

Sounds like a bug; suggest opening one at bugzilla.zimbra.com.

All the best,
Mark
___________________________________
L. Mark Stone
Mission Critical Email - Zimbra VAR/BSP/Training Partner https://www.missioncriticalemail.com/
Zeta Alliance http://www.zetalliance.org/
User avatar
manfred.gipp
Advanced member
Advanced member
Posts: 51
Joined: Tue Feb 03, 2015 7:08 am
Location: Germany
ZCS/ZD Version: Zimbra 8.8.6_GA_1906 (build 2017113
Contact:

Re: Delete Mails in Webmail

Postby manfred.gipp » Thu Jul 14, 2016 7:17 am

User avatar
tonster
Zimbra Employee
Zimbra Employee
Posts: 312
Joined: Fri Feb 21, 2014 10:14 am
Location: Ypsilanti, MI
ZCS/ZD Version: Release 8.7.0_GA_1659.RHEL6_64_2016

Re: Delete Mails in Webmail

Postby tonster » Thu Jul 14, 2016 7:25 am

manfred.gipp wrote:It seems to be the Definition of Dumpster

You can operate Dumpster with the next 4 settings:

    zimbraDumpsterEnabled – TRUE/FALSE determines if the dumpster feature is enabled or disabled.
    zimbraDumpsterPurgeEnabled – TRUE/FALSE determines if the users can empty/purge their dumpster.
    zimbraDumpsterUserVisibleAge – n, where n is the number of days to allow users to view and recover the messages stored in the dumpster.
    zimbraMailDumpsterLifetime – n, where n is the number of days to keep items stored in the dumpster before automatically purging them.
My Config:
    zimbraDumpsterEnabled=TRUE
    zimbraDumpsterPurgeEnabled=TRUE
    zimbraDumpsterUserVisibleAge=30d
    zimbraMailDumpsterLifetime=30d
The above Definitions applies to COS and User.
But Mails are not purged. The List of recoverable Mails are longer than 30 days.
Manually purging ist possible with follwing Command:

Code: Select all

zmmailbox -z -m user@domain.de -A emptyDumpster

This command empties the dumpster of the selected user.
Is there a way to automate this?

Many thanks for help
Manfred


So are you saying that mail is sticking around the filesystem for > 60d?
User avatar
DualBoot
Elite member
Elite member
Posts: 1073
Joined: Mon Apr 18, 2016 8:18 pm
Location: Earth
ZCS/ZD Version: ZCS FLOSS - 8.7.11 Mutli servers

Re: Delete Mails in Webmail

Postby DualBoot » Fri Jul 15, 2016 8:30 pm

I have encountered the same issue with a lot of installation since dumpster have been introduced.
And I can confirm it is a problem from the definition of the attribute zimbraDumpsterPurgeEnabled . This attribute does not
allow the user to purge the dumpster but allow zimbra to purge the filesystem from items passed through the dumpster.
The Guy - DualBoot

PostMaster - WikiMaster - SysAdmin
"Free Your Mind. Think Open Source"
april.org
Zetalliance Member - zetalliance.org
Nadziratelb
Posts: 9
Joined: Sat Sep 13, 2014 3:27 am

Re: Delete Mails in Webmail

Postby Nadziratelb » Sat Jul 16, 2016 9:17 am

Purge messages is performed only for the active user, this script performs purge messages for all users.

Code: Select all

# Creator - Alexander Rotov Bootmen@gmail.com
#!/bin/bash
# purge-all.sh
# run as user zimbra
#   $ ./purge-all.sh
# or crontab monthly/weekly
#   0 1 1 * * /usr/local/bin/purge-all.sh

# config
TMPDIR="/var/tmp"
LOGDIR="/opt/zimbra/log"
SLEEP=10

if [ "$USER" != "zimbra" ]; then
  echo "Error: Must be run as user zimbra"
  exit 1
fi

DATE="`date '+%Y%m%d-%H%M%S'`"
exec >> $LOGDIR/purgeall-$DATE.log

echo "`date`: START $0"
zmprov -l gaa -s `zmhostname` > $TMPDIR/purgeall-list.out

for MYUSER in `cat $TMPDIR/purgeall-list.out`
do
  echo "`date`: Starting user: $MYUSER"
  ACCOUNT_ID="`zmprov -l ga $MYUSER zimbraId | awk '/^zimbraId:/ {print $2}'`"
  if [ -n "$ACCOUNT_ID" ]; then
    zmmailbox -z -m $MYUSER noOp && \
      zmsoap -v -z PurgeMessagesRequest/mbox @id=$ACCOUNT_ID
         
    if [ $? = 0 ]; then
      echo "`date`: Finished user: $MYUSER"
    else
      echo "`date`: Error: $MYUSER"
    fi
  fi
  sleep $SLEEP
done

echo "`date`: END $0"
exit 0
vs2015sv
Posts: 10
Joined: Wed Oct 19, 2016 8:12 pm

Re: Delete Mails in Webmail

Postby vs2015sv » Tue Dec 20, 2016 9:12 pm

I am having the exact same issue.

We noticed this when we started getting disk space warnings. Started digging into the trash folder and logs and it appears that these emails are really never getting deleted.
vs2015sv
Posts: 10
Joined: Wed Oct 19, 2016 8:12 pm

Re: Delete Mails in Webmail

Postby vs2015sv » Wed Dec 21, 2016 4:03 pm

Is there a way to delete all user's trash folder's "recover deleted items" for a specific time frame?

Return to “Administrators”

Who is online

Users browsing this forum: No registered users and 23 guests