Re: [Exim] sa-exim 2.2 & SAEximRunCond

Top Page
Delete this message
Reply to this message
Author: Nico Erfurth
Date:  
To: James Tyson
CC: exim-users
Subject: Re: [Exim] sa-exim 2.2 & SAEximRunCond
James Tyson wrote:
> Hi.
>
> Not sure if it's appropriate to post about sa-exim on this list, but I
> figure someone else must be playing with it.
>
> I have the following condition set as SAEximRunCond:
>
> ${if and{{def:sender_host_address} {!eq
> {$sender_host_address}{127.0.0.1}} {!eq {$h_X-Disable-SA:}{yes}} {!
> def:h_X-Spam_Flag:} {eq {${lookup mysql{SELECT M.spam_filter as
> spam_filter from mailboxes M, domain D where M.domain_id = D.id AND
> D.domain_name = '${quote_mysql:$domain}' AND (M.local_part =
> '${quote_mysql:$local_part}' OR M.local_part = '@') ORDER BY
> M.local_part DESC LIMIT 1} }}{Y}} } {1}{0}}
>
> However, looking at the MySQL log it looks like the $domain and
> $local_part expansion variables are empty at this stage in the mail
> accept process.
>
> Can anyone suggest anything to do this? The idea is to turn spam
> filtering on and off on a per recipient address basis.


*SIGH* RTFM. The problem is, that a local_scan runs on a per message
base, not per recipient, but a message can have more than one recipient,
that's the reason why there is no $domain/$local_part set.

A solution is to use exim4.14, and the new acl-variables. See this post:
http://www.exim.org/pipermail/exim-users/Week-of-Mon-20030317/051275.html

Nico