On Thu, Jun 17, 2021 at 05:18:54PM +1000, Simon Wilson wrote: > ----- Message from Bastian Blank > <bastian+postfix-users=postfix....@waldi.eu.org> --------- > Date: Thu, 17 Jun 2021 07:59:10 +0200 > From: Bastian Blank <bastian+postfix-users=postfix....@waldi.eu.org> > Subject: Re: Mail not being sent to file > To: postfix-users@postfix.org > > > >On Wed, Jun 16, 2021 at 05:59:16PM -0700, Jeremiah Rothschild wrote: > >>To triple check my sanity, I created a brand new VM and confirmed the > >>behavior. > >>So anyone should be able to easily reproduce this. > >> > >>* Fresh CentOS 8.4 install > >>* Choose "Minimal" base environment > >>* Defaults for everything else > >> > >># yum -y update > >># yum -y install postfix mailx > >># systemctl start postfix > >># echo "somealias: /tmp/somefile" >> /etc/aliases && newaliases > >># echo "test" | mail somealias@localhost > >># ls /tmp/somefile > > > >Just don't assume /tmp or /var/tmp are the same between services. > > > >Postfix on RHEL 8 is configured with private /tmp. To be exact: > >| PrivateTmp=true > >| CapabilityBoundingSet=~ CAP_NET_ADMIN CAP_SYS_ADMIN CAP_SYS_BOOT > >CAP_SYS_MODULE > >| ProtectSystem=true > >| PrivateDevices=true > > > >Bastian > > > ----- End message from Bastian Blank > <bastian+postfix-users=postfix....@waldi.eu.org> ----- > > Yup. > > Using a directory other than /tmp works fine on RHEL8: > > [root@emp87 ~]# chmod 1777 /home/simon > [root@emp87 ~]# echo "somealias: /home/simon/somefile" >> > /etc/aliases && newaliases > [root@emp87 ~]# echo "test" | mail somealias@localhost > [root@emp87 ~]# cd /home/simon > [root@emp87 simon]# cat /home/simon/somefile > {content as expected}
Thanks guys. You are right -- this does work. My previous example worked for a long time. Not sure why it suddenly became broken but I will try to dig into that some more. > Simon. > > -- > Simon Wilson > M: 0400 12 11 16 >