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

Top Page
Delete this message
Reply to this message
Author: Jeremy Harris
Date:  
To: exim-users
Subject: Re: [exim] exim4 only queues mails sent by systemd service
On 24/09/2018 14:25, Kamil Jońca via Exim-users wrote:
> 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?
> Morevoer this service run as "--user" service works as expected - mails
> are delivered at once.
> Does systemd interfere with processes (suid/sgid? file access limitations?)


Possible, but rather difficult for us to guess.
If you could call exim directly, rather than via mutt, you could
add debug flags to the commandline. Then assuming that systemd
collects stderr, we might be able to trace what happens.

http://exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html#SECID39

--
Cheers,
Jeremy