----- Original Message ----- 
From: "Cybertime Hostmaster" <[EMAIL PROTECTED]>

> > mailq | awk '/[EMAIL PROTECTED]/ { print $1 }' | postsuper -d -
>
> This is flawed.

It's not flawed, if you use it for what it was intended to for, that of
deleting queued undeliverable postmaster bounce messages.  I have been using
this script with an hourly cron job for over two years without a single
problem.  In fact, may others Postfix admins on the Postfix list use the
same script successfully.

> We have domain hosting customers that forward their email to other
> accounts elsewhere.  Obviously AOL is one of these elsewheres because of
> their size.
>
> The mailq entry in this case is like this:
>
> F2F5DD711E     1920 Sat Mar 13 04:10:39
> [EMAIL PROTECTED]
> (host mailin-04.mx.aol.com[205.188.157.25] said: 421 SERVICE NOT
> AVAILABLE, TEMPORARY DNS FAILURE (in reply to MAIL FROM command))
>                                          [EMAIL PROTECTED]
>
> That is from a real one.  I just changed the user's name.
>
> This user has three such messages sitting in the queue waiting to expire.
> At times I want to clean these things up, especially if I am looking for
> something specific in the queue, and want to weed out the unimportant
> things first.
>
> When using your script:
>
> mailq | awk '/[EMAIL PROTECTED]/ { print $1 }' | postsuper -d -
> postsuper: warning: invalid mail queue id: [EMAIL PROTECTED]

Again, not its intended use.

> But when using the example from man postsuper:
>
> mailq | tail +2 | awk  'BEGIN { RS = "" } /[EMAIL PROTECTED]/ { print $1 }
> ' | tr -d '*!' | postsuper -d -
> postsuper: D05AFD713C: removed
> postsuper: F2F5DD711E: removed
> postsuper: B4D9DD7112: removed
> postsuper: Deleted: 3 messages

Great, if your intent is to delete messages based on the "To" address rather
than the postmaster "From" address.  I guess the flaw is in the usage...

Bill


Reply via email to