Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@benwalton
benwalton / gist:1777718
Created February 9, 2012 05:57
Clean up emails in the queue. usage ./postfix-delete.pl email@example.com
#!/usr/bin/perl
$REGEXP = shift || die "no email-adress given (regexp-style, e.g. bl.*\@yahoo.com)!";
@data = qx</usr/sbin/postqueue -p>;
for (@data) {
if (/^(\w+)(\*|\!)?\s/) {
$queue_id = $1;
}
if($queue_id) {