On Mon, Sep 24, 2018 at 11:35 AM Lennart Poettering <[email protected]> wrote:
> On So, 23.09.18 22:48, Kamil Jońca ([email protected]) wrote: > > > It is something strange with sending mails from systemd system service: > > assume we have service file /etc/systemd/system/mailtest.service: > > > > --8<---------------cut here---------------start------------->8--- > > [Unit] > > Description="Test maili" > > [Service] > > #User=kjonca > > NoNewPrivileges=false > > Type=oneshot > > ExecStart=-zsh -c 'echo xxx|mail news' > > ExecStart=-zsh -c 'echo xxx|mutt -F /dev/null -s subject -e \'set > copy=no\' kjonca' > > --8<---------------cut here---------------end--------------->8--- > > > > When I call > > sudo systemctl start mailtest.service > > Two messages are put in exim queue, but not deliveried immediately. > > Why? What am I missing? > > Uh, this looks like something you need to ask the exim community, > systemd can't make exim mail queueing decisions, that's entirely > internal to exim. > > One question though: are you sure you have started the exim service > properly beforehand? I am pretty sure exim won't process the mail > queue if it's not running... > exim's a bit oldschool, and whenever you pipe a message to 'sendmail', it immediately forks a worker to deliver the message synchronously, regardless of the main daemon running. (I think this behavior is slightly ugly. It can be disabled by setting 'queue_only=yes', but... it's probably necessary because the main daemon only processes its queue every x minutes and won't notice queued messages for a while.) -- Mantas Mikulėnas
_______________________________________________ systemd-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/systemd-devel
