#!/bin/sh
# WARNING: This file was auto-generated. Do not edit!
# Delete files in the specified Maildir having the "T" flag set.
RMCMD=/usr/bin/fwipe0
#RMCMD="xargs -0 rm -f"

# Change to the maildir, or die trying
case "$1" in
  "")
      echo "usage: mdpurge MAILDIR" 1>&2
      exit -1
      ;;
  *)
      cd "$1" || exit
esac

# Delete messages in ./new or ./cur 
find . -type f \( -path ./new/\* -or -path ./cur/\* \) \
  -name \*:1,\*T\* \
  -print0 \
  | $RMCMD
