I try to make a container with a webserver and email proxy. The email proxy is a msmtp. If I try to send an email by command line it works fine. If I try to send an email by PHP msmtp is blocked by apparmor:
audit: type=1400 audit(1629128440.332:127): apparmor="DENIED" operation="file_inherit" namespace="root//lxd-webserver_<var-snap-lxd-common-lxd>" profile="/usr/bin/msmtp" name="/run/php/php7.4-fpm.sock" pid=3735 comm="msmtp" requested_mask="wr" denied_mask="wr" fsuid=1000033 ouid=1000033
I hope anybody can explain me why the tool is not blocked if I run it manually and is blocked while running with PHP and how I can solve it.