原出處為:http://www.seaglass.com/postfix/

#!/usr/bin/perl -w
#
# pfdel - deletes message containing specified address from
# Postfix queue. Matches either sender or recipient address.
#
# Usage: pfdel
#

use strict;

# Change these paths if necessary.
my $LISTQ = "/usr/sbin/postqueue -p";
my $POSTSUPER = "/usr/sbin/postsuper";

my $email_addr = "";
my $qid = "";
my $euid = $>;

if ( @ARGV != 1 ) else

if ( $euid != 0 )


open(QUEUE, "$LISTQ |") ||
die "Can't get pipe to $LISTQ: $!\n";

my $entry = ; # skip single header line
$/ = ""; # Rest of queue entries print on
# multiple lines.
while ( $entry = )
}
}
close(QUEUE);

if (! $qid )

exit 0;