[prev in list] [next in list] [prev in thread] [next in thread]
List: postfix-users
Subject: Re: mailq only, or all but, messages on hold
From: LuKreme (List User Kreme) <kremels () kreme ! com>
Date: 2003-08-31 2:13:21
[Download RAW message or body]
On Aug 30, 2003, at 10:48 AM, Alex van den Bogaerdt wrote:
> I get
>
> D28AB159F62! 4309 Sat Aug 30 14:07:13 MAILER-DAEMON
>
> in stead of the desired
>
> D28AB159F62! 4309 Sat Aug 30 14:07:13 MAILER-DAEMON
> (host mail.passport.net[65.54.230.250] said: 452 Unable to
> accept message because the server is out of disk space.
> (in reply to end of DATA command))
> PPMSVCMG@PASSPORT.NET
mailq | grep -A3 \! should work fine. Increase/decrease the 3 to suit.
> Displaying context using gnu-grep is possible but I do not know
> how to display a variable number of lines after the matching
> line.
I don't either, but displaying the following 3 lines should be enough,
no?
> I've been thinking about using "sed" to do the job, start
> printing if a Queue-ID is found with (or without) "!" appended
> continuing until the next one is seen. Seems a bit of a waste
> because of two reasons:
>
> 1) I feel like I'm reinventing the wheel
> 2) It seems a waste to list all entries only to skip most of
> them again
that's all grep is doing as well. Certainly if you need exactly the
text following the ! and nothing else you will need to use sed for
that.
--
Heisenberg's only uncertainty was what pub to vomit in next and Jung
fancied Freud's mother too. -- Jared Earle
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic