Re: [exim] Exim in systemd system (queue mode)

Top Page
Delete this message
Reply to this message
Author: Jasen Betts
Date:  
To: exim-users
Subject: Re: [exim] Exim in systemd system (queue mode)
On 2021-07-08, Jeremy Harris via Exim-users <exim-users@???> wrote:
> On 02/07/2021 20:25, michael--- via Exim-users wrote:
>> Now, in a systemd based system the "/etc/init.d/exim queue" command is
>> missing. And I can't find a "systemctl queue exim.service" equivalent.
>> Can I just replace this step with: "/usr/sbin/exim -bd -odq" ?
>
> If that matches your usual command line, yes.
>
>> Or do you recommend another approach?
>
> It depends what your concerns are. I assume you're worrying
> about half-delivered files but not about half-received files
> in spool. You'd want to add a detect/wait for any ongoing
> queue-runner processes to what you list, though (ok, the
> probability of a queued message for a local delivery destination
> is low. But nonzero).
>
>
> Another approach would be to test in ACL the existence of
> a named file, and if present, divert received messages to
> an alternate queue and set queue-only.


You could have a router that defers in the presence of the named file
immediately before the local delivery router, this would cause local
deliveries to be deferred (and end up held on the queue) until the file
goes away.

A router something like this:

  hold_this:
    driver = redirect
    verify = no
    domains = +local_domains
    condition = ${if exists{/run/lock/backup_in_progress}}
    allow_defer = yes
    data = :defer: backup in progress



--
Jasen.