Re: [exim] Filter behavior when run from shell vs systemd

Top Page
Delete this message
Reply to this message
Author: Marius Stan
Date:  
To: exim-users
Subject: Re: [exim] Filter behavior when run from shell vs systemd
Hello,

It might be selinux that's preventing access to that file.

try running setenforce 0 and see if the error goes away.

Marius


On 13/2/2018 9:23 AM, Gabe da Silveira via Exim-users wrote:
> Hi all,
>
> I'm setting up exim to process emails based on the existence of a set of
> centrally managed forward files. So I have an accept router configured as
> follows:
>
> email_address_check:
>    driver = accept
>    condition  = ${if exists{DOMAINS_DIR/$domain/$local_part/forward}}
>    verify_only

>
> The issue I am facing is that this condition fails when run via systemd,
> but passes when run from a root shell. In both cases the command is:
>
> exim -C /etc/exim/exim.conf -bdf -d
>
> This is on a CentOS 7 system with the standard exim package. I have
> verified the file and full path are readable by the exim user. I've tried
> both exim and root in the systemd EnvironmentFile and both fail the same
> way. The unit file looks like this:
>
> [Unit]
> Description=Exim Mail Transport Agent
> After=network.target
> Conflicts=sendmail.service postfix.service
>
> [Service]
> PrivateTmp=true
> Environment=QUEUE=1h
> EnvironmentFile=-/etc/sysconfig/exim
> ExecStartPre=-/usr/libexec/exim-gen-cert
> ExecStart=/usr/sbin/exim -C /etc/exim/exim.conf -bdf -d
>
> [Install]
> WantedBy=multi-user.target
>
> I am at a loss as to what to poke at next. Any ideas what else could be
> varying between systemd and a root shell?
>
> Thanks in advance for any guidance or documention references to follow up
> on,
> -gabe