diff options
author | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-03 15:48:04 +0200 |
---|---|---|
committer | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-03 15:48:04 +0200 |
commit | 89b7b67a13ebb7965cc7f13ad0595e2194a2d34c (patch) | |
tree | 25efd77a90ae87236e6730d8ea3846bbe0fd126f /src/rhosts.sh |
add sqmail-4.2.29asqmail-4.2
Diffstat (limited to 'src/rhosts.sh')
-rw-r--r-- | src/rhosts.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/rhosts.sh b/src/rhosts.sh new file mode 100644 index 0000000..96261e7 --- /dev/null +++ b/src/rhosts.sh @@ -0,0 +1,18 @@ +awk ' + /^d/ { + host = $8 + while (num = index(host,"@")) + host = substr(host,num + 1) + xdelay[host] += $5 - $4 + if ($2 == "k") sbytes[host] += $6 + if ($2 == "k") succ[host] += 1 + if ($2 == "d") fail[host] += 1 + if ($2 == "z") temp[host] += 1 + } + END { + for (host in xdelay) { + str = sprintf("%.2f",xdelay[host]) + print 0 + sbytes[host],succ[host] + fail[host],succ[host] + fail[host] + temp[host],str,host + } + } +' |