Hi,
To intregrate osbf-lua spam filter with exim without use procmail, I put this
router and transpor setup on exim.conf:
#ROUTER
osbf_lua_router:
no_verify
check_local_user
# When to scan a message :
# - it isn't already flagged as spam from Spamassassin
# - it isn't already flagged as spam from DSPAM
# - it isn't already scanned
# - it isn't local
# - it isn't from one internal domain user to another
# - it is less than 512k in size
condition = "${if and { \
{!def:h_X-Spam-Flag:} \
{!def:h_X-FILTER-DSPAM:} \
{!eq {$received_protocol}{local}} \
{ <= {$message_size}{512k}} \
}\
{1}{0}}"
headers_add = "X-OSBF-Lua-Score: by $primary_hostname on $tod_full"
driver = accept
transport = osbf_lua
#TRANSPORT
osbf_lua:
debug_print = "T: osbf_lua for $local_part@$domain"
driver = pipe
command = "OSBF_LUA_DIR/spamfilter.lua --udir $home/osbf-lua"
return_path_add
delivery_date_add
envelope_to_add
osbf-lua process a message to "stdout" and classify with following tags on
subject:
Tag Meaning
[--] almost sure it's a spam - score <= -20
[-] probably it's a spam (reinforcement zone) - score < 0 and > -20
[+] probably it's not spam (reinforcement zone) - score >=0 and < 20
[++] almost sure it's not spam - score >= 20. This tag is here just for
symmetry, it's not used. An empty tag is used in place of it so as not to
pollute the messages.
The problem is: How exim can process message send to stdout by osbf-lua?
And how I can setup a transport to deliver the message to user folder based on
osbf-lua tag?
regards,
Marlon