Re: [exim] exim4 only queues mails sent by systemd service

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Jeremy Harris
Date:  
À: exim-users
Sujet: Re: [exim] exim4 only queues mails sent by systemd service
On 05/10/2018 19:11, Kamil Jońca via Exim-users wrote:
> 1. exim forks and creates background process to deliver mail
> 2. systemd, after main process exits, kill all remaining proceses, so
> ...
> 3. background exim process are killed during delivery, and message remains in
> queue.
>
> I think this is important for services sending mails (for example
> logrotate with mail option)
>
> There are solutions/workarounds:
> 1. migrate to postfix :)
> 2. set KillMode=none in service file.
> 3. use other init (not systemd)


It does seem somewhat... arrogant of systemd to assume that
when a process it has started terminates, any of its children
that might happen to be doing useful, desired work should
be killed. If that's the default. At least, as you
note, there's a way of telling it not to.

Another option is (if calling Exim directly, or in
a way that you can modify Exim's command line) the -odf
option; locally-generated messages have the delivery
process waited for by the toplevel process.
--
Cheers,
Jeremy