Suggested change to
MailScanner at ecs.soton.ac.uk
Tue Sep 8 09:24:46 IST 2009
I basically like it. You've got 2 small problems
1) The "if [ reload ==1 ]; then" line should of course read "if [
"$reload" = "1" ]; then"
(i.e. you mean "=" for comparing strings (though == does appear to work,
it's not documented in test(1)), and you missed the "$" off the front of
$reload which is rather more critical! :-)
2) What happens if the downloaded file is bad and you haven't already
got a backup of it?
I have solved that one by deleting the downloaded file in that case.
But otherwise, your code looks good.
I have attached my new copy of the script. Please let me know what you
On 07/09/2009 20:31, Mark Sapiro wrote:
> I note the script at http://www.mailscanner.info/files/4/KAM.cf.sh has
> been recently changed. The prior script contained
> /usr/bin/wget -N -O KAM.cf http://www.peregrinehw.com/downloads/SpamAssassin/contrib/KAM.cf
> With my version of wget at least, the -N option was inneffective in
> preventing unnecessary retrieval of unchanged data because of the
> (unnecessary) -O KAM.cf option.
> This has apparently been recognized as the script was changed to do
> /usr/bin/wget -O KAM.cf http://www.peregrinehw.com/downloads/SpamAssassin/contrib/KAM.cf
> instead, but it also always downloads the file and reloads MailScanner.
> I have changed the script somewhat differently, and with my changes,
> wget does not retrieve the file if it is unchanged, and only reloads
> MailScanner if it does change the file.
> Attached is a patch KAM_cf_sh.patch to convert the current
> http://www.mailscanner.info/files/4/KAM.cf.sh script, and KAM_cf_sh
> is the converted script.
Julian Field MEng CITP CEng
Buy the MailScanner book at www.MailScanner.info/store
Need help customising MailScanner?
Need help fixing or optimising your systems?
Need help getting you started solving new requirements from your boss?
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
Follow me at twitter.com/JulesFM and twitter.com/MailScanner
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 896 bytes
Desc: not available
Url : http://lists.mailscanner.info/pipermail/mailscanner/attachments/20090908/a9cd203a/KAM.cf.sh.zip
More information about the MailScanner