Exim support in 4.10-1

Julian Field mailscanner at ecs.soton.ac.uk
Wed Dec 4 15:29:32 GMT 2002

At 14:39 04/12/2002, you wrote:
> >MailScanner needs to place an exclusive lock on each of the config files,
> >so that you can have another script (possibly linked to a web-based
> >configuration system) can update the config files while MailScanner is
> >running, safe in the knowledge that you can't be half-way through writing a
> >config file at the same time as MailScanner is reading it.
>It sounds like MailScanner has a rather broken approach to handling its
>configuration file.

Sorry, but it doesn't do what you describe.

>  What sysadmins expect is that a daemon will slurp the
>file when it starts and when it is HUPped rather than reading piecemeal.

It does slurps the files in at 1 go when it starts. However, because each
of the child processes is programmed to die after a few hours, MailScanner
may actually read a configuration file at any time, not just when you HUP it.

>Since perl file locks are advisory they won't prevent the admin from
>shooting themselves in the foot by incorrectly assuming that MailScanner
>does that too.
>Even if you don't change MailScanner to slurp its configuration,

I don't need to.

>  please
>remove the locking code and instead require admins to use mv to update
>the configuration file atomically.

I was trying to save sysadmins (who didn't know as much as you do) from
some problems they might hit, as they can just copy the locking code out of
any of the autoupdate scripts and it will give them a safety net.

However, if you prefer to have enough rope to hang yourself, that's fine by me.

I will change it for the next version if other people don't want the file
locking either. In the mean time, if you really don't want it doing any
file locking of its configuration files, simply comment out all the "flock"
calls in Config.pm.
Julian Field
MailScanner thanks transtec Computers for their support

More information about the MailScanner mailing list