[systemd-devel] exim4 only queues mails sent by systemd service
Kamil Jońca
kjonca at o2.pl
Mon Sep 24 08:47:12 UTC 2018
Lennart Poettering <lennart at poettering.net> writes:
> On So, 23.09.18 22:48, Kamil Jońca (kjonca at o2.pl) 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.
Another puzzle, when I put "strace" in front of mutt - mail is delivered
immediately.
So it I suspect something with SUID/SGID binaries called from systemd,
but I do not know how to check it :(
>
> 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...
Everything works as expected:
- mails from cron
- mails from fetchmail
- mails from "--user" services
KJ
--
http://stopstopnop.pl/stop_stopnop.pl_o_nas.html
Imagination is more important than knowledge.
-- Albert Einstein
More information about the systemd-devel
mailing list