On Wed, 07 Sep 2005 10:24:07 +0200
Roberto Toscani <[EMAIL PROTECTED]> wrote:

> Ciao,
> 
> scusate l'OT.
> Qualcuno conosce il comando per svuotare (droppare) la coda di uscita
> di postfix???

ciao,
per tutta la coda ti hanno gia' risposto.
Se, invece, ti interessa cancellare un gruppo di messaggi sulla base del
sender forse puo' tornarti utile questo script (per un solo messaggio
e' overkill):

xc:~$ cat delete-mailq.pl

#!/usr/bin/perl -w

$REGEXP = shift || die "no email-adress given (regexp-style, e.g.
test.* [EMAIL PROTECTED])!";
@data = qx</usr/sbin/postqueue -p>;
for (@data) {
  if (/^(\w+)(\*|\!)?\s/) {
     $queue_id = $1;
  }
  if($queue_id) {
    if (/$REGEXP/i) {
      $Q{$queue_id} = 1;
      $queue_id = "";
    }
  }
}
#open(POSTSUPER,"|cat") || die "couldn't open postsuper" ;
open(POSTSUPER,"|postsuper -d -") || die "couldn't open postsuper" ;
foreach (keys %Q) {
  print POSTSUPER "$_\n";
};
close(POSTSUPER);


Con mailq recuperi il sender e lo passi allo script.

ciao,
a.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to