On 2025-01-22 Odhiambo Washington via Exim-users <exim-users@lists.exim.org> 
wrote:
> Happy New Year to everyone.

> I have the need to impose a 24-hr delay on emails from john...@johndoe.com
> to a local recipient.
> I have found this config snippet:
> https://github.com/Exim/exim/blob/master/doc/doc-src/FAQ.src#L6892
> So I created a router as suggested:

> delay_incoming:
>   driver = redirect
>   domains = mydomain.name
>   local_parts = the_local_part
>   senders = sender@some_domain_name
>   condition = ${if < {$message_age}{86400}{yes}{no}}
>   allow_defer
>   data = :defer: message not old enough
>   no_verify

> I tested the router and the email from sender@some_domain_name stayed in
> the queue for some time, then it got delivered, I suppose on the next queue
> run.
> The FAQ says one may want to set a special retry rule, so I figured out I
> must create a specific rule for this sender and the recipient.
> Looking at the Exim spec, I am missing something on the form this rule is
> supposed to take. I have:

> the_local_p...@mydomain.name  *  sender@some_domain_name F,24h,1m
[...]

Hello,

I think the FAQ-response is too short. (But I fail to quickly come up with
a better one)
A9807: Set up a router like this:
[... router ... ]
|  Of course, this will also have the effect of setting a retry time for
|  the address. You may want to set a special retry rule for it. Note the
|  use of \no_verify\ to ensure that this router is not used when Exim is
|  verifying addresses.

Afaiui the reason that retry rules need to changed is to avoid delaying
longer than 24 hours. - Since every message is defered retry rules with
long intervals will hit. Using the default config
*   *   F,2h,15m; G,16h,1h,1.5; F,4d,6h
messages will be delayed by not 24 but 24+6 hours. (They defered for a
long time and hit the F,4d,6h-part) So you would want to modify this to
have small retry intervals (15m?) for up to 25 hours. Setting a long
interval for the first 24 hours would just be an optional performance
optimization. Deferal is caused by the router, not the retry rule.

I think reception of a second or third to-be-deferred message while the
first one is still deferred does not make difference BTW. (Unless exim
does not retry the oldes message first and messages queu up until the
*newset* one is 24 hours old. - If it does not the whole scheme
breaks and messages queue up until the *newset* one is 24 hours old.)

cu Andreas
-- 
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'

-- 
## subscription configuration (requires account):
##   https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
##   exim-users-unsubscr...@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to