summaryrefslogtreecommitdiff
path: root/sqmail-4.3.07/src/zsendmail.sh
blob: e87715b144f582b4a5d217025cdd33c90632b397 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
awk '
  /^d/ {
    if ($2 == "k") stat="stat=Sent"
    else if ($2 == "d") stat="stat=Failed"
    else stat="stat=Deferred"
    str1 = sprintf("%.6f",$5-$3)
    str2 = sprintf("%.6f",$5-$4)
    print $5" qp "$9": to="$8", uid="$10", ddelay="str1", xdelay="str2", "stat" ("$11")"
    next
  }
  /^m/ {
    str1 = sprintf("%.6f",$3-$2)
    print $3" qp "$9": from="$8", uid="$10", size="$4", nrcpts="$5+$6", deferrals="$7", qtime="str1
    next
  }
  { print }
'