locking { # Default locker flags. flags arg; # Set timeout for acquiring the lock. retry-timeout arg; # Set the maximum number of times to retry acquiring the lock. retry-count number; # Expire locks older than this amount of time. expire-timeout number; # Use prog as external locker program. external-locker prog; }
This block statement configures various parameters used when locking UNIX mailboxes in order to prevent simultaneous writes.
It is important to note, that locking applies only to maildrops in UNIX mailbox format. All other mailbox types do not require locking.
Set locking flags. Argument is a string consisting of one or more of the following letters:
- E
- Use an external program to manage locks. The program is given by
external-locker
statement (see below).- R
- If the locking attempt failed, retry it. This is the default. The number of retries, and time interval between the two successive attempts is given by
retry-count
andretry-timeout
statements, correspondingly.- T
- If a lock file exists, check its modification time and, if it is older than a predefined amount of time, remove the lock. The amount of time is specified by
expire-timeout
statement.- P
- Store the PID of the locking process in a lock file.
Number of locking attempts. The ‘P’ flag must be set for this to take effect.
Time interval, in seconds, between the two successive locking attempts. The ‘P’ flag must be set for this to take effect.