Category: Linux

Remove Mail Queue in Postfix

To see mail queue, enter:
# mailq
To remove all mail from the queue, enter:
# postsuper -d ALL
mail.pl [script removed the mail queue as entered after the script]
#!/usr/bin/perl
$REGEXP = shift || die “no email-adress given (regexp-style, e.g. bl.*\@yahoo.com)!”;
@data = qx;
for (@data) {
if (/^(\w+)(\*|\!)?\s/) {
$queue_id = $1;
}
if($queue_id) [...]

Follow Me

  • Add to Technorati Favorites
  • My status
  • Follow me on twitter
  • Follow me on facebook
  • Add to Stumbleupon Favorites
  • Add to Digg Favorites