Re: [exim] $message_size and spamassissin

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Johann Spies
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] $message_size and spamassissin
On Mon, Mar 10, 2008 at 10:32:43AM -0400, Marc Sherman wrote:
>
> This one is the problem. It's checking the spam condition _before_ it
> checks the size condition.


Thanks Mark. That explains why it was not working.


> You should probably rework your config so that it only checks the spam
> condition in the first stanza; the $spam_* vars will carry over to
> future stanzas, so that you can add multiple headers. Your current
> config will fail in the case of a spamassassin error; it will attempt to
> rerun the spam check for each spam=spamd:true check, so if there's a
> recurring spamassassin failure, it will churn a lot of resources.


I was wondering about that. The examples in the exim documentation
also calls spamassassin several times:
"
Here is a longer, commented example of the use of the spam condition:

# put headers in all messages (no matter if spam or not)
warn  spam = nobody:true
      add_header = X-Spam-Score: $spam_score ($spam_bar)
      add_header = X-Spam-Report: $spam_report


# add second subject line with *SPAM* marker when message
# is over threshold
warn  spam = nobody
      add_header = Subject: *SPAM* $h_Subject:


# reject spam at high scores (> 12)
deny  message = This message scored $spam_score spam points.
      spam = nobody:true
      condition = ${if >{$spam_score_int}{120}{1}{0}}


"

Would one then be able to rewrite those examples like this?

# put headers in all messages (no matter if spam or not)
warn  spam = nobody:true
      add_header = X-Spam-Score: $spam_score ($spam_bar)
      add_header = X-Spam-Report: $spam_report


# add second subject line with *SPAM* marker when message
# is over threshold
warn add_header = Subject: *SPAM* $h_Subject:

# reject spam at high scores (> 12)
deny  message = This message scored $spam_score spam points.
      condition = ${if >{$spam_score_int}{120}{1}{0}}
"


Regards
Johann

-- 
Johann Spies          Telefoon: 021-808 4036
Informasietegnologie, Universiteit van Stellenbosch


     "I am the vine, ye are the branches: He that abideth in
      me, and I in him, the same bringeth forth much fruit: 
      for without me ye can do nothing."              
                                           John 15:5