exim_lock is a program to lock a file in exactly the same way as Exim would. It is intended for the investigation of interlocking problems, but can also be used to prevent Exim from modifying the file while you do something else to it (for example if you need to manually edit your mailbox in /var/mail).
Apart from specifying the name of the file to lock, which is required, the following optional arguments may also be supplied to exim_lock :
specifies verbose mode (this is overridden if -q is also specified);
specifies quiet mode (takes precendence over -v );
specifies that exim_lock should use an fcntl lock;
specifies that exim_lock should use a lock file (sometimes called a
specifies that exim_lock should lock using MBX rules. To quote from the source of exim_lock , __
specifies the command to run once the specified file is locked. The mailbox will be unlocked again when this command exits.
There is also extensive documentation available in /usr/doc/exim and in the info system (try __
Exim was, and mostly is, written by Philip Hazel, inspired by Smail 3.