Documentation
¶
Overview ¶
Package mcpserver exposes postsleuth over the Model Context Protocol (stdio). Every tool is read-only unless the server was started with mutations enabled.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActionOut ¶
type ActionOut struct {
Ran []string `json:"ran"`
}
ActionOut reports what was run.
type CategoriesOut ¶
CategoriesOut lists classification categories.
type DNSIn ¶
type DNSIn struct {
Domain string `json:"domain,omitempty" jsonschema:"sending domain (default: myorigin/mydomain from postconf)"`
IPs []string `` /* 150-byte string literal not displayed */
Selectors []string `json:"selectors,omitempty" jsonschema:"DKIM selectors (default: taken from opendkim log lines, else common names are probed)"`
}
DNSIn are arguments.
type DoctorIn ¶
type DoctorIn struct {
Since string `json:"since,omitempty" jsonschema:"log window (default 24h)"`
Domain string `json:"domain,omitempty" jsonschema:"sending domain for DNS checks"`
IPs []string `json:"ips,omitempty" jsonschema:"sending IPs"`
SkipDNS bool `json:"skip_dns,omitempty" jsonschema:"do not run DNS checks"`
}
DoctorIn are arguments.
type FlushIn ¶
type FlushIn struct {
QueueIDs []string `json:"queue_ids,omitempty" jsonschema:"retry these queue IDs now (postqueue -i)"`
Site string `json:"site,omitempty" jsonschema:"retry everything queued for this destination domain (postqueue -s)"`
All bool `json:"all,omitempty" jsonschema:"retry the whole deferred queue (postqueue -f); avoid while a receiver is throttling you"`
Confirm bool `json:"confirm" jsonschema:"must be true; confirms the operator asked for this change"`
}
FlushIn are arguments.
type IDsIn ¶
type IDsIn struct {
QueueIDs []string `json:"queue_ids" jsonschema:"explicit queue IDs (bulk ALL is not supported)"`
Confirm bool `json:"confirm" jsonschema:"must be true; confirms the operator asked for this change"`
}
IDsIn are arguments for mutating tools.
type LogStatsIn ¶
type LogStatsIn struct {
Since string `json:"since,omitempty" jsonschema:"time window, e.g. 1h, 24h (default), 7d, or all"`
Domain string `json:"domain,omitempty" jsonschema:"only this recipient domain (leading dot = include subdomains)"`
Top int `json:"top,omitempty" jsonschema:"max entries per list (default 15)"`
}
LogStatsIn are arguments.
type QueueListIn ¶
type QueueListIn struct {
Queue string `json:"queue,omitempty" jsonschema:"queue name filter, e.g. deferred"`
Domain string `json:"domain,omitempty" jsonschema:"recipient domain; a leading dot matches subdomains too"`
Sender string `json:"sender,omitempty" jsonschema:"substring of the envelope sender"`
ReasonContains string `json:"reason_contains,omitempty" jsonschema:"case-insensitive substring of the delay reason"`
Category string `json:"category,omitempty" jsonschema:"reason category id, e.g. rate_limit, auth, ptr, timeout"`
MinAge string `json:"min_age,omitempty" jsonschema:"only messages older than this, e.g. 2h or 3d"`
Limit int `json:"limit,omitempty" jsonschema:"max messages returned (default 50)"`
}
QueueListIn are arguments.
type QueueListOut ¶
type QueueListOut struct {
Matched int `json:"matched"`
Returned int `json:"returned"`
Messages []queue.Message `json:"messages"`
}
QueueListOut is the result.
type QueueSummaryIn ¶
type QueueSummaryIn struct {
Queue string `json:"queue,omitempty" jsonschema:"only this queue: active, deferred, hold, incoming, maildrop or corrupt (default all)"`
Top int `json:"top,omitempty" jsonschema:"max entries per list (default 10)"`
}
QueueSummaryIn are arguments.
type ShapeIn ¶
type ShapeIn struct {
Queue string `json:"queue,omitempty" jsonschema:"queue to shape (default deferred; 'all' for every queue)"`
By string `json:"by,omitempty" jsonschema:"recipient (default) or sender domain"`
Top int `json:"top,omitempty" jsonschema:"max domains (default 20)"`
}
ShapeIn are arguments.
type TraceIn ¶
type TraceIn struct {
Query string `json:"query" jsonschema:"a queue ID (e.g. 4F2A1C3B9) or an email address"`
Since string `json:"since,omitempty" jsonschema:"time window (default 7d)"`
Limit int `json:"limit,omitempty" jsonschema:"max messages (default 20, newest kept)"`
}
TraceIn are arguments.
type TraceOut ¶
type TraceOut struct {
Source string `json:"source"`
Messages []maillog.TracedMessage `json:"messages"`
}
TraceOut is the result.