On Wed, Oct 03, 2018 at 08:48:51AM +0200, Kamil Jońca wrote: > kjo...@poczta.onet.pl (Kamil Jońca) writes: > > > It is something strange with sending mails from systemd system service: > > assume we have service file /etc/systemd/system/mailtest.service: > > > > After discussion on systemd list, it turned out that we have race > condition here. > > 1. exim forks and creates background process to deliver mail > 2. systemd, after main process exits, kill all remaining proceses, so > ... > 3. background 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 two solutions/workarounds: > 1. migrate to postfix :) > 2. set KillMode=none in service file.
3. use another init. Cheers -- t
signature.asc
Description: Digital signature