Config File Idea

Julian Field mailscanner at ecs.soton.ac.uk
Mon Mar 17 20:09:30 GMT 2003


There are already a few possibilities here. If you are changing the config
files, then you should use flock() (advisory file locks) exclusive locks on
them while you are updating them, that will make sure that MailScanner
isn't trying to read a few you are half way through writing.

You can shorten the "Restart Every" time to a few minutes, which just
regularly does the same as a MailScanner "reload" does. There is very
little efficiency hit by doing this, it just causes MailScanner to scrap
scanning the current batches of messages and start processing them again.
On a reasonably-loaded MailScanner server that will only cause a few
messages to be re-scanned.

Or else you can do a "reload" when the config files have been updated. You
don't need to do a "restart" which is a much more heavyweight operation.
All a "reload" does is do a "kill -HUP" on all the MailScanner processes,
causing them all to scrap the current batch, re-read the config files and
start again.

As for writing a configuration user interface, I don't really have much
intention of doing that. Everyone's requirements are so different that it
would be impossible to create one which suited everyone. For certain groups
of users, this has already been done, such as the Webmin module which has
been written.

At 19:51 17/03/2003, you wrote:
>What if the MailScanner code remembered the date/time stamp of each
>config file when it initially started and parsed them.  Then before
>using the data structure for a given config file, it checks to see if
>the file has changed and if it did, re-loads the config file.
>
>Obviously, we would need some form of file locking, etc. to make sure
>that you don't read a config file that is half way created and to make
>this work, we would need a script that locked the file and then let you
>run vi, etc. and then unlocked it when you were done.
>
>The reason I bring this up is for the ideas of making a web
>configuration interface that many users could be changing settings in a
>database and then the config program re-generates the config files every
>X minutes or as the user finishes their changes.  But we don't want to
>constantly be restarting MailScanner or telling the user they are going
>to have to wait X minutes before their changes are live if we do restart
>MailScanner all the time, etc.
>
>Any thoughts, suggestions, etc. welcome.
>
>Anyone interested in working on a user configuration interface?
>
>--
>James A. Pattie
>james at pcxperience.com
>
>Linux  --  SysAdmin / Programmer
>Xperience, Inc.
>http://www.pcxperience.com/
>http://www.xperienceinc.com/
>
>GPG Key Available at http://www.pcxperience.com/gpgkeys/james.html
>
>
>--
>This message has been scanned for viruses and
>dangerous content by MailScanner, and is
>believed to be clean.

--
Julian Field
www.MailScanner.info
Professional Support Services at www.MailScanner.biz
MailScanner thanks transtec Computers for their support



More information about the MailScanner mailing list