[Exim] SpamAssassin logged on MySQL stats

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Fabio Berbert de Paula
日付:  
To: exim-users
CC: fabio
題目: [Exim] SpamAssassin logged on MySQL stats
Hi list,

I use SpamAssassin with Exim 3.x and I want to log blocked
messages into a MySQl Database. The program that logs
messages is ready, but now I need to invoke it with your
proper arguments.

The command that I need to run when spam is identified is:
/usr/local/bin/spamsave.pl ${local_part} ${sender_address}
${header_subject}

I tried to put it in a message_filter file, but the vars
$local_part, $original_local_part and $parent_local_part
are blank. Is there any way to run this command inside
the transport in exim.conf? Look like a second command
property? This is my transport:

spamcheck:
    driver = pipe
    command = /usr/sbin/exim -oMr spam-scanned -bS
    transport_filter = /usr/bin/spamc -u ${local_part}
    bsmtp = all
    home_directory = "/tmp"
    current_directory = "/tmp"
    user = mail
    group = mail
    return_path_add = false
    log_output = false
    return_fail_output = true
    prefix =
    suffix =


And this is my message_filter:

if
    $h_X-Spam-Status: contains "Yes"
        or
    "${if def:h_X-Spam-Flag {def}{undef}}" is "def"
then
    pipe "/usr/local/bin/spamsave.pl ${original_local_part}
${header_from} ${header_subject}"    finish
endif


But the variable ${original_local_part} is blank and
${local_part} is "message filter". Is there any way to get the
correct $original_local_part? Why is it blank?


Thanks,
Fabio Berbert de Paula