Awk permission denied when run through msmtp

Solution 1:

Thanks to advice from marlam I found out that this issue is due to an overly restrictive AppArmor profile for msmtp. I am led to assume that my new OS version is more stringent with regards to usage of msmtp (good thing I guess). Unfortunately this often happens on Debian and Ubuntu and it confuses many users. The commands I've used to solve it are

sudo ln -s /etc/apparmor.d/usr.bin.msmtp /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/usr.bin.msmtp