Development info?

Hugo van der Kooij hvdkooij at vanderkooij.org
Sun Aug 24 21:27:40 IST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Julian Field wrote:
> 
> 
> Hugo van der Kooij wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Julian Field wrote:
>>  
>>> A Custom Function is used to calculate the value of a configuration
>>> setting for any particular message. The return value from the function
>>> is just the value you want to use as the value of the configuration
>>> setting. So if you used a custom function to work out the value of Spam
>>> Actions, then a valid return value might be "store deliver" for example.
>>> It is usually a string, except for settings that have a yes or no value.
>>> No = 0 and yes = 1.
>>>
>>> That's about all there is to it.
>>>     
>>
>> The odd thing is that I am looking into the GenericSpamScanner sample.
>>
>> If I call the function from MailScanner like this:
>> Use Custom Spam Scanner = &SearchMalware
>>   
> No, that's not how it works. Read the docs for "Use Custom Spam Scanner"
> in MailScanner.conf, it tells you exactly how to implement it. This
> option "Use Custom Spam Scanner" is a simple yes/no result function, you
> want to set it to "yes" if you want to implement this feature. It's
> documented there, and explains exactly what to call the Custom Spam
> Scanner function, where to put it, what parameters it is passed and what
> it should return. There is even a complete example implementation for you.
> 
> So please RTM :-)

The point is that the function is static in it's name. And there is
allready a sample there. So if I want to write one myself what will
happen with an upgrade? If I add a file I am sure it will be safe. But
what if I decide to exchange it for my own? Will I loose it on the next
upgrade of MailScanner.

That is the bit that conviced me I should be looking for another function.

MyExample.pm is almost fully comments only. But GenericSpamScanner.pm is
not. That would mean if I write my custom function in my own file that I
would get back a default (and conflicting) one back with an upgrade.

Last time I checked the GenericSpamScanner.pm file is not marked as
document so it will be overwritten with an upgrade.

Perhaps it would be feasable to name the function anyway I like it with
a new config option. Then the conflict would not be there. Or you ship
one fully commented out so there will be no conflicts by defining
GenericSpamScanner twice.

Either of these two solutions will do to prevent the upgrade nightmare.

Hugo.

- --
hvdkooij at vanderkooij.org               http://hugo.vanderkooij.org/
PGP/GPG? Use: http://hugo.vanderkooij.org/0x58F19981.asc

	A: Yes.
	>Q: Are you sure?
	>>A: Because it reverses the logical flow of conversation.
	>>>Q: Why is top posting frowned upon?

Bored? Click on http://spamornot.org/ and rate those images.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFIscQ6BvzDRVjxmYERAjZ9AJ4zxdgzJucs1HxBt4FrH4zmVUc2oQCfaMck
gXic0tmkDnQghRwyT4e6YNg=
=wYvp
-----END PGP SIGNATURE-----


More information about the MailScanner mailing list