#!/bin/sh # # ./killqueue '' # # All queued messages bound for that address will be deleted with no # additional postmaster warnings upon the next queue run. It doesn't work on # all versions of Sendmail. You may have to change the directory. # Remove mail stuck in mqueue if [ X"$1" != X"" ] ; then for i in /var/spool/mqueue/qf* ; do ed - $i << EOF g/^RPFD:$1/d w q EOF done fi