[exim] Exim, Vexim, Sieve and Spamassassin

Etusivu
Poista viesti
Vastaa
Lähettäjä: Sascha Schmidt
Päiväys:  
Vastaanottaja: Exim-users
Aihe: [exim] Exim, Vexim, Sieve and Spamassassin
Hi *,

I've got problems tagging spam-mails with "X-Spam-Flag: YES". I'm using
vexim where users can define the value when their emails should be
tagged. The following code exists within vexim-acl-check-content.conf
that will add the Spam-Score and Report to all emails (globally defined):

---
    warn  message         = X-Spam-Score: $spam_score ($spam_bar)
          spam            = vmail:true
    warn  message         = X-Spam-Report: $spam_report
          spam            = vmail:true
---


The following code works and adds the X-Spam-Flag correctly but does not
use the userdefined values from the vexim webinterface. The global value
is used:

---
     warn message         = X-Spam-Flag: YES
          spam            = vmail
---


I thought about a mysql-clause which is used within the condition part.
The problem I have is that I'm not knowing the correct syntax to create
the part correctly; missing curely brackets etc... :-)

My first thought was the following one:
---
warn message = X-Spam-Flag: YES
spam = vmail:true
condition = ${if >{$spam_score_int}{${lookup mysql{select \
users.sa_tag * 10 from users,domains \
where localpart = '${quote_mysql:$local_part}' \
and domain = '${quote_mysql:$domain}' \
and users.on_spamassassin = '1' \
and users.domain_id=domains.domain_id}
---

Perhaps someone can look at this code and tell me what's wrong with it.
Any hint is welcome;)

Greets and thanks
Sascha