ScamNailer script unnecessarily updates the file

Jules Field MailScanner at
Mon Jan 11 13:16:49 GMT 2010

Many thanks for the update. I am publishing 2.08 now.

On 27/12/2009 19:08, Mark Sapiro wrote:
> The ScamNailer script knows when it actually retrieved new data, but it
> builds a new output file and runs the mailscanner_restart command even
> when it hasn't got new data.
> The main problem with this occurs if the site compiles it's rules. If
> the mailscanner_restart command includes possible rule compilation, it
> will recompile unchanged rules, and if it doesn't recompile, the
> compiled rules will potentially be ignored until the next compile
> because the ScamNailer output file is newer than the compiled rules.
> The attached diff.txt patch fixes this by returning the '$generate'
> flag from the GetPhishingUpdate() function, and calling
> GetPhishingUpdate() first and skiping the rest if its return is false.
> Also note that the current script still contains
> # Filename of list of extra addresses you have added, 1 per line.
> # Does not matter if this file does not exist.
> my $local_extras = '/etc/MailScanner/ScamNailer.local.addresses';
> even though the code to process that file is gone. This is actually a
> good thing from the point of view of the patch because it is more
> complicated to know if the local_extras file has changed, although
> this can be done by checking if it is newer than the output file.


Julian Field MEng CITP CEng
Buy the MailScanner book at

Need help customising MailScanner?
Contact me!
Need help fixing or optimising your systems?
Contact me!
Need help getting you started solving new requirements from your boss?
Contact me!

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
Follow me at and

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