Re: [exim] test $message_age

Etusivu
Poista viesti
Vastaa
Lähettäjä: Philip Hazel
Päiväys:  
Vastaanottaja: John Oxley
Kopio: exim-users
Aihe: Re: [exim] test $message_age
On Tue, 11 Jul 2006, John Oxley wrote:

> I have this router in a test exim setup.
> etrn_delay:
>    driver = accept
>    transport = smtp_appendfile
>    condition = ${if >{$message_age} {3600} {yes} {no}}
>    domains = +etrn_domains

>
> How can I test a queue run with a message_age of 3601 without actually
> touching the real queue sitting on the machine?


The automated test for message_age uses 2 seconds, and the script just
waits 3 seconds at the relevant point, so that doesn't help you very
much!

You can use a test version of Exim with a test spool to avoid touching
the live queue, of course. You can put a message on the queue using -odq
so it doesn't get delivered. You can then wait for 3600 before starting
a queue runner, but that's a slow testing process...

The only alternative is to edit the -H file on the queue to fake the
arrival time.

-- 
Philip Hazel            University of Cambridge Computing Service
Get the Exim 4 book:    http://www.uit.co.uk/exim-book