#!/bin/sh

[ -f "$1" ] || exit 1

echo "Sorting $1 .."
cat "$1" | procmail && (echo removing "$1"; rm -f "$1")