[Exim] exim with exiscan and MYSQL lookups

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: David J Dean
Dátum:  
Címzett: exim-users
Tárgy: [Exim] exim with exiscan and MYSQL lookups
Hi

I am using Exim with the Exiscan patch and am very pleased with the
results, however I would like to be able to set the action that exiscan
takes based on who is sending the message looked up in a mysql table.

so I included the line

exiscan_regex_action = ${lookup mysql{select acceptmail.sender from
acceptmail where accepttmail.sender = '$sender_address'}{pass}{reject}}

For some reason the lookup does not seem to take place and all mail is
passed. Even if I replace $sender_address with a known email address the
result is the same even if I swap the {pass} and {reject} around.

yet under exim -be you get
>
>exiscan_regex_action = ${lookup mysql{select acceptmail.sender from

acceptmail where acceptmail.sender = 'd@???'}{pass}{reject}}
exiscan_regex_action = reject
>


It is as if the variable is not being expanded (the $ is being ignored, if
you set
exiscan_regex_action = whatever
it treats it as if you put exiscan_regex_action = pass)

The debug is below and again seems to show that the expression is not being
expanded


Data file written for message 18eHN1-0001vK-00
calling exiscan(); timeout=300
exiscan: starting
exiscan: report size: 53
exiscan: read 53 bytes from kavdaemon
exiscan: full report:

/var/spool/exim/scan/18eHN1-0001vK-00/textfile0 ok.


exiscan: regex 'Aaaaaa' matches line 'Aaaaaa'
LOG: MAIN
exiscan: unwanted regular expression (string match) found (Aaaaaa)
Host=none/unresolved/local [none/unresolved/local]
Sender='root@???' Recipients[1]=[d@???] Subject=''
exiscan: clean header: Aaaaaa
exiscan: unlinking
/var/spool/exim/scan/18eHN1-0001vK-00/18eHN1-0001vK-00-complete
exiscan: unlinking /var/spool/exim/scan/18eHN1-0001vK-00/textfile0
exiscan() returned 0 this message matches a blacklisted regular expression
(Aaaaaa).
calling local_scan(); timeout=300
local_scan() returned 0 NULL
Writing spool header file
Size of headers = 386
LOG: MAIN

Anybody got any ideas ??

Best Regards



David J Dean

Net-Work Internet Ltd.
Email:    d@???     http://www.net-work.net    ICQ:    502311
tel:     +44 1824 708780