smtpctl, mailq --- control the Simple Mail Transfer Protocol daemon
smtpctl command [argument ...] mailq
The smtpctl program controls smtpd(8). Commands may be abbreviated to the minimum unambiguous prefix; for example, sh ro for show routes. The mailq command is provided for compatibility with other MTAs and is simply a shortcut for show queue. The following commands are available: discover envelope-id | message-id Schedule a single envelope, or all envelopes with the same message ID that were manually moved to the queue. encrypt [string] Encrypt the password string to a representation suitable for user credentials and print it to the standard output. If string is not provided, cleartext passwords are read from standard input. It is advised to avoid providing the password as a parameter as it will be visible from top(1) and ps(1) output. log brief Disable verbose debug logging. log verbose Enable verbose debug logging. monitor 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. pause envelope envelope-id | message-id Temporarily suspend scheduling for the envelope with the given ID, or all envelopes with the given message ID. pause envelope all Temporarily suspend scheduling all the envelopes. pause mda Temporarily stop deliveries to local users. pause mta Temporarily stop relaying and deliveries to remote users. pause smtp Temporarily stop accepting incoming sessions. profile subsystem Enables real-time profiling of subsystem. Supported subsystems are: * queue, to profile cost of queue IO * imsg, to profile cost of event handlers remove envelope-id | message-id Remove a single envelope, or all envelopes with the same message ID. remove all Remove all envelopes. resume envelope envelope-id | message-id Resume scheduling for the envelope with the given ID, or all envelopes with the given message ID. resume envelope all Resume scheduling all the envelopes. resume mda Resume deliveries to local users. resume mta Resume relaying and deliveries to remote users. resume route route-id Resume routing on disabled route route-id. resume smtp Resume accepting incoming sessions. schedule all Mark all envelopes as ready for immediate delivery. schedule envelope-id | message-id Mark a single envelope, or all envelopes with the same message ID, as ready for immediate delivery. show envelope envelope-id Display envelope content for the given ID. show hosts Display the list of known remote MX hosts. For each of them, it shows the IP address, the canonical hostname, a reference count, the number of active connections to this host, and the elapsed time since the last connection. show hoststats 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. show message envelope-id Display message content for the given ID. show queue 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. show relays Display the list of currently active relays and associated connectors. For each relay, it shows a number of counters and information on its internal state on a single line. Then comes the list of connectors (source addresses to connect from for this relay). show routes 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 reactivated. 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 has a timeout registered to lower its penalty level and possibly reactivate or discard it. show stats Displays runtime statistics concerning smtpd(8). show status Shows if MTA, MDA and SMTP systems are currently running or paused. stop Stop the server. trace subsystem Enables real-time tracing of subsystem. Supported subsystems are: * imsg * io * smtp (incoming sessions) * filters * mta (outgoing sessions) * bounce * scheduler * expand (aliases/virtual/forward expansion) * lookup (user/credentials lookups) * stat * rules (matched by incoming sessions) * mproc * all uncorrupt message-id Move all envelopes with the given message ID from corrupt bucket back to queue. unprofile subsystem Disables real-time profiling of subsystem. untrace subsystem Disables real-time tracing of subsystem. update table 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.
Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.
Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.
Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.
Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.
The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.
Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.
Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.
Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.