OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: mitchnetline.com
Date: Wed Sep 05 2001 - 13:33:56 CDT

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    /* Ralf Hildebrandt [news-list.postfix.usersinnominate.de] writes: */

    >On 5 Sep 2001 03:32:29 +0200, <d.kindredtelesciences.com> wrote:
    >
    >> 1) Is it possible, from the logs or elsewhere, to tell how "deep" the
    >> mail queue ever got?
    >
    >No.
    >
    I'm going to have to disagree with Ralf here. I'm assuming by "deep" you
    mean how many messages were in the queue at any give time. Given that...

    If you have a known starting point, you can simply process the logs and
    keep track of it in your script. There are a few stumbling blocks, that
    the script writer needs to be aware of such as deferred messages that are
    returned and not logged (fixed in a recent snapshot).

    >> 3) Does anyone have a nice script that takes a regexp, extracts all of
    >> the queue ids from the log file that go with that regexp, and then
    >> re-searches the log file for those queue ids? (Manually I keep doing
    >> this by egrep'ing for the regexp, and then cutting and pasting all of
    >> the queue ids into another egrep.)
    >
    >Puh, I did that but haven't got the script here.
    >Hint: egrep can take lines from a file as patterns to search for ...
    >
    YMMV, but this works for me on our FreeBSD boxes...

    #!/bin/sh
    #
    # Usage: maillogrep regex
    #
    PATH=/bin:/usr/bin
    egrep $1 /var/log/maillog | cut -d":" -f4 | sed 's/ //g' > /tmp/mytmp.$$
    egrep -f /tmp/mytmp.$$ /var/log/maillog
    rm -f /tmp/mytmp.$$

    -- 
    do svidaniya,
    

    ~mitch - To unsubscribe, send mail to majordomopostfix.org with content (not subject): unsubscribe postfix-users