Config File Idea

James A. Pattie james at PCXPERIENCE.COM
Mon Mar 17 21:16:45 GMT 2003


Julian Field wrote:
> 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.

Sorry, I was thinking "reload" and wrote "restart".
Actually, I'm thinking about an environment where you are running from
apache and don't want to have to "reload" MailScanner when a change
happens either because you haven't got sudo permissions setup, etc. or
apache won't allow you to run a suid/guid program with a uid/gid < 500.

I was just proposing an idea to see if you had any objections, etc. and
if not, I was going to work on it in my spare time.  :)

>
> 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.

I'm not asking for you to make it, I was just seeing if anyone else
wanted something that would be more for an end user (say an ISP client
like yahoo, etc.) to enable spam, virus checks, add some
whitelist/blacklist entries but not actually to administer MailScanner
overall like the Webmin module already tries to.

>
> 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.



More information about the MailScanner mailing list