On Wed, Oct 16, 2019 at 01:57:31PM -0400, Simon Deziel wrote:
> 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.

I have tried this with a symlink (generated by `rcm`). It seems to fail.
This is how:

    f@aspire:~$ ls -lh .msmtprc
    lrwxrwxrwx 1 f f 30 Dec 28 01:08 .msmtprc -> /home/f/cfg/dot-files//msmtprc
    f@aspire:~$ echo "test" | msmtp -a ariis -t [email protected]
    msmtp: account default not found: no configuration file available

    # dmesg
    [  743.488221] audit: type=1400 audit(1577572017.951:19): apparmor="DENIED" 
operation="open" profile="/usr/bin/msmtp" name="/home/f/cfg/dot-files/msmtprc" 
pid=6311 comm="msmtp" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000

And this is what I did to get msmtp to work back again:

    f@aspire:~$ rm .msmtprc
    f@aspire:~$ cp /home/f/cfg/dot-files/msmtprc .msmtprc
    f@aspire:~$ echo "test" | msmtp -a ariis -t [email protected]
    f@aspire:~$ ls -lh .msmtprc
    f@aspire:~$ ls -lh .msmtprc
    -rw------- 1 f f 544 Dec 28 23:29 .msmtprc

Reply via email to