Re: [Exim] Final Peer Review Sought: "Spam Filtering for MXs…

Pàgina inicial
Delete this message
Reply to this message
Autor: Alan J. Flavell
Data:  
A: Exim User's Mailing List
Assumpte: Re: [Exim] Final Peer Review Sought: "Spam Filtering for MXs" HOWTO
On Fri, 16 Jul 2004, Tor Slettnes wrote:

> seconds. I'm thinking I may have to reduce this to 15 seconds, to
> allow for some overhead within the Exim's default 30-second sender
> callout timeout.


If you really want a transaction to take a given amount of time,
adjusting for variable times taken in DNS lookups, callouts etc., I'd
suggest storing the tod clock in a variable at the start of the ACL,
and computing the residual time at the end. Something along these
lines...

check_recipient:

         warn set acl_m2 = $tod_epoch


[ stuff here that takes indeterminate amount of time ]

# then finally:
         warn condition = whatever...
              ...
              set acl_m2 = ${eval:63+$acl_m2-$tod_epoch}
              ...
              delay = ${acl_m2}s


(this is just a sketch, based obviously on a target of 63 seconds in
this case - I'd test for a negative result to avoid anything silly
happening).

This seems to work in practice. As a test, I had cut log messages in
the various ACL stanzas, and looked at the timestamps in the log to
verify what was happening.