On 1/29/2013 at 1:43 PM Brian Evans wrote:

|On 1/29/2013 1:29 PM, Mike. wrote:
|>
|> On 1/29/2013 at 1:14 PM Brian Evans wrote:
|>
|> |On 1/29/2013 1:07 PM, Mike. wrote:
|> |> I implemented the postscreen capability on a small MTA I run for
|> |> friends and family.  Once I got postscreen configuration
producing
|> the
|> |> results I wanted, I soon tired of watching the detailed maillog
to
|> see
|> |> how postscreen was operating.  So I wrote a quick shell script to
|> |> summarize the log file and give me an overview of how well
|> postscreen
|> |> is working.
|> |>
|> |> I offer the script to anyone who would like to use it.   One
company
|> I
|> |> worked for would not allow open source software into the company
|> unless
|> |> there was an explicit license on the software, so I put the BSD
|> license
|> |> on the script.
|> |>
|> |> You can download the script from here:
|> |>   http://archive.mgm51.com/sources/pslogscan.html
|> |>
|> |Fails without modification on my Gentoo mailserver:
|> |Scanning /var/log/maillog
|> |mktemp: too few X's in template ‘mailqscan’
|> |
|> |All "incoming" log records: 10121
|> |./pslogscan.sh: line 51: ${TmpFile}: ambiguous redirect
|> |
|> |Changing mailqscan to mailqscan.XXX works.
|> |
|> |Brian
|>
|>   =============
|>
|>
|> Thanks for the feedback.
|>
|> I only run FreeBSD, so I figure there may be some minor issues like
the
|> one you mention when running on other OS's.
|>
|>
|>
|Also, your expressions don't count real postscreen numbers for
connects
|and rejects.
|Take into account the following lines.
|
|Jan 28 12:47:57 mx1 postfix/error[19363]: 3Yvy410c1Mz8GKk:
|to=<someu...@yahoo.com>, relay=none, delay=2332,
delays=2331/1.2/0/0.07,
|dsn=4.7.0, status=deferred (delivery temporarily suspended: host
|mta7.am0.yahoodns.net[66.94.238.147] refused to talk to me: 421 4.7.0
|[TS01] Messages from xx.xx.xx.xx temporarily deferred due to user
|complaints - 4.16.55.1; see http://postmaster.yahoo.com/421-ts01.html)
|Jan 28 12:48:26 mx1 postfix/smtp[19336]: 3Yvy4D6lG7z8GL8:
|to=<someu...@yahoo.com.com>, relay=none, delay=2350,
|delays=2319/0.05/31/0, dsn=4.4.1, status=deferred (connect to
|yahoo.com.com[216.239.120.187]:25: Connection timed out)
|
|Because of that, I have skewed numbers:
|All "incoming" log records: 10187
|All "status=sent" log records: 7506
|All "status=deferred" log records: 3302
|rejected: -621 (-6%)
|
|It is not a simple math of "A minus B minus C" to find out how much
|postscreen is rejecting in its current state.
|
|Brian

 =============

Yup.

When there are a lot of deferrals, then things get complicated,
requiring one to following individual messages through the process to
eliminate multiple deferrals, etc., e.g., a single message "incoming"
can get deferred many times leading to the numbers you cite.

I wanted to keep things simple, so I made some compromises on the
accuracy.  I've been flipping back and forth between keeping the count
of deferrals in there, or taking it out.  Perhaps I should report the
deferrals, but not count them in the expression....   hmmm...





Reply via email to