[prev in list] [next in list] [prev in thread] [next in thread] 

List:       exim-users
Subject:    [exim] Spamassassin local.cf read
From:       Nikademus <nikademus () octools ! com>
Date:       2004-10-30 14:07:23
Message-ID: 20041030160723.660c34d6 () rohan
[Download RAW message or body]

Hello,

I am searching a good way to read the spamassassin local.cf file to be
able to reject mails over threshold at smtp time. I have to read it in
the local.cf file because the http administration page should only be
allowed to write in local.cf, not directly in the exim.conf.

So I have rule like that in the data acl to deny spam at smtp time

#Deny spam
drop
message         = Message rejected due to probable spam content.
log_message     = $sender_host_address has spam score: $spam_score
spam            = nobody:true
condition       = ${if >{$spam_score_int}{70}{1}{0}}

But I want to replace the hardcoded 70 by the value in local.cf file. So
I went to a rule like this to read the score (and to put it into headers for test \
purpose):

warn
set acl_m7 =
${lookup{required_hits}lsearch{/etc/spamassassin/local.cf}{$value}}
message = X-Spam-config:
${substr{-2}{2}{${extract{1}{\.}{$acl_m7}}}}${substr{0}{1}{${extract{2}
{\.}{$acl_m7}}}}

It works although, I'd like to hear from other people that would come with a less \
weird expression to do the conversion.

-- 
## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at \
http://www.exim.org/ ##


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic