OpenBSD manual page server

Manual Page Search Parameters

SMTPCTL(8) System Manager's Manual SMTPCTL(8)

smtpctlcontrol the Simple Mail Transfer Protocol daemon

smtpctl command [argument ...]

The smtpctl program controls smtpd(8). Commands may be abbreviated to the minimum unambiguous prefix; for example, sh s for show stats.

The following commands are available:

Disable verbose debug logging.
Enable verbose debug logging.
Display updates of some smtpd(8) internal counters in one second intervals. Each line reports the increment of all counters since the last update, except for some counters which are always absolute values. The first line reports the current value of each counter. The fields are:

  • Current number of active SMTP clients (absolute value).
  • New SMTP clients.
  • Disconnected clients.
  • Current number of envelopes in the queue (absolute value).
  • Newly enqueued envelopes.
  • Dequeued envelopes.
  • Successful deliveries.
  • Temporary failures.
  • Permanent failures.
  • Message loops.
  • Expired envelopes.
  • Envelopes removed by the administrator.
  • Generated bounces.
envelope-id | message-id
Temporarily suspend scheduling for the envelope with the given ID, or all envelopes with the given message ID.
Temporarily stop deliveries to local users.
Temporarily stop relaying and deliveries to remote users.
Temporarily stop accepting incoming sessions.
subsystem
Enables real-time profiling of subsystem. Supported subsystems are:

  • queue, to profile cost of queue IO
  • imsg, to profile cost of event handlers
envelope-id | message-id
Remove a single envelope, or all envelopes with the same message ID.
envelope-id | message-id
Resume scheduling for the envelope with the given ID, or all envelopes with the given message ID.
Resume deliveries to local users.
Resume relaying and deliveries to remote users.
route-id
Resume routing on disabled route route-id.
Resume accepting incoming sessions.
Mark all envelopes as ready for immediate delivery.
envelope-id | message-id
Mark a single envelope, or all envelopes with the same message ID, as ready for immediate delivery.
envelope-id
Display envelope content for the given ID.
Display status of last delivery for domains that have been active in the last 4 hours. It consists of the following fields, separated by a "|":

  • Domain.
  • UNIX timestamp of last delivery.
  • Status of last delivery.
envelope-id
Display message content for the given ID.
Display information concerning envelopes that are currently in the queue. Each line of output describes a single envelope. It consists of the following fields, separated by a "|":

  • Envelope ID.
  • Address family of the client which enqueued the mail.
  • Type of delivery: one of "mta", "mda" or "bounce".
  • Various flags on the envelope.
  • Sender address (return path).
  • The original recipient address.
  • The destination address.
  • Time of creation.
  • Time of expiration.
  • Time of last delivery or relaying attempt.
  • Number of delivery or relaying attempts.
  • Current runstate: either "pending" or "inflight" if smtpd(8) is running, or "offline" otherwise.
  • Delay in seconds before the next attempt if pending, or time ellapsed if currently running. This field is blank if smtpd(8) is not running.
  • Error string for the last failed delivery or relay attempt.
Display status of routes currently known by smtpd(8). Each line consists of a route number, a source address, a destination address, a set of flags, the number of connections on this route, the current penalty level which determines the amount of time the route is disabled if an error occurs, and the delay before it gets re-activated. The following flags are defined:

D
The route is currently disabled.
N
The route is new. No SMTP session has been established yet.
Q
The route as a timeout registered to lower its penalty level and possibly re-activate or discard it.
Displays runtime statistics concerning smtpd(8).
Stop the server.
subsystem
Enables real-time tracing of subsystem. Supported subsystems are:

  • imsg
  • io
  • smtp (incoming sessions)
  • filter
  • transfer (outgoing sessions)
  • bounce
  • scheduler
  • expand (aliases/virtual/forward expansion)
  • lookup (user/credentials lookups)
  • stat
  • rules (matched by incoming sessions)
  • mproc
  • all
subsystem
Disables real-time profiling of subsystem.
subsystem
Disables real-time tracing of subsystem.
name
For table backends that provide caching, causes smtpd(8) to update the cache.

When smtpd receives a message, it generates a message-id for the message, and one envelope-id per recipient. The message-id is a 32-bit random identifier that is guaranteed to be unique on the host system. The envelope-id is a 64-bit unique identifier that encodes the message-id in the 32 upper bits and a random envelope identifier in the 32 lower bits.

A command which specifies a message-id applies to all recipients of a message; a command which specifies an envelope-id applies to a specific recipient of a message.

/var/run/smtpd.sock
UNIX-domain socket used for communication with smtpd(8).

smtpd(8)

The smtpctl program first appeared in OpenBSD 4.6.

July 20, 2013 OpenBSD-5.4