* Viktor Dukhovni <postfix-devel@postfix.org>:
> On Tue, Sep 08, 2015 at 03:48:25AM +0200, Patrick Ben Koetter wrote:
> 
> > $ postqueue -p
> > ----Queue ID----- --Size-- ---Arrival Time---- --Sender/Recipient------
> > 3n97rq4vbmz1gT        2660 Tue Sep  8 03:18:03 dane-users-boun...@sys4.de
> >                   (connect to some.server.tld[12.34.56.78]:25: Connection 
> > refused)
> >                                                lists...@server.tld
> > (conversation with some.otherserver.tld[78.90.12.34] timed out while 
> > receiving the initial server greeting)
> >                                                r...@remote-destination.tld
> > 
> > I - at least I - find it hard to write scripts that parse this output and
> > generate e.g. statistics from it. This is mostly due to the multiline 
> > nature of
> > the output.
> 
> The multi-line format is better IMHO, a message can have a great
> many recipients, and addresses can contain internal whitespace.
> 
> Have you considered modifying "qshape" to fit your needs?  Or better
> yet, surely statistics should be based on logs, not "mailq" output.
> What real problem are you trying to solve?

I need (nearly) real time stats on mail queues in a machine readable format.
I'd like to use this on command line in scripts and/or in (web) interfaces to
show queue/delivery states. I also need it e.g. to easily identify phished
accounts (by number of messages/recipients).

I think it is easier to implement a more machine readable format (e.g. JSON)
once in Postfix than n-times in n-scripts that deal with various mail
management issues.

p@rick

-- 
Patrick Ben Koetter
p...@state-of-mind.de

Reply via email to