1 .\" Hey, EMACS: -*- nroff -*-
2 .\" First parameter, NAME, should be all caps
3 .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
4 .\" other parameters are allowed: see man(7), man(1)
5 .TH EXIM_LOCK 8 "March 26, 2003"
6 .\" Please adjust this date whenever revising the manpage.
8 .\" Some roff macros, for reference:
9 .\" .nh disable hyphenation
10 .\" .hy enable hyphenation
11 .\" .ad l left justify
12 .\" .ad b justify to both left and right margins
13 .\" .nf disable filling
14 .\" .fi enable filling
15 .\" .br insert line break
16 .\" .sp <n> insert n+1 empty lines
17 .\" for manpage-specific macros, see man(7)
18 .\" \(oqthis text is enclosed in single quotes\(cq
19 .\" \(lqthis text is enclosed in double quotes\(rq
21 exim_lock \- Mailbox maintenance
24 .RI [ options ] mailbox-file
29 utility locks a mailbox file using the same algorithm as Exim.
30 For a discussion of locking issues, see section 25.2.
32 can be used to prevent any modification of a mailbox by Exim or a user
33 agent while investigating a problem.
34 The utility requires the name of the file as its first argument.
35 If the locking is successful, the second argument is run as a command
36 (using C's \(lqsystem()\(rq function); if there is no second argument, the value
37 of the SHELL environment variable is used; if this is unset or empty,
39 When the command finishes, the mailbox is unlocked and the utility ends.
40 The following options are available:
43 Use \(lqfcntl()\(rq locking on the open mailbox.
46 This must be followed by a number, which is a number of seconds; it
47 sets the interval to sleep between retries (default 3).
50 Create a lock file before opening the mailbox.
53 Lock the mailbox using MBX rules.
56 Suppress verification output.
59 This must be followed by a number; it sets the number of times to try
60 to get the lock (default 10).
63 This must be followed by a number, which is a number of seconds; it
64 sets a timeout to be used with a blocking \(lqfcntl()\(rq lock.
65 If it is not set (the default), a non-blocking call is used.
68 Generate verbose output.
71 .I \-fcntl, \-lockfile
74 are given, the default is to create a lock file and also use \(lqfcntl()\(rq locking
75 on the mailbox, which is the same as
80 requires that the file be writable; the use
83 requires that the directory containing the file be writable.
84 Locking by lock file does not last for ever; Exim assumes that a lock file
85 is expired if it is more than 30 minutes old.
89 option is mutually exclusive with
91 It causes a shared lock to be taken out on the open mailbox, and an
92 exclusive lock on the file /tmp/.n.m where n and m are the device number
93 and inode number of the mailbox file.
94 When the locking is released, if an exclusive lock can be obtained for the
95 mailbox, the file in /tmp is deleted.
97 The default output contains verification of the locking that takes place.
100 option causes some additional information to be given.
103 option suppresses all output except error messages.
107 exim_lock /var/spool/mail/spqr
109 runs an interactive shell while the file is locked, whereas
111 exim_lock \-q /var/spool/mail/spqr <<End
115 runs a specific non-interactive sequence of commands while the file is
116 locked, suppressing all verification output.
117 A single command can be run by a command such as
119 exim_lock \-q /var/spool/mail/spqr \
120 "cp /var/spool/mail/spqr /some/where"
122 Note that if a command is supplied, it must be entirely contained within
123 the second argument - hence the quotes.
126 This manual page needs a major re-work. If somebody knows better groff
127 than us and has more experience in writing manual pages, any patches
128 would be greatly appreciated.
132 /usr/share/doc/exim4\-base/
135 This manual page was stitched together from spec.txt by
136 Andreas Metzler <ametzler at downhill.at.eu.org>,
137 for the Debian GNU/Linux system (but may be used by others).