[exim] Odd ACL behaviour

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Colin
Datum:  
To: exim-users
Betreff: [exim] Odd ACL behaviour
Hi there,
I've been working on my ACL since asking earlier, but have got a bit
bamboozled as it doesn't seem to be behaving so I'm hoping someone can
tell me what I've been doing wrong.

Essentially, I'm currently writing the ACL so that it just adds headers
when messages get to particular stages in the chain.

I currently have this in an RCPT TO acl:

accept
     condition = ${if eq 
{1}{${lookup{$domain}lsearch{/etc/staticroutes}{1}{0}}}}
     add_header = X_Staticroutes: TRUE
     require verify = recipient/callout=use_sender
     add_header = X_Staticroutes_verify: TRUE


To make things clear, /etc/staticroutes is a list of "domains: IP" and a
later transport delivers all mail to the domain to that IP address.
What I am attempting to do is have a call forward run that allows Exim
to reject messages that will not be accepted by the final server.

What actually happens is that incoming messages to the domain are all
accepted and the second header is not added. Messages to Valid
recipients get delivered and invalid messages get bounced.
Now the odd stuff. The bounce message contains the original message with
the first header (X_Staticroutes) added to it but not the second. The
bounce messages itself does not get the first header, but oddly gets the
second header added. I can't understand why the bounce message gets any
header added as the address it is going back to is not included in
/etc/staticroutes.

If I then take "require" out, the second header gets added to all
incoming messages for the domain and no headers get added to the bounce
message.

I'm stumped. What I need out of the end of this is a deny that checks
for a 1 on the condition I have and a reject on the the call forward.
Any pointers from people who know how these things work?
--
Regards,
Colin Waring,
+44 (0)1704 564047

Southport Computers
Local IT Support
http://www.southportcomputers.co.uk

Southport Web
Web Design and Hosting Services
http://www.southportweb.co.uk