http://qs1969.pair.com?node_id=551381


in reply to Re: hashing out lines from mailq...
in thread hashing out lines from mailq...

Thanks. How would I go about geting the following for all deferred messages: qid, from, all recipients? Is there a better way of doing this besides parsing the output of mailq with regex? Thanks.

Replies are listed 'Best First'.
Re^3: hashing out lines from mailq...
by gellyfish (Monsignor) on May 24, 2006 at 15:03 UTC

    That code does it, you just have to look for 'Defered' in $entry->{message}. The only other alternative (for sendmail at least) is to parse all of the 'q' files in /var/spool/mqueue, which will almost certainly by more of a pain.

    /J\