Here's a shell script to set up an account to auto-trash meeting replies with minimal chance of "collateral damage". Save into file called "zmnoreplies" and run as the zimbra user.
Code:
# ! /bin/sh
#
# Script to automatically trash replies to meeting proposals
# Author: Elliot Wilen
#
# Usage ./zmnoreplies target_account
#
# Name of filter used on target account
filtername="Trash Meeting Replies"
#
# Verify exactly one argument
# (Could use shell Shift command to allow multiple delegation)
if test $# -ne 1
then
echo "Must supply exactly one argument."
exit 1
fi
# Assign variable
target_account=$1
# Verify <target_account> exists on the server
if ! zmmailbox -z -m $target_account gms 1>/dev/null 2>/dev/null
then
echo "Target account doesn't exist. Exiting."
exit 1
fi
# Verify that filter rule with same name doesn't already exist
if zmmailbox -z -m $target_account gfrl | grep ^\"Trash\ Meeting\ Replies\" 1>/dev/null
then
echo -e 'Naming conflict--delete or rename filter "\c'
echo -e "$filtername\c"
echo -e '" on target account.'
exit 1
fi
# Create filter to trash meeting replies
echo "Creating filter in target account."
zmmailbox -z -m $target_account afrl -f "$filtername" body contains "Content-Type: text/calendar" body contains "method=REPLY" body contains "METHOD:REPLY" body contains "BEGIN:VEVENT" body contains "BEGIN:VCALENDAR" fileinto "Trash" stop
echo "Configuration complete!"