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. KJ -- http://stopstopnop.pl/stop_stopnop.pl_o_nas.html Platonic Shadow: A nonsexual friendship with a member of the opposite sex. -- Douglas Coupland, "Generation X: Tales for an Accelerated Culture"