<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Mon, Sep 24, 2018 at 7:51 PM Mantas Mikulėnas <<a href="mailto:grawity@gmail.com">grawity@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><br><div class="gmail_quote"><div dir="ltr">On Mon, Sep 24, 2018, 16:29 Kamil Jońca <<a href="mailto:kjonca@o2.pl" target="_blank">kjonca@o2.pl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Lennart Poettering <<a href="mailto:lennart@poettering.net" target="_blank">lennart@poettering.net</a>> writes:<br>
<br>
> On Mo, 24.09.18 12:04, Mantas Mikulėnas (<a href="mailto:grawity@gmail.com" target="_blank">grawity@gmail.com</a>) wrote:<br>
><br>
>> > Uh, this looks like something you need to ask the exim community,<br>
>> > systemd can't make exim mail queueing decisions, that's entirely<br>
>> > internal to exim.<br>
>> ><br>
>> > One question though: are you sure you have started the exim service<br>
>> > properly beforehand? I am pretty sure exim won't process the mail<br>
>> > queue if it's not running...<br>
>> <br>
>> exim's a bit oldschool, and whenever you pipe a message to 'sendmail', it<br>
>> immediately forks a worker to deliver the message synchronously, regardless<br>
>> of the main daemon running.<br>
><br>
> Uh, what? Are you saying exim is forking off privileged daemon code<br>
> from unprivileged user command invocations? Christ, that's ugly. They<br>
Yes. exim is suid root to deliver mails.<br>
<br>
> really really shouldn't do that.<br>
<br>
But they do. <br>
<br>
><br>
<br>
> It appears to me exim should figure out some way how clients such as<br>
> 'sendmail' invocations can trigger queue dispatching some other way,<br>
> for example, by making exim listen on some IPC of some form, or using<br>
> inotify or anything else. <br>
IIRC postfix is written that way, but I want to use exim, as it is more<br>
configurable.<br>
KJ<br></blockquote></div><div><br></div><div>When I was writing exim systemd units for Arch a few years ago, I experimented with using queue_only=true and no permanent daemon at all, but triggering the queue runner via systemd.path units (start as soon as spool is non-empty) and timers (to replace the usual -q15m).</div><div><br></div><div>.path units are inotify-based and can start exim as soon as /usr/bin/sendmail puts something in the queue.</div><div><br></div><div>This didn't work well enough IIRC, but if it did, then it'd provide almost postfix-like architecture.</div></blockquote><div><br></div><div>Or just making 'sendmail' send a SIGALRM to the main daemon would do the job perfectly well, I suspect...</div><div><br></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Mantas Mikulėnas</div></div></div>