Am 22.12.2016 um 14:19 schrieb Jeremy Harris:
> On 22/12/16 13:06, Forum wrote:
>>>>        condition = ${if >{$spam_score_int}{${eval:200}}{true}{false}}
>>> Possibly you don't have a $spam_score_int by this point...
>>
>> But it is working - so the variable exists with a value.
> 
> Not necessarily; it can exist but have no value.
> If so it will expand to an empty string.
> In an expansion numeric-comparator condition and
> empty string is taken as zero, and your
> condition is false.

O.K.
It is not clear how spamassasin is used or should be used in exim.
I could not find any usable example for it.
People will just quote the examples of the exim wiki or go another way.

> 
>>>>        warn  spam = nobody:true
>>> Nit: indentation.
>>
>> What is the meaning of this?
> 
> I mean: this is unimportant for operation,
> but could confuse a human reading the text
> since you have not vertically-aligned the
> ACL verb "warn" with the preceding "deny".

I am generally confused with the exim configuration file. :-)
Many things are logical, but the use of spamassassin in the acl isn't.

So back to my first question - HowTo integrate Spamassassin?

The main structure is the same as this one i started with:
http://struction.de/projects/HOWTO_VirtualMail_Exim-MySQL-Spamassassin-ClamAV-Dovecot/config/exim/exim.conf

There are different transports:
* remote_smtp:
* local_delivery:
* local_mysql_delivery:
* address_pipe:
* address_file:
* address_reply:

At least i want that every email goes through spamassassin.
When it is worth spam it should be rejected - that works!

_____________________________________________________________________________________

begin acl
...
          warn spam = nobody:true
          add_header = X-Spam-Score  : $spam_score ($spam_bar)
          add_header = X-Spam-Score-Int: $spam_score_int
          add_header = X-Message-Age : $message_age
#         add_header = X-Spam-Report: $spam_report
        

  deny  message = This message is classified as UBE (SPAM) and therefore 
rejected. You scored $spam_score points.
Congratulations!
        condition = ${if >{$spam_score_int}{${eval:200}}{true}{false}}

_____________________________________________________________________________________


Must there be a "warn" before "spam = nobody:true" ?

Now the part i want that didn't work:

_____________________________________________________________________________________


           warn  spam = nobody:true
           condition = ${if >{$spam_score_int}{50}{1}{0}}
#          condition = ${if >{$spam_score_int}{${eval:10*{${lookup mysql{ 
SELECT DISTINCT spam_threshold FROM user WHERE
username='${quote_mysql:$local_part}' AND domain='${quote_mysql:$domain}' AND 
SMTP_allowed='YES'}}}}}{true}{false}}
           remove_header = Subject
           add_header = Subject: ***SPAM (Score:$spam_score)*** $h_Subject:

_____________________________________________________________________________________


Again - are the variables still filled?
Must there be a new "spam = nobody:true" before the condition?

At least i just want that every mail beyond a certain spam score is marked in 
the subject with "***SPAM
(Score:$spam_score)***"

What is the best way to do this?

Must it happen in acl or in tranport?

Is there an example for this?


-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to