{
    "mode": "man",
    "parameter": "postlock",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/postlock/1/json",
    "generated": "2026-07-14T11:21:18Z",
    "synopsis": "postlock [-c configdir] [-l lockstyle]\n[-v] file command...",
    "sections": {
        "NAME": {
            "content": "postlock - lock mail folder and execute command\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "postlock [-c configdir] [-l lockstyle]\n[-v] file command...\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The  postlock(1)  command  locks file for exclusive access, and executes command. The locking\nmethod is compatible with the Postfix UNIX-style local delivery agent.\n\nOptions:\n",
            "subsections": [
                {
                    "name": "-c",
                    "content": "Read the main.cf configuration file in the named directory instead of the default con‐\nfiguration directory.\n",
                    "flag": "-c"
                },
                {
                    "name": "-l",
                    "content": "Override  the locking method specified via the mailboxdeliverylock configuration pa‐\nrameter (see below).\n",
                    "flag": "-l"
                },
                {
                    "name": "-v -v",
                    "content": "increasingly verbose.\n\nArguments:\n\nfile   A mailbox file. The user should have read/write permission.\n\ncommand...\nThe command to execute while file is locked for exclusive access.  The command is exe‐\ncuted directly, i.e. without interpretation by a shell command interpreter.\n",
                    "flag": "-v"
                }
            ]
        },
        "DIAGNOSTICS": {
            "content": "The result status is 75 (EXTEMPFAIL) when postlock(1) could not perform the requested opera‐\ntion.  Otherwise, the exit status is the exit status from the command.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "With remote file systems, the ability to acquire a lock does not necessarily eliminate access\nconflicts. Avoid file access by processes running on different machines.\n",
            "subsections": []
        },
        "ENVIRONMENT": {
            "content": "MAILCONFIG\nDirectory with Postfix configuration files.\n\nMAILVERBOSE\nEnable verbose logging for debugging purposes.\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",
            "subsections": []
        },
        "LOCKING CONTROLS": {
            "content": "deliverlockattempts (20)\nThe  maximal  number  of  attempts  to  acquire an exclusive lock on a mailbox file or\nbounce(8) logfile.\n\ndeliverlockdelay (1s)\nThe time between attempts to acquire an exclusive lock on a mailbox file or  bounce(8)\nlogfile.\n\nstalelocktime (500s)\nThe time after which a stale exclusive mailbox lockfile is removed.\n\nmailboxdeliverylock (see 'postconf -d' output)\nHow to lock a UNIX-style local(8) mailbox before attempting delivery.\n",
            "subsections": []
        },
        "RESOURCE AND RATE CONTROLS": {
            "content": "forkattempts (5)\nThe maximal number of attempts to fork() a child process.\n\nforkdelay (1s)\nThe delay between attempts to fork() a child process.\n",
            "subsections": []
        },
        "MISCELLANEOUS CONTROLS": {
            "content": "configdirectory (see 'postconf -d' output)\nThe default location of the Postfix main.cf and master.cf configuration files.\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",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "postconf(5), configuration parameters\n",
            "subsections": []
        },
        "LICENSE": {
            "content": "The Secure Mailer license must be distributed with this software.\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\nPOSTLOCK(1)",
            "subsections": []
        }
    },
    "summary": "postlock - lock mail folder and execute command",
    "flags": [
        {
            "flag": "-c",
            "long": null,
            "arg": null,
            "description": "Read the main.cf configuration file in the named directory instead of the default con‐ figuration directory."
        },
        {
            "flag": "-l",
            "long": null,
            "arg": null,
            "description": "Override the locking method specified via the mailboxdeliverylock configuration pa‐ rameter (see below)."
        },
        {
            "flag": "-v",
            "long": null,
            "arg": null,
            "description": "increasingly verbose. Arguments: file A mailbox file. The user should have read/write permission. command... The command to execute while file is locked for exclusive access. The command is exe‐ cuted directly, i.e. without interpretation by a shell command interpreter."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "postconf",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/postconf/5/json"
        }
    ]
}