[exim] spam_score_int is not set even the mail is scanned

Top Page
Delete this message
Reply to this message
Author: Peter
Date:  
To: Exim-users
Subject: [exim] spam_score_int is not set even the mail is scanned

Hello,

I'm using the "old" integration of Spamassassin within Exim4 with the
following spamcheck_router (router=accept) and the spamcheck-transport
(transport=pipe):

-----
spamcheck_router:
no_verify
condition = "${if and { {!def:h_X-Spam-Flag:} {!eq
{$received_protocol}{spam-scanned}}} {1}{0}}"
driver = accept
transport = spamcheck


spamcheck:
driver = pipe
command = "/usr/sbin/exim4 -oMr spam-scanned -bS"
use_bsmtp = true
transport_filter = "/usr/bin/spamc -s 500000 -U /var/run/spamd.sock -u
$local_part@$domain"
home_directory = "/tmp"
current_directory = "/tmp"
user = vmail
group = vmail
log_output = true
return_fail_output = true
return_path_add = false
message_prefix =
message_suffix =
-----

Unfortunatally a router below the spamcheck_router called "ditch_spam" get
a spam_score_int which is not set! How could I manage it, that the variable
$spam_score_int is set after the mail is piped through Spamassassin, so
that the following router can access this score? I need this score to ditch
spam as you can see in the following ditch_spam-Router.

-----
ditch_spam:
  debug_print = "$spam_score_int"     ##### this debug_print ist empty ->
so the score is not set even the mail is scanned!
  driver = redirect
  allow_fail
  file_transport = ditch_spam_transport
  data = :blackhole:


  condition = ${if >{$spam_score_int}{${lookup mysql{select
users.sa_refuse * 10 from users,domains \
                where localpart = '${quote_mysql:$local_part}' \
                and domain = '${quote_mysql:$domain}' \
                and users.on_spamassassin = '1' \
                 and users.on_forward = '0' \
                 and users.type = 'local' \
                and users.domain_id=domains.domain_id \
                and users.sa_refuse > 0 \
                }{$value}fail}} {yes}{no}}
  local_part_suffix = -*
  local_part_suffix_optional
  retry_use_local_part
-----


Thank you very much for any help. Best regards,
Peter