Colin wrote:

On 27/10/2011 11:18, Graeme Fowler wrote:
On Thu, 2011-10-27 at 11:05 +0100, Colin wrote:
Hi Graeme, thanks for the reply,
I am unsure that I follow it completely. In my understanding, the
require verify should only apply if the condition is met.
"require" is a verb, along with "warn", "deny" and friends. This means
you actually have two ACL statements there - the first is the "warn",
with the condition but no action; the second the "require" with no
condition.

What you probably want is something like:

require log_message = Couldn't verify recipient
condition = ${if eq {1}\
{${lookup{$domain}lsearch{/etc/staticroutes}\
{1}{0}}}}
verify = recipient/callout=30s,defer_ok,use_sender

Graeme


Thank you for that, unfortunately it exhibits exactly the same
behaviour. I get the message logged for every message that does not
exist in staticroutes and it looks like they are also failing so I had
to remove it.

It looks like something in the condition isn't working and is either
passing everything, or is passing messages where the sender is in
staticroutes rather than just the recipient.

I need to have a play about with the ACL later when it is out of hours
and not breaking people's mail I think.

Regards,
Colin.



I'm a believer in 'instrumented' configure files - warn verbs that get changed later..

.. coupled with 'logwrite' to show entry of a clause

 and 'log_message' to show IF it fired.

ether/both also writing variables of interest into the log.

And with unique 'codes' attached to all clauses.

A code of interest shows up in the log, have your editor-of-choice find it in the configure file so you know you are changing the guilty party. Only.


This won't break anything:

=====

#  XSR Static route test
#
#deny
warn

logwrite = entering XSR test
condition  =  ${if eq {1}{${lookup{$domain}lsearch \
        {/etc/staticroutes}{1}{0}}}}
!condition = verify recipient/callout=30s,defer_ok,use_sender
log_message = XSR found $domain in static route file

=====

Then 'tail -f -n 300 ~/exim/mainlog'

Comment OFF the logging and swap the 'warn' and 'deny' when the logs show it is working.

Bill

--
韓家標

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to