Knowledge base

Accounting and monitoring

entries in this theme: 114
disable-acct-records<domain>criticalDirectiveDisables the creation of accounting records of the chosen types — delivery, bounce, transient failure, queuing failure — for an individual queue.record-fields<acct-file>criticalset by the HubDirectiveThe field list for one record type; the default is the star, meaning the default field set marked in the manual’s tables; it supports exclusions and arbitrary message headers.records<acct-file>criticalset by the HubDirectiveA list of eight possible accounting record types; the default is deliveries and local bounces.backoff-notify<domain>set by the HubDirectiveA message arrives for both events — entering backoff mode and leaving it.disabled-source-ip-notify<domain>DirectiveThe only thing that makes a quiet mechanism noticeable: a message arrives both on disabling and on re-enabling.discard-as-bounce<domain>DirectiveA discard queue still writes to accounting — this line decides with which letter.enable-tq-record-for-proxy-failure<domain>DirectiveRecords proxy connection failures in tq accounting records; off by default and ignored without this record type.http-mgmt-portGlobalset by the HubDirectiveThe TCP port of the management interface; the value 0 does not bring up the monitor at all. The default is 8080.iso-times<acct-file>DirectiveWhether to write timestamps in ISO format; yes by default.privacy-policy<signals>DirectiveReplaces the local part of the recipient address with a one-way SHA-1 hash; by default it is sent as is.sync<acct-file>DirectiveMakes the operating system flush the accounting file’s buffers regularly; off by default.track-time-first-attemptGlobalset by the HubDirectiveEnables tracking the time of the first attempt; it opens a field in accounting records and a delay metric. Off by default.custom-message-id-header<signals>DirectiveThe name of the header with your message identifier; the service uses it to link opens and clicks with the other events.delete-after<acct-file>set by the HubDirectiveThe retention period of an accounting file before deletion; the default is eight days, and it applies only without moving.map-header-to-field<acct-file>DirectivePuts the contents of a message header into a ready-made field of the chosen record type; not set by default.max-events-recorded<domain>DirectiveNot a log but memory: the last ten errors for a domain, visible in the console and the web monitor.max-size<acct-file>set by the HubDirectiveA ceiling at which a new file is started; for a webhook — the maximum batch size.move-to<acct-file>DirectiveThe destination directory for moving accounting files; by default there is no moving.queue-filter<acct-file>DirectiveA list of queue names with optional negation; by default records of all queues are written.retain-x-sp-subaccount-id<inline-seeding>DirectiveKeeps the service header in the message after processing; by default it is removed.retain-x-sp-subaccount-id<signals>DirectiveKeeps the service header in the message and makes it possible to write its value to accounting files; the line is shared with the seeding block.time-first-attempt-domains-file<prometheus-listener>DirectiveA list of receivers, up to a hundred names, for which the first attempt metric gets its own label; the rest fall into other.track-inbound-perf-statsGlobalDirectiveEnables counting the time from MAIL FROM to the end of DATA on acceptance; useful only together with the metrics listener.track-outbound-perf-statsGlobalDirectiveEnables counting the time from MAIL FROM to the end of DATA when sending; useful only together with the metrics listener.track-recipient-events<domain>DirectiveOff by default: the queue page says nothing about what happened to specific addresses.user-string<acct-file>DirectiveArbitrary text that goes into the userstring field; it works only if that field is listed in the field set.count-moved-records<acct-file>DirectiveAppends the number of records to the log message about moving a CSV file; off by default.dummy-smtp-update-statsGlobalDirectiveOn by default — and it is the only line in the family that spoils production data.move-interval<acct-file>DirectiveThe interval for moving the accounting file; the default is a day, and it works only together with a destination directory.retry-interval<acct-file>DirectiveThe interval for restarting the program that receives the records; the default is five minutes, only for the pipe form.time-first-attempt-hires-timestampGlobalDirectiveAdds milliseconds to the first attempt timestamp in accounting records; works only with counting enabled.write-timeout<acct-file>DirectiveThe wait limit for writing to the program, so that an unresponsive collector does not hold up the node; the default is one minute.http-default-max-itemsGlobalDirectiveLength of the “Top Queues”, “Top Domains”, “Top VirtualMTAs” and “Top Jobs” lists; default 10.http-default-sort-orderGlobalDirectiveOrder of lines in the “Top” lists — by recipient count, by name or by volume; by recipients by default.pmc-acct-min-free-spaceGlobalDirectiveBelow the threshold the engine starts deleting the oldest accounting files accumulated for the management console; deleted data is lost forever.The telemetry contractcriticalMechanismOne block describes the accounting output in full: which record types, which fields, where they go, how files rotate and what gets anonymized.A file, a program or an endpoint — and a file under each of the threecriticalMechanismThree ways to hand off accounting records; an endpoint still has a file underneath, which is deleted only after a successful send, and a non-2xx response triggers a retry.How an accounting record is structuredcriticalMechanismHow an accounting record is structured: the record type in the first column, then the fields, whose composition is configurable.What the node tells about itself and through which channelscriticalMechanismSeven observation surfaces: the web monitor, the console in four formats, the log, accounting, accounting search, metrics and export to external analytics.Accounting sent by the node instead of accounting collected from the nodeMechanismAccounting records can be sent to HTTP endpoints in addition to files and the pipe — not instead of them.Exposing metrics to a collectorMechanismExposing the node’s metrics to an external collector in its format.Node metrics in a standard formatMechanismThe node exposes counters, gauges and summaries in a widely accepted format: traffic, connections, errors, queue depth and delays.CSV or JSON — chosen by the file extension, not by a directiveMechanismRecords are written as comma-separated values with a header line or as JSON objects, one per line; the choice is made by the extension in the path.The log and accounting — two files and two different questionsMechanismThe engine keeps a separate log and a separate accounting file; the separation is made for the sake of format, performance and the ability to hand over the log without disclosing data.Exposing metrics over SNMPMechanismThe node can expose its metrics over SNMP — a second way of monitoring besides the web monitor.<acct-file>Configuration blockOne accounting stream: which records and fields it carries, where it is written, how often it is rotated and how long it is kept.<prometheus-listener>Configuration blockThe block opens a port on the node from which the monitoring system collects metrics in Prometheus format; a node can have only one such block.show statuscriticalCommandPrints the node’s state as a whole: traffic, connections, queue, spool, license.digestCommandComputes the hash of a given string with the chosen method.pmtastatsCommandComputes throughput and traffic statistics from accounting files — for the node, sending addresses, jobs and domains.reset countersCommandResets the statistics counters shown by show status.rotate acctCommandImmediately rotates all accounting files or one named file; the midnight rotation remains.rotate logCommandCloses the current log and starts a new one; the previous one stays in place.acctfindCommandSearches accounting files for records by fields and prints the selected fields in one of seven formats.reset statusCommandAn alias of the counter reset command.Bounce categorycriticalAccounting fieldThe name of the category assigned by a pattern from the text of the receiving server’s reply.Job identifiercriticalAccounting fieldThe job string assigned by the submitting side.Sending addresscriticalAccounting fieldThe name of the sending address the message left through.Through which proxyAccounting fieldThe name of the proxy the delivery went through.Encryption versionAccounting fieldThe name of the encryption protocol version.How many attempts there wereAccounting fieldThe number of retries before this event.Which node address it was submitted toAccounting fieldThe node address the connection came to.When the first attempt was madeAccounting fieldThe timestamp of the first delivery attempt. It is enabled by a separate node directive.Which address was connected toAccounting fieldThe address the engine opened the connection to.What the receiver supportsAccounting fieldThe keywords of the extensions announced by the receiver.Client name at the proxyAccounting fieldThe host name the proxy introduced itself with.Client address at the proxyAccounting fieldThe address the proxy presented to the receiver.The node address used to reach the proxyAccounting fieldThe node’s local address the engine used to connect to the proxy.Proxy addressAccounting fieldHost and port of the proxy server.Size transferredAccounting fieldMessage size in bytes.Which address it went out fromAccounting fieldThe source address of the outgoing connection.Cipher suiteAccounting fieldThe name of the cipher suite.How it was deliveredAccounting fieldThe delivery method: an SMTP session, to a file, via pipe, or by discarding.What was done with the messageAccounting fieldOne of the standard delivery report words: delivered, delayed, failed.What exactly the receiver answeredAccounting fieldFree text — the receiver’s response as is.Who answeredAccounting fieldThe name or pattern of the host that gave the response.Who compiled the reportAccounting fieldThe name of the host that compiled the delivery report.Numeric outcome codeAccounting fieldA status code in dot notation — for example 5.1.1.Envelope identifierAccounting fieldA string assigned by the submitting side to each message.Complaint typeAccounting fieldThe feedback type stated in the report.Report formatAccounting fieldThe name of the format of the incoming report.Selected message headersAccounting fieldThe values of the message headers selected in the accounting setup — one column for each.Original recipient addressAccounting fieldThe recipient address as the sending side submitted it.Envelope return addressAccounting fieldThe sender address from the envelope — not from the message header.The whole queueAccounting fieldThe queue name — the receiver and the sending address together.Recipient addressAccounting fieldThe recipient address this line refers to.Which login it was submitted underAccounting fieldThe name of the account under which authentication took place.Where the connection came fromAccounting fieldThe address the incoming connection came from.Which domain the complaint is aboutAccounting fieldThe domain named in the complaint report.Who sent the reportAccounting fieldThe name of the host that sent the complaint report.Which node address accepted the reportAccounting fieldThe address of the PowerMTA that accepted the report message — that is how the manual describes the field.Who submitted the messageAccounting fieldThe name of the host the message came from.How the message was submittedAccounting fieldThe submission method: an SMTP session or the submission interface.When the event was loggedAccounting fieldThe timestamp when the engine wrote the line. The format is ordinary or in seconds — this is configurable.When the message entered the queueAccounting fieldThe timestamp when the message entered the queue.How long the message sat in the queueAccounting fieldThe number of seconds the message spent in the queue.Record typeAccounting fieldA short code at the very beginning of the line: d — delivered, b — bounced, t — transient failure, and so on.What the report was produced withAccounting fieldThe name and version of the program that produced the report.The accounting block's own stringAccounting fieldAn arbitrary string set by the user-string directive in the accounting block.Address groupAccounting fieldThe pool name, if the sending address belongs to one.Permanently bouncedcriticalAccounting recordThe recipient permanently did not receive the message — either the receiving server refused for good, or the node itself bounced the message when the deadline expired.Delivered — the record everything is counted bycriticalAccounting recordWritten for every recipient whose message the destination server accepted: the outcome, the time, the sending address, the job, transport security and the proxy.ComplaintAccounting recordA complaint report was received and parsed by the configured processor.ReceivedAccounting recordThe message was successfully submitted to the node — through a mail session or through the submission interface.Parsed bounce from outsideAccounting recordA bounce report email arrived at the configured processor and was parsed.Temporary failureAccounting recordOne delivery attempt failed, and the recipient stays in the queue until the next one.Temporary queue failureAccounting recordThe attempt failed at the queue level: the connection was refused, was not established or dropped before the conversation about messages.Delivery notificationAccounting recordA delivery status notification that is not a bounce has arrived — for example, a delivery confirmation.Traffic countersMetricRecipients, messages and kilobytes for all time, for the last hour and for the last minute.Throughput peaksMetricThe highest values per hour and per minute — recipients, messages, kilobytes.LogscriticalMonitor screenA list of log and accounting files with download links.Node statusMonitor screenNode state on one page: traffic, peaks, connections with the ceiling, the DNS cache, the spool and queues by delivery method.The monitor's home pageMonitor screenThe web monitor’s start page: installation information, the top queue domains and links to the other screens.The node's own logFileThe engine’s own log: startup and shutdown, errors, connection traces and warnings; rotation is automatic, the number of kept files is configurable.