Development info?

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

Hash: SHA1

Julian Field wrote:
> Hugo van der Kooij wrote:
>> 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. is almost fully comments only. But 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 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.


- --
hvdkooij at     

	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 and rate those images.

Version: GnuPG v1.4.7 (GNU/Linux)


More information about the MailScanner mailing list