Re: [exim] way to delay by time of day?

Pàgina inicial
Delete this message
Reply to this message
Autor: Fred Viles
Data:  
A: exim-users
Assumpte: Re: [exim] way to delay by time of day?
On 17 Sep 2005 at 23:09, OpenMacNews wrote about
    "[exim] way to delay by time of day?":


|...
| another approach would be to reach OUT -- i.e., use a series of conditionals in
| the 'delay =' stanza that use ${run<command> expansion to reach out to the
| shell's date/time function ... but, again, 'kludgy'.


It wouldn't be as ugly as that, you don't need conditionals. Just
${run a program or script that writes the appropriate delay string to
stdout, which is available to you in $value.

| is there another/better approach for this?


I don't know about "better". You good do something a lot uglier
looking but possibly faster within exim by using one of the $tod_*
variables and ${sg or ${substr to get the time/date components you
want (day of week, hour) into $acl_mN variables. Then a long set of
nested ${if to set the desired delay. Hmm, or maybe an lsearch
file...

If it were me, I'd write a small C program (for performance) to
calculate the delay and ${run it.

- Fred