Re: [exim] Fwd: Rate-limit queue-processing per domain

Etusivu
Poista viesti
Vastaa
Lähettäjä: Dean Brooks
Päiväys:  
Vastaanottaja: exim-users
Aihe: Re: [exim] Fwd: Rate-limit queue-processing per domain
On Thu, Oct 19, 2017 at 11:26:48AM +0200, Charlie Elgholm wrote:
> > slow_queue:
> >   driver = accept
> >   condition = ${if queue_running}
> >   condition = ${run{/bin/sleep 30}{yes}{no}}
> >   no_verify  # Don't execute during ACL verification
> >   unseen     # Pass message to next router even though we've accepted

> >
> > Bit of a hack but combined with strict queue-runner limits seems like it could work to effective throttle. Haven't tested, maybe some pitfalls?
>
> Uh... Sorry.. Haven't had my morning coffee (and it's 11.21 AM here in
> Sweden now!), but, I don't understand what this would accomplish... I
> like the emails being generated from my database system to be queued
> for delivery by Exim, I don't want my database-system to wait for each
> message before it's put in the queue. Depening on what function where
> talking about there's usually 100 to 50k unique messages generated for
> the users. I rather have my database perform other jobs then spooling
> to Exim for a hour or two. ;)... Or... Have I missunderstood this
> completely? Do the routers get executed AGAIN when Exim handles the
> queue?? I thought they were just executed on receiving a message..


Routers get reprocessed in their entirety every time a message is considered for delivery, so yes. This makes sense because MX records can change over lifetime of a message in queue, configuration changes affecting routing might change while in queue, etc.

During a queue run it will either (a) run every message through their routers before delivering *any* of them, or (b) individually as it moves through the queue. Depends if your queue runner has been given the "-q" or "-qq" command line options.

The "no_verify" makes sure the router is skipped during initial reception in the ACL phase. You can force all emails to be queued for certain domains with the global "queue_smtp_domains = *"

On your smtp transport you may need to set combination of "connection_max_messages", "remote_max_parallel" and "max_rcpt" so that Exim doesn't cheat and try and send a large number of messages down a single or parallel connections.

Haven't tested or tried any of this, just thinking outloud and comparing to some of our other configs.

Thanks,

Dean Brooks
dean@???