Re: [Exim] Exiscan-SA-Sql question

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Wild Karl-Heinz
Dátum:  
Címzett: George Szekely
CC: exim-users
Tárgy: Re: [Exim] Exiscan-SA-Sql question
Hallo George,

In message "[Exim] Exiscan-SA-Sql question"
on 26.05.2003, George Szekely <gms@???> writes:

GS> Also, would love to get some help in rewriting this condition to pick
GS> up the max
GS> score from mysql (field names: username,preference,value and table: userpref)


GS> deny    message        = This message scored $spam_score points.
GS>          spam           = nobody:true
GS>          condition      = ${if >{$spam_score_int}{100}{1}{0}}


The following condition handles the case of an
spamlevel for a real user and or an alias.

And if no record is found the level becomes 1000.

MYSQL_SPAM_LEVEL = \
   Select if( max( usr_spamchk ) < 1, 1000, max( usr_spamchk )*10 ) \
   from user, domain, site, alias \
   where \
      dom_name = '${quote_mysql:$domain}' and \
      dom_sit_aid = sit_aid and \
      sit_aid = usr_sit_aid and \
      ( usr_uname = '${quote_mysql:$local_part}' or \
        ( als_name = '${quote_mysql:$local_part}' and als_usr_aid = usr_aid ) )



   warn     message = Subject: *SPAM* $h_Subject
            spam = *
            condition = ${if >{$spam_score_int}{${lookup mysql{MYSQL_SPAM_LEVEL}}}{1}{0}}





--
Mit freundlichen Gruessen,
Wild Karl-Heinz
kh.wild at wicom.li