Hello Francesco, On 2019-10-16 1:41 p.m., Francesco Ariis wrote: > Package: msmtp > Version: 1.8.3-1 > Severity: normal > > Dear Maintainer, > > I wonder how appropriate the current Apparmor configuration is for > msmtp. Story time: > > - After dist-upgrading my system to buster, my msmtp setup stopped > working. > - I invoke msmtp as: msmtp -C /home/f/cfg/msmtp/msmtpall > It exited with this error: msmtpall: Permission denied > - The reason and fix for this were clearly illustrated in > NEWS.Debian.gz; the fix involved some messing with /etc/ > > Everything went fine but I wonder: should I be touching /etc/ to > configure a program I run as a user with a config that is located > in my $HOME? > What if I had not root access?
It's really up to you but if you'd like to not workaround this with root privileges, you could move/rename the config file so that it matches a more generic/common name that's allowed by the Apparmor profile. Alternatively, you could even stick with your existing way of invoking msmtp if you do a minor change. You'd need to move the conf around and use a symlink like this (untested): mv /home/f/cfg/msmtp/msmtpall /home/f/.msmtpall ln -s /home/f/.msmtpall /home/f/cfg/msmtp/msmtpall Apparmor only cares about the final destination of a symlink and "~f/.msmtpall" is permitted by the policy. Let me know if that doesn't work. Regards, Simon