sa caching mechanism
Ken A
ka at pacific.net
Fri Dec 1 23:47:15 GMT 2006
Ken A wrote:
>
>
> Glenn Steen wrote:
>> On 29/11/06, Ken A <ka at pacific.net> wrote:
>>>
>>> Is there any way to tell MailScanner that some SA scores should NOT be
>>> cached? I'd like to be able to have MailScanner cache scores unless
>>> certain (per user) SA rules are hit.
>>>
>>> For example: If a milter puts a header into a message that is based on a
>>> user preference that is later used by SA to subtract or add to that
>>> message's score, I'd like that score to NOT be cached, since it should
>>> only apply to that message.
>>>
>>> I know Julian is quite busy, so I'm going to go beat on the code, but
>>> hoping perhaps someone else has come across this?
>>>
>> Not much help, but the "Cache SpamAssassin Results" setting can eb a
>> ruleset... And it could be a CustomFunction... So if you can (somehow)
>> in that function get hold of the info you need to decide, that would
>> likely be the best way to go.
>>
>
> Ah! Good idea. As I said the info I need (header added by milter or
> something else) is in the message headers, so it should be available
> there somewhere in the Message object.
Worked great. Headers are in @{$message->{headers}}, so all I had to do
was a regex on each one to find the header I was looking for and return
0 when it's value matched. This turned off both the read from and write
to the cache, which is exactly what I needed.
Thanks,
Ken A.
Pacific.Net
> Thanks,
> Ken A.
> Pacific.Net
>
More information about the MailScanner
mailing list