On 2019-01-14 6:03 p.m., Sergio Mendoza wrote:
> Yes. I have now checked and I have .msmtprc as a symlink. If it is not
> a symlink then I have no problems and everything runs smooth.
Great, thanks Sergio.
> In any case
> this is the output you asked for:
>
> root@quetzalli:~# dmesg | grep apparmor | tail -n 20
> [1064151.025521] audit: type=1400 audit(1547506707.004:157):
> apparmor="DENIED" operation="open" profile="/usr/bin/msmtp"
> name="/home/sergio/Private/.msmtprc" pid=14560 comm="msmtp"
> requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
This should eventually work even when ~/.msmtprc will be a symlink to
~/Private/.msmtprc. I hope the fix will land in the next package update [*].
> [1064177.994021] audit: type=1400 audit(1547506733.971:158):
> apparmor="DENIED" operation="open" profile="/usr/bin/msmtp"
> name="/home/sergio/mail/msmtp/log.txt" pid=14580 comm="msmtp"
> requested_mask="ac" denied_mask="ac" fsuid=1000 ouid=1000
> [1064281.325901] audit: type=1400 audit(1547506837.302:159):
> apparmor="DENIED" operation="open" profile="/usr/bin/msmtp"
> name="/home/sergio/mail/msmtp/log.txt" pid=14656 comm="msmtp"
> requested_mask="ac" denied_mask="ac" fsuid=1000 ouid=1000
This shows that msmtp was denied logging to ~/mail/msmtp/log.txt.
Unfortunately, this isn't a common location to for logs so it likely
won't be supported by the default base Apparmor profile. You have few
options to make it work though:
1) you can have it log to more usual locations like one of those:
~/.msmtp.log
~/.cache/msmtp/*.log
2) add this local override rule to /etc/apparmor.d/local/usr.bin.msmtp:
owner @{HOME}/mail/msmtp/log.txt wk,
3) disable the Apparmor profile
1 would be preferable but for 2 and 3, please refer to the README.Debian
file for detailed instructions.
Regards,
Simon
*: https://salsa.debian.org/kolter/msmtp/merge_requests/3