Expand description
Exponential-backoff retry math + “is it permanent?” classifier. Exponential-backoff retry helpers for SMTP outbound delivery.
Backed by mailrs_backoff::Backoff::smtp_outbound. Replaces the
previous hardcoded 8-slot schedule with a clean parametric curve;
gains Full jitter to avoid thundering-herd on shared MX downtime.
Functions§
- retry_
delay_ secs - Retry delay in seconds for attempt
n(0-indexed), deterministic schedule (no jitter). For jittered scheduling useretry_delay_secs_jittered. - retry_
delay_ secs_ jittered - Retry delay in seconds with Full jitter applied. Caller supplies a
random seed (e.g.
Instant::now().elapsed().as_nanos() as u64orrand::random::<u64>()). The same(attempt, seed)pair always yields the same delay, so tests can reproduce. - should_
bounce - Should this attempt give up and bounce the message? Returns
truewhenattempt >= max_attempts. Equivalent tomailrs_backoff::Backoff::should_give_up; kept for back-compat.