Re: remove my mail from sendmail queue

Jason L Tibbitts III (tibbs@hpc.uh.edu)
27 Jan 1997 13:23:37 -0600


>>>>> "ASP" == Arthur S Petrossian <arthur@sci.am> writes:

ASP> But isn't there better way to do it. Because it is hard to quickly
ASP> determine the appropriate file(s) in /var/spool/mqueue.

Call this with the address to be deleted, obtained from mailq output, like
so:

./killqueue '<blah@aol.com>'

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. (I don't even run it on Linux; you may have to
change the directory.)

#!/bin/sh

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

-- 
      Jason L. Tibbitts III - tibbs@uh.edu - 713/743-8684 - 221SR1
System Manager:  University of Houston High Performance Computing Center
                1994 PC800 "Kuroneko"      DoD# 1723