The Inbound list was every SMTP session that reached MAIL FROM, so mail a
user submitted over 587/465 showed up there. The Outbound list was every
delivery attempt, and local delivery goes through the queue too, so mail
received for local mailboxes showed up there.
x:Trace/query now takes a kind filter: received, submitted, remote, local,
or any. The kind is worked out from a trace's events when it's read, so
history stored before this has one too: a session with auth.success was
submitted, and a delivery attempt is local when every route in it was.
domain-delivery-start now names its route in Type (local, mx, relay or
inbuxa-relay). Older attempts without it count as local when the message
was filed in a mailbox and no other server was connected to. The two list
views default to received and remote, with a Show filter for the other
kind or both.
The spam filter's verdict never reached stored traces: spam.classify is
debug level. A new info event, spam.result (id 662), carries the verdict,
the score and each rule the message hit with its points, so an inbound
session's trace shows why its message scored the way it did. It's in the
packaged schema with the two kind enums. Spec: MON-40 and MON-41.
Test: unit tests for each kind, including older traces and a delivery
with both local and remote routes. monitoring_tests checks the kinds of
an inbound session and its local delivery through x:Trace/query, and
that an unknown kind is refused.
Fixes#397