Idea for Custom Functions to update the MailScanner.conf file
James A. Pattie
james at PCXPERIENCE.COM
Tue Mar 23 16:22:42 GMT 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
It would be really nice if there was a script similiar to the
upgrade_MailScanner_conf script that would take a config file snippet of options
that need to be enabled/disabled/altered and merge them into the
MailScanner.conf file (or a copy of it, etc.)
This would make CustomFunctions like the MailWatch install so much nicer since
you can ask the user some questions (or hardcode the values based upon the
distro being packaged), modify your config file to have the values you want and
then call the merge script to actually update the MailScanner.conf file.
Issues I see are:
1) how to indicate you want to comment out an option or make it be disabled, but
comment out the old value so the user can see what changed and revert if neeed.
2) how to indicate you want to append your value to the values already present
(this would be used mainly for those options that can have multiple values like
the Spam Actions, etc.)
3) how to indicate that you want to delete this value if it exists in a multiple
value entry
We could use the Config::IniFiles perl module for the config snippet file:
Ex:
- --------------
[Enable]
Always Looked Up Last = &MailWatchLogging
Detailed Spam Report = yes
Quarantine Whole Message = yes
Include Scores In SpamAssassin Report = yes
Quarantine User = root
Quarantine Group = www-data
Quarantine Permissions = 0660
[Disable]
Quarantine Whole Message As Queue File = no
[Append]
Spam Actions = store
High Scoring Spam Actions = store
Non Spam Actions = store
- --------------
The merge script would then process each section and do the changes requested.
Alternatively, we could just have Replace and Append sections, where the Replace
will assign the value you specified and then have the old value (if different)
commented out after it so the user can see what changed. Then we just have the
Append section to say we want to add to this entry. Do we need a Delete section
to say remove the value from the specified entry?
I'll wait for feedback before working on this, unless Julian wants to implement
it himself. I won't have time to implement for a couple days probably, plus I
want to make sure it is going to be usefull in the final submitted form. :)
- --
James A. Pattie
james at pcxperience.com
Linux -- SysAdmin / Programmer
Xperience, Inc.
http://www.pcxperience.com/
http://www.xperienceinc.com/
http://www.pcxperience.org/
GPG Key Available at http://www.pcxperience.com/gpgkeys/james.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFAYGRStUXjwPIRLVERAuseAJ94PTHmht6f7AOOayfTL1rWYUZUfQCdHeWX
WEOo6gAzGSwsXvygVAPS+xM=
=cqtP
-----END PGP SIGNATURE-----
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.
More information about the MailScanner
mailing list