{
    "mode": "man",
    "parameter": "postqueue",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/postqueue/1/json",
    "generated": "2026-06-02T23:30:24Z",
    "synopsis": "To flush the mail queue:\npostqueue [-v] [-c configdir] -f\npostqueue [-v] [-c configdir] -i queueid\npostqueue [-v] [-c configdir] -s site\nTo list the mail queue:\npostqueue [-v] [-c configdir] -j\npostqueue [-v] [-c configdir] -p",
    "sections": {
        "NAME": {
            "content": "postqueue - Postfix queue control\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "To flush the mail queue:\n\npostqueue [-v] [-c configdir] -f\n\npostqueue [-v] [-c configdir] -i queueid\n\npostqueue [-v] [-c configdir] -s site\n\nTo list the mail queue:\n\npostqueue [-v] [-c configdir] -j\n\npostqueue [-v] [-c configdir] -p\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The  postqueue(1)  command implements the Postfix user interface for queue management. It im‐\nplements operations that are traditionally available via the sendmail(1)  command.   See  the\npostsuper(1) command for queue operations that require super-user privileges such as deleting\na message from the queue or changing the status of a message.\n\nThe following options are recognized:\n",
            "subsections": [
                {
                    "name": "-c",
                    "content": "The main.cf configuration file is in the named directory instead of the  default  con‐\nfiguration directory. See also the MAILCONFIG environment setting below.\n",
                    "flag": "-c"
                },
                {
                    "name": "-f",
                    "content": "This  option implements the traditional \"sendmail -q\" command, by contacting the Post‐\nfix qmgr(8) daemon.\n\nWarning: flushing undeliverable mail frequently will result in poor  delivery  perfor‐\nmance of all other mail.\n",
                    "flag": "-f"
                },
                {
                    "name": "-i",
                    "content": "Schedule immediate delivery of deferred mail with the specified queue ID.\n\nThis  option  implements  the  traditional  sendmail  -qI  command,  by contacting the\nflush(8) server.\n\nThis feature is available with Postfix version 2.4 and later.\n",
                    "flag": "-i"
                },
                {
                    "name": "-j",
                    "content": "result  is  a stream of zero or more JSON objects, one per queue file.  Each object is\nfollowed by a newline character to support simple streaming parsers. See \"JSON  OBJECT\nFORMAT\" below for details.\n\nThis feature is available in Postfix 3.1 and later.\n",
                    "flag": "-j"
                },
                {
                    "name": "-p",
                    "content": "tional mailq command, by contacting the Postfix showq(8) daemon.\n\nEach queue entry shows the queue file ID, message size, arrival time, sender, and  the\nrecipients  that  still need to be delivered.  If mail could not be delivered upon the\nlast attempt, the reason for failure is shown. The queue ID string is followed  by  an\noptional status character:\n\n*      The message is in the active queue, i.e. the message is selected for delivery.\n\n!      The message is in the hold queue, i.e. no further delivery attempt will be made\nuntil the mail is taken off hold.\n\n#      The message is forced to expire. See the postsuper(1) options -e or -f.\n\nThis feature is available in Postfix 3.5 and later.\n",
                    "flag": "-p"
                },
                {
                    "name": "-s",
                    "content": "Schedule immediate delivery of all mail that is queued for the named site. A numerical\nsite  must  be specified as a valid RFC 5321 address literal enclosed in [], just like\nin email addresses.  The site must be eligible for  the  \"fast  flush\"  service.   See\nflush(8) for more information about the \"fast flush\" service.\n\nThis  option  implements the traditional \"sendmail -qRsite\" command, by contacting the\nPostfix flush(8) daemon.\n",
                    "flag": "-s"
                },
                {
                    "name": "-v -v",
                    "content": "increasingly  verbose.  As of Postfix 2.3, this option is available for the super-user\nonly.\n",
                    "flag": "-v"
                }
            ]
        },
        "JSON OBJECT FORMAT": {
            "content": "Each JSON object represents one queue file; it is emitted as a single text line followed by a\nnewline character.\n\nObject  members have string values unless indicated otherwise.  Programs should ignore object\nmembers that are not listed here; the list of members is expected to grow over time.\n\nqueuename\nThe name of the queue where the message was found.  Note that the contents of the mail\nqueue  may  change  while it is being listed; some messages may appear more than once,\nand some messages may be missed.\n\nqueueid\nThe queue file name. The queueid may be reused within a Postfix instance unless  \"en‐\nablelongqueueids = true\" and time is monotonic.  Even then, the queueid is not ex‐\npected to be unique between different Postfix instances.  Management  tools  that  re‐\nquire  a  unique  name  should combine the queueid with the myhostname setting of the\nPostfix instance.\n\narrivaltime\nThe number of seconds since the start of the UNIX epoch.\n\nmessagesize\nThe number of bytes in the message header and body. This number does not include  mes‐\nsage envelope information. It is approximately equal to the number of bytes that would\nbe transmitted via SMTP including the <CR><LF> line endings.\n\nforcedexpire\nThe message is forced to expire (true or false).  See the postsuper(1) options  -e  or\n-f.\n\nThis feature is available in Postfix 3.5 and later.\n\nsender The envelope sender address.\n",
            "subsections": [
                {
                    "name": "recipients",
                    "content": "An array containing zero or more objects with members:\n\naddress\nOne recipient address.\n\ndelayreason\nIf  present,  the  reason for delayed delivery.  Delayed recipients may have no\ndelay reason, for example, while delivery is in progress, or after  the  system\nwas stopped before it could record the reason.\n"
                }
            ]
        },
        "SECURITY": {
            "content": "This program is designed to run with set-group ID privileges, so that it can connect to Post‐\nfix daemon processes.\n",
            "subsections": []
        },
        "STANDARDS": {
            "content": "RFC 7159 (JSON notation)\n",
            "subsections": []
        },
        "DIAGNOSTICS": {
            "content": "Problems are logged to syslogd(8) or postlogd(8), and to the standard error stream.\n",
            "subsections": []
        },
        "ENVIRONMENT": {
            "content": "MAILCONFIG\nDirectory with the main.cf file. In order to avoid exploitation of set-group ID privi‐\nleges, a non-standard directory is allowed only if:\n\n•      The  name  is listed in the standard main.cf file with the alternateconfigdi‐‐\nrectories configuration parameter.\n\n•      The command is invoked by the super-user.\n",
            "subsections": []
        },
        "CONFIGURATION PARAMETERS": {
            "content": "The following main.cf parameters are especially relevant to this  program.   The  text  below\nprovides only a parameter summary. See postconf(5) for more details including examples.\n\nalternateconfigdirectories (empty)\nA list of non-default Postfix configuration directories that may be specified with \"-c\nconfigdirectory\" on the command line (in the case of sendmail(1), with the  \"-C\"  op‐\ntion), or via the MAILCONFIG environment parameter.\n\nconfigdirectory (see 'postconf -d' output)\nThe default location of the Postfix main.cf and master.cf configuration files.\n\ncommanddirectory (see 'postconf -d' output)\nThe location of all postfix administrative commands.\n\nfastflushdomains ($relaydomains)\nOptional list of destinations that are eligible for per-destination logfiles with mail\nthat is queued to those destinations.\n\nimportenvironment (see 'postconf -d' output)\nThe list of environment parameters that a privileged Postfix process will import  from\na non-Postfix parent process, or name=value environment overrides.\n\nqueuedirectory (see 'postconf -d' output)\nThe location of the Postfix top-level queue directory.\n\nsyslogfacility (mail)\nThe syslog facility of Postfix logging.\n\nsyslogname (see 'postconf -d' output)\nA  prefix  that is prepended to the process name in syslog records, so that, for exam‐\nple, \"smtpd\" becomes \"prefix/smtpd\".\n\ntriggertimeout (10s)\nThe time limit for sending a trigger to a Postfix daemon (for example,  the  pickup(8)\nor qmgr(8) daemon).\n\nAvailable in Postfix version 2.2 and later:\n\nauthorizedflushusers (static:anyone)\nList of users who are authorized to flush the queue.\n\nauthorizedmailqusers (static:anyone)\nList of users who are authorized to view the queue.\n",
            "subsections": []
        },
        "FILES": {
            "content": "/var/spool/postfix, mail queue\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "qmgr(8), queue manager\nshowq(8), list mail queue\nflush(8), fast flush service\nsendmail(1), Sendmail-compatible user interface\npostsuper(1), privileged queue operations\npostlogd(8), Postfix logging\nsyslogd(8), system logging\n",
            "subsections": []
        },
        "README FILES": {
            "content": "Use \"postconf readmedirectory\" or \"postconf htmldirectory\" to locate this information.\nETRNREADME, Postfix ETRN howto\n",
            "subsections": []
        },
        "LICENSE": {
            "content": "The Secure Mailer license must be distributed with this software.\n",
            "subsections": []
        },
        "HISTORY": {
            "content": "The postqueue command was introduced with Postfix version 1.1.\n\nAUTHOR(S)\nWietse Venema\nIBM T.J. Watson Research\nP.O. Box 704\nYorktown Heights, NY 10598, USA\n\nWietse Venema\nGoogle, Inc.\n111 8th Avenue\nNew York, NY 10011, USA\n\n\n\nPOSTQUEUE(1)",
            "subsections": []
        }
    },
    "summary": "postqueue - Postfix queue control",
    "flags": [
        {
            "flag": "-c",
            "long": null,
            "arg": null,
            "description": "The main.cf configuration file is in the named directory instead of the default con‐ figuration directory. See also the MAILCONFIG environment setting below."
        },
        {
            "flag": "-f",
            "long": null,
            "arg": null,
            "description": "This option implements the traditional \"sendmail -q\" command, by contacting the Post‐ fix qmgr(8) daemon. Warning: flushing undeliverable mail frequently will result in poor delivery perfor‐ mance of all other mail."
        },
        {
            "flag": "-i",
            "long": null,
            "arg": null,
            "description": "Schedule immediate delivery of deferred mail with the specified queue ID. This option implements the traditional sendmail -qI command, by contacting the flush(8) server. This feature is available with Postfix version 2.4 and later."
        },
        {
            "flag": "-j",
            "long": null,
            "arg": null,
            "description": "result is a stream of zero or more JSON objects, one per queue file. Each object is followed by a newline character to support simple streaming parsers. See \"JSON OBJECT FORMAT\" below for details. This feature is available in Postfix 3.1 and later."
        },
        {
            "flag": "-p",
            "long": null,
            "arg": null,
            "description": "tional mailq command, by contacting the Postfix showq(8) daemon. Each queue entry shows the queue file ID, message size, arrival time, sender, and the recipients that still need to be delivered. If mail could not be delivered upon the last attempt, the reason for failure is shown. The queue ID string is followed by an optional status character: * The message is in the active queue, i.e. the message is selected for delivery. ! The message is in the hold queue, i.e. no further delivery attempt will be made until the mail is taken off hold. # The message is forced to expire. See the postsuper(1) options -e or -f. This feature is available in Postfix 3.5 and later."
        },
        {
            "flag": "-s",
            "long": null,
            "arg": null,
            "description": "Schedule immediate delivery of all mail that is queued for the named site. A numerical site must be specified as a valid RFC 5321 address literal enclosed in [], just like in email addresses. The site must be eligible for the \"fast flush\" service. See flush(8) for more information about the \"fast flush\" service. This option implements the traditional \"sendmail -qRsite\" command, by contacting the Postfix flush(8) daemon."
        },
        {
            "flag": "-v",
            "long": null,
            "arg": null,
            "description": "increasingly verbose. As of Postfix 2.3, this option is available for the super-user only."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "qmgr",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/qmgr/8/json"
        },
        {
            "name": "showq",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/showq/8/json"
        },
        {
            "name": "flush",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/flush/8/json"
        },
        {
            "name": "sendmail",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/sendmail/1/json"
        },
        {
            "name": "postsuper",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/postsuper/1/json"
        },
        {
            "name": "postlogd",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/postlogd/8/json"
        },
        {
            "name": "syslogd",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/syslogd/8/json"
        }
    ]
}